[v3,13/39] libcamera: software_isp: Make output DMA sync contingent
diff mbox series

Message ID 20251015012251.17508-14-bryan.odonoghue@linaro.org
State New
Headers show
Series
  • Add GLES 2.0 GPUISP to libcamera
Related show

Commit Message

Bryan O'Donoghue Oct. 15, 2025, 1:22 a.m. UTC
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 <robert.mader@collabora.com>
Signed-off-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
---
 src/libcamera/software_isp/debayer.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/src/libcamera/software_isp/debayer.cpp b/src/libcamera/software_isp/debayer.cpp
index 847067aa..96737c45 100644
--- a/src/libcamera/software_isp/debayer.cpp
+++ b/src/libcamera/software_isp/debayer.cpp
@@ -223,8 +223,10 @@  void Debayer::dmaSyncBegin(std::vector<DmaSyncer> &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 */