From patchwork Thu Nov 20 23:20:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan O'Donoghue X-Patchwork-Id: 25114 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 99FEEC3330 for ; Thu, 20 Nov 2025 23:20:50 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 51DF460ABD; Fri, 21 Nov 2025 00:20:50 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="J+Yxa4+g"; dkim-atps=neutral Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 1D03460A80 for ; Fri, 21 Nov 2025 00:20:48 +0100 (CET) Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-477632d9326so9117605e9.1 for ; Thu, 20 Nov 2025 15:20:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1763680847; x=1764285647; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fuB5nZvmUnr2qr/n7eHSpAHaAkGWzDTTnkqO1/Mr7cs=; b=J+Yxa4+g/P0sE9xYQdFtY7TwVc8EFImoR1V/PMP3DupeleV0Ugutz6BKSlbwFVAewV ZF9b97UGWYsKYCrkihlvWFI0gdI1fV3CuKeHTVasg+dFnAooBgWIgzShS9b9Adw7ZsNL LppA+38wufzKt9jRkewIM/S79t+ENFP6JHASqNTrLq5NyKSlBnSrU1fFgEPoINNmI3uL 1NsItLn+pwVQhoTwY0d0TAkDIKUCHZ9SSCty5ZrpCowX9L7jzSktEgUyJUin/HjQ4emS 9nUgHtCxadUoC06Cz2a76s6OsQuOi/LdacDF4GeENHVq5P7vWmMpJLN3VLXLBXUzbesM JR8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763680847; x=1764285647; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=fuB5nZvmUnr2qr/n7eHSpAHaAkGWzDTTnkqO1/Mr7cs=; b=CRKyQWS9sIZaLuCWq10hxofbpsL2scIllPY7sMTcsOatXwSdOQbT21hyTvS4QxmfQd nTenqR7RY9MxdtjZZQDtWMQrphKHK6cIYGsOpDcx6UHjy5YoU0HEnFsvwmb/VnGlreGi wIXytWs9SLFg/xb07Lx2xsCBoUBOCb9IGHdpMPAYbXCAU9jZAfRuepTH3znXWUQU7InP EG7eXOhT3J/l8tMkUsUWj4vEFl6M7vtFCajXtYTo6BAWrHkY+gDiJMRhX8ESroJDZJFz fbY2BHHHmGcPRmbRUVcou46FMVlNV9jUh3IstbpuUFaPx+5RgD7v1TH0m0dFFVHcbje1 pzVQ== X-Gm-Message-State: AOJu0YyzvwBpWVpPKuQI6X82FWlKdbZidA2FKVGRyPHtX3u7srR9DyVg hCFX5Hj9XPVlR6zDlUDWr2XwQRP4L9+9JC7DJBECXtc8PopBGy+hsRQrgIeWG+jBsUpDKD2b8yK T93wNc5s= X-Gm-Gg: ASbGncvSWmEUALS2Vuq9th/Xg1jd4Jctz3aVEyCnXLM4Y1dt7U9069uPp09mIyzDYit MI82PxMetLBSlSeBNDVdLZSRyuWoE7fBw3gzu6Y9fmPm2ahqLH//Vi0EA/5mwmXDfXIAUoAVbTd MMNUIUdtKu9SLostghLOg7/fiholzBzQtqYhjdoapKc9D9DwCZz/VV8fISkGX+yi7uAG6GYtNYX 4dz/8MGOsLf83DO61yl4MGn4A3niA5Gu9g29dLfp5gbI0RUyiUp+HFLYtdgiQs08msa9tHcDqQr s4KhkIna6XBbhriMoYw05EX2sOuTcqvQVnQIiiXiDFa4JJPiy0MO6IdxDdWSAlxAqTOJoSkttzt NywMbkT8azkw3sPZt9Qd/LlBXL8rL3Qi4FeUzdtPFX16U+T0bW8uYzYT71BsTasr0szYLmGfApx JxtYUZjp1Ovxi813vVcq1jCHwnfYEpt/ATkJLn9ksFSvMM8f2zHzgLCAC4NAzm3vhh9W8YAb2Sk iPtyA== X-Google-Smtp-Source: AGHT+IEhYt6l8Tv6P+rAi+PuUj4PoDBlOvFNfnReXaRXKr9d4cV7VsQVbWOWrIK5BppbaZfw1ON6ZQ== X-Received: by 2002:a05:600c:4506:b0:477:7bca:8b2b with SMTP id 5b1f17b1804b1-477c0190e57mr3754645e9.15.1763680847459; Thu, 20 Nov 2025 15:20:47 -0800 (PST) Received: from inspiron14p-linux.ht.home (188-141-3-146.dynamic.upc.ie. [188.141.3.146]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-477bf3af0ecsm11618415e9.9.2025.11.20.15.20.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 20 Nov 2025 15:20:46 -0800 (PST) From: Bryan O'Donoghue To: libcamera-devel@lists.libcamera.org Cc: pavel@ucw.cz, Bryan O'Donoghue , Robert Mader , Kieran Bingham , Milan Zamazal Subject: [PATCH 13/22] libcamera: software_isp: Make output DMA sync contingent Date: Thu, 20 Nov 2025 23:20:10 +0000 Message-ID: <20251120232019.3590-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.51.2 In-Reply-To: <20251120232019.3590-1-bryan.odonoghue@linaro.org> References: <20251120232019.3590-1-bryan.odonoghue@linaro.org> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The DMA sync output buffer from the GPU need only have its cache invalidated if the CPU is going to modify the buffer. Right now this is not required for gpuisp so only act on the output buffer if it is non-null. Suggested-by: Robert Mader Reviewed-by: Kieran Bingham Reviewed-by: Milan Zamazal Signed-off-by: Bryan O'Donoghue --- src/libcamera/software_isp/debayer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp index 795c68af7..8a53437e9 100644 --- a/src/libcamera/software_isp/debayer.cpp +++ b/src/libcamera/software_isp/debayer.cpp @@ -230,8 +230,10 @@ void Debayer::dmaSyncBegin(std::vector &dmaSyncers, FrameBuffer *inpu for (const FrameBuffer::Plane &plane : input->planes()) dmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Read); - for (const FrameBuffer::Plane &plane : output->planes()) - dmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write); + if (output) { + for (const FrameBuffer::Plane &plane : output->planes()) + dmaSyncers.emplace_back(plane.fd, DmaSyncer::SyncType::Write); + } } } /* namespace libcamera */