From patchwork Wed Dec 10 00:31:30 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: 25409 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 8F5B2BD1F1 for ; Wed, 10 Dec 2025 00:32:34 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 58B5761440; Wed, 10 Dec 2025 01:32:34 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.b="fcrmwljK"; dkim-atps=neutral Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 106B161440 for ; Wed, 10 Dec 2025 01:32:32 +0100 (CET) Received: by mail-pf1-x42f.google.com with SMTP id d2e1a72fcca58-7bb710d1d1dso9835503b3a.1 for ; Tue, 09 Dec 2025 16:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1765326750; x=1765931550; 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=Kob/ToaFoFnln8JxOvYeUhkJB1Nasllbl3ZD4CR3Ky8=; b=fcrmwljKvbPc07hCSe8GLT4xGUkRLzP9o3dvlVAlwlJBACgl7M3xgruKt5C7h3wkci MAqI6go69+RpiFgLA8yC0Bzt+dSoT1YrA36W7z9Qx0nfWgeq2Yvn9vyyfQF36DoYhB6p zXllZDu1T1nFEc62dtWm61OER9Vhp3NYX91nZNuan5mKVEiMnT33rp4UX1SpZ3AZsfLm Xj+UV8Yc4/MqgMB/6oPoORQr5hgo5POSg8yQ3izEBg1eriKZiN2QFYiF1uchkewugr65 F9RZJDv/I34S3yb7k5iwIniblLN5dYJ8/cNNGK2suVKeTOlgEhumEEjms7f0Y0NoW+FP /JrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1765326750; x=1765931550; 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=Kob/ToaFoFnln8JxOvYeUhkJB1Nasllbl3ZD4CR3Ky8=; b=WLMG6oqYwHOQabU0yYZFsRKoHLxm/2zDG0+Q1NinwwPtByKGaPcKdSjhDWhpbHWq/i Jx1CZeKpOi+dAs8K4eZQ9nraHN7Yz4Gha3tIhCZf/1tYpJtKXicJbRxImGsSlhNKGXQy wqEt6voIHPqrg1lMfk23NpgFyyhOI6QVBQNNoCKJH/LMCBvaYo0p5YwkLJENcyeDxEy7 +ZIAe6clrk7JMlHopSGuOqMQZMrSDuS6WonKIcnhYnDNA7M+uNO00CigkilMJoNpRpy0 31k2uKOtYadHJbrLxa6xrNxwRT0TDeZHoO1cpV6N0tT65t3+XvArIchRv6/9BVpvk1ll /TJg== X-Gm-Message-State: AOJu0Ywn51iKb5dMF4PjDlUGsUt5GsK8ts136YpEFfUMfG0t4JZNOw4j QU59FIpuiebVQZVemHesnhKhC/5w3k/n92f3HPO0/0OD63YFdVtifu8Jn3IdBtSgRWJH0JWyaka RlS+6 X-Gm-Gg: ASbGnctnC6D7Ih385u18Pd1I9ag7HmYpS82itUxr3KGDAnr9jzLgLKDHXL/WbKX6j/n ZcT9F6uxkZM5R1ohYWfWJBw7+L1nN/Yw0n4gF5BC/OWRRlhtX3iBR6rBg6jJPkC4FzR34L/zdyK r3EaZgIho3wnTXbEQ4NmoZLpV4GQyysGnVxOwiyUP/cA4l9ZjbJlGyY5v67zLaw0yVRAByzIYXs CFmB2Auuzz1dG66Jm3L003RkouehZcBlCegLJ0DDFmRwynAfqmP0Pm56Pxz9Ys9uxau00F4pkf6 A9CqQzPvSzfaaDz+0pNph0hi0P9jAf/gLW9I9wYmmHgrW45CxXondv/wXzGuhjWRRDhTDtJ1GQy Id2X449sjrucyrCcIf8avAO8HD80WJHi+k/NQ9qveE32sUw0pndnLEFgSUGa6vnk1+uJJVAPk8p 5h2BCkx7sm1wX8wnNjaFQcN7IgQkXajXYoDcTi5muWTlk7AxK+2T7oxGj5qLg8rJAB X-Google-Smtp-Source: AGHT+IGKx1qi/wEHeP1G1K/SbzYebMbCKQ9EOziGrQDB7xHsypg8TkCpybXOeoh1cG+Q2qqti7/UTA== X-Received: by 2002:a05:6a20:12c1:b0:34e:7bef:e820 with SMTP id adf61e73a8af0-366e28890f5mr499598637.41.1765326750358; Tue, 09 Dec 2025 16:32:30 -0800 (PST) Received: from inspiron14p-linux (p96936b06.osaknt01.ap.so-net.ne.jp. [150.147.107.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-34a70427ea6sm566580a91.3.2025.12.09.16.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Dec 2025 16:32:29 -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 v4 13/20] libcamera: software_isp: Make output DMA sync contingent Date: Wed, 10 Dec 2025 00:31:30 +0000 Message-ID: <20251210003139.43606-14-bryan.odonoghue@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20251210003139.43606-1-bryan.odonoghue@linaro.org> References: <20251210003139.43606-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 544921656..158128f30 100644 --- a/src/libcamera/software_isp/debayer.cpp +++ b/src/libcamera/software_isp/debayer.cpp @@ -373,8 +373,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 */