[v6,5/5] pipeline: simple: Reset delayedCtrls at start.
diff mbox series

Message ID 20250305135256.801351-6-stanislaw.gruszka@linux.intel.com
State New
Headers show
Series
  • libcamera: start frame events changes
Related show

Commit Message

Stanislaw Gruszka March 5, 2025, 1:52 p.m. UTC
Similar like in other pipelines (IPU3, rpi) avoid using stale
values of DelayedControls class when the same camera is started
second time.

Co-developed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>
---
 src/libcamera/pipeline/simple/simple.cpp | 1 +
 1 file changed, 1 insertion(+)

Comments

Stefan Klug March 31, 2025, 3:56 p.m. UTC | #1
Hi Stanislaw,

Thank you for the patch. 

On Wed, Mar 05, 2025 at 02:52:56PM +0100, Stanislaw Gruszka wrote:
> Similar like in other pipelines (IPU3, rpi) avoid using stale
> values of DelayedControls class when the same camera is started
> second time.
> 
> Co-developed-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>

Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>

Cheers,
Stefan

> ---
>  src/libcamera/pipeline/simple/simple.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 58aa3dba..659b1123 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -1376,6 +1376,7 @@ int SimplePipelineHandler::start(Camera *camera, [[maybe_unused]] const ControlL
>  
>  	video->bufferReady.connect(data, &SimpleCameraData::imageBufferReady);
>  
> +	data->delayedCtrls_->reset();
>  	if (frameStartEmitter) {
>  		ret = frameStartEmitter->setFrameStartEnabled(true);
>  		if (ret) {
> -- 
> 2.43.0
>
Kieran Bingham March 31, 2025, 4:53 p.m. UTC | #2
Quoting Stanislaw Gruszka (2025-03-05 13:52:56)
> Similar like in other pipelines (IPU3, rpi) avoid using stale
> values of DelayedControls class when the same camera is started
> second time.
> 
> Co-developed-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
> Signed-off-by: Stanislaw Gruszka <stanislaw.gruszka@linux.intel.com>

Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

> ---
>  src/libcamera/pipeline/simple/simple.cpp | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
> index 58aa3dba..659b1123 100644
> --- a/src/libcamera/pipeline/simple/simple.cpp
> +++ b/src/libcamera/pipeline/simple/simple.cpp
> @@ -1376,6 +1376,7 @@ int SimplePipelineHandler::start(Camera *camera, [[maybe_unused]] const ControlL
>  
>         video->bufferReady.connect(data, &SimpleCameraData::imageBufferReady);
>  
> +       data->delayedCtrls_->reset();
>         if (frameStartEmitter) {
>                 ret = frameStartEmitter->setFrameStartEnabled(true);
>                 if (ret) {
> -- 
> 2.43.0
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/simple/simple.cpp b/src/libcamera/pipeline/simple/simple.cpp
index 58aa3dba..659b1123 100644
--- a/src/libcamera/pipeline/simple/simple.cpp
+++ b/src/libcamera/pipeline/simple/simple.cpp
@@ -1376,6 +1376,7 @@  int SimplePipelineHandler::start(Camera *camera, [[maybe_unused]] const ControlL
 
 	video->bufferReady.connect(data, &SimpleCameraData::imageBufferReady);
 
+	data->delayedCtrls_->reset();
 	if (frameStartEmitter) {
 		ret = frameStartEmitter->setFrameStartEnabled(true);
 		if (ret) {