[libcamera-devel] [PATCH 3/8] libcamera: pipeline: ipu3: Reset sequence counts to zero on stop

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Mar 12 07:11:26 CET 2021


Reset the request sequence counter back to zero when a camera has
stopped, giving each camera run an independent sequence stream.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>

---
RFC: This again would be perhaps better handled by the base class to
ensure all pipeline handlers handle this in a consistent manner.

 src/libcamera/pipeline/ipu3/ipu3.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
index a61e2b51ef9e..3d3bd4a43c23 100644
--- a/src/libcamera/pipeline/ipu3/ipu3.cpp
+++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
@@ -780,6 +780,8 @@ void PipelineHandlerIPU3::stop(Camera *camera)
 		LOG(IPU3, Fatal) << "There are still requests to complete.";
 
 	freeBuffers(camera);
+
+	data->requestSequence_ = 0;
 }
 
 int PipelineHandlerIPU3::queueRequestDevice(Camera *camera, Request *request)
-- 
2.25.1



More information about the libcamera-devel mailing list