[libcamera-devel,v2,09/13] libcamera: ipu3: Report pipeline depth
diff mbox series

Message ID 20201020180534.36855-10-jacopo@jmondi.org
State Superseded
Headers show
Series
  • libcamera: Introduce draft controls
Related show

Commit Message

Jacopo Mondi Oct. 20, 2020, 6:05 p.m. UTC
Report for each request the pipeline depth describing the number of
processing steps the frames went through.

Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 src/libcamera/pipeline/ipu3/ipu3.cpp | 2 ++
 1 file changed, 2 insertions(+)

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index 4cbd7ba3007b..ce14e5083ed6 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -840,6 +840,7 @@  void IPU3CameraData::imguOutputBufferReady(FrameBuffer *buffer)
 		return;
 
 	/* Mark the request as complete. */
+	request->metadata().set(controls::draft::PipelineDepth, 3);
 	pipe_->completeRequest(camera_, request);
 }
 
@@ -865,6 +866,7 @@  void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)
 	if (request->findBuffer(&rawStream_)) {
 		bool isComplete = pipe_->completeBuffer(camera_, request, buffer);
 		if (isComplete) {
+			request->metadata().set(controls::draft::PipelineDepth, 2);
 			pipe_->completeRequest(camera_, request);
 			return;
 		}