[1/7] libcamera: rkisp1: Fix scope of dewarper stop() exit action
diff mbox series

Message ID 20241120085753.1993436-2-stefan.klug@ideasonboard.com
State Superseded
Headers show
Series
  • rkisp1: Fix aspect ratio and ScalerCrop
Related show

Commit Message

Stefan Klug Nov. 20, 2024, 8:57 a.m. UTC
Move the definition of the dewarper stop() action into the scope were
the corresponding start() happens.

Fixes: 12b553d691d4 ("libcamera: rkisp1: Plumb the dw100 dewarper as V4L2M2M converter")
Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Elder Nov. 20, 2024, 10:56 a.m. UTC | #1
On Wed, Nov 20, 2024 at 09:57:40AM +0100, Stefan Klug wrote:
> Move the definition of the dewarper stop() action into the scope were
> the corresponding start() happens.
> 
> Fixes: 12b553d691d4 ("libcamera: rkisp1: Plumb the dw100 dewarper as V4L2M2M converter")
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 6c6d711f91b3..5ffcfbce56be 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -1043,8 +1043,8 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL
>  				LOG(RkISP1, Error) << "Failed to start dewarper";
>  				return ret;
>  			}
> +			actions += [&]() { dewarper_->stop(); };
>  		}
> -		actions += [&]() { dewarper_->stop(); };
>  	}
>  
>  	if (data->mainPath_->isEnabled()) {
> -- 
> 2.43.0
>
Jacopo Mondi Nov. 21, 2024, 8:55 a.m. UTC | #2
Hi Stefan

On Wed, Nov 20, 2024 at 09:57:40AM +0100, Stefan Klug wrote:
> Move the definition of the dewarper stop() action into the scope were
> the corresponding start() happens.
>
> Fixes: 12b553d691d4 ("libcamera: rkisp1: Plumb the dw100 dewarper as V4L2M2M converter")
> Signed-off-by: Stefan Klug <stefan.klug@ideasonboard.com>

indeed

Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>

Thanks
  j

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 6c6d711f91b3..5ffcfbce56be 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -1043,8 +1043,8 @@ int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL
>  				LOG(RkISP1, Error) << "Failed to start dewarper";
>  				return ret;
>  			}
> +			actions += [&]() { dewarper_->stop(); };
>  		}
> -		actions += [&]() { dewarper_->stop(); };
>  	}
>
>  	if (data->mainPath_->isEnabled()) {
> --
> 2.43.0
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 6c6d711f91b3..5ffcfbce56be 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -1043,8 +1043,8 @@  int PipelineHandlerRkISP1::start(Camera *camera, [[maybe_unused]] const ControlL
 				LOG(RkISP1, Error) << "Failed to start dewarper";
 				return ret;
 			}
+			actions += [&]() { dewarper_->stop(); };
 		}
-		actions += [&]() { dewarper_->stop(); };
 	}
 
 	if (data->mainPath_->isEnabled()) {