[libcamera-devel,1/3] libcamera: pipeline: rkisp1: Stop IPA before streams
diff mbox series

Message ID 20210406182335.85847-2-nfraprado@collabora.com
State Accepted
Commit 330ea9d946f97001593f65a08276c44076fb0f10
Headers show
Series
  • libcamera: pipeline: rkisp1: Fix issues exposed by lc-compliance
Related show

Commit Message

Nícolas F. R. A. Prado April 6, 2021, 6:23 p.m. UTC
The IPA should be stopped before stopping the streams in order to avoid
a "No BufferCache available to queue" issue.

This issue happened while running lc-compliance.

Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
 src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Niklas Söderlund April 14, 2021, 2:07 p.m. UTC | #1
Hi Nícolas,

Thanks for your work.

On 2021-04-06 15:23:33 -0300, Nícolas F. R. A. Prado wrote:
> The IPA should be stopped before stopping the streams in order to avoid
> a "No BufferCache available to queue" issue.
> 
> This issue happened while running lc-compliance.
> 
> Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 037573270d1e..c122c9be2afd 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -827,6 +827,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
>  
>  	isp_->setFrameStartEnabled(false);
>  
> +	data->ipa_->stop();
> +
>  	selfPath_.stop();
>  	mainPath_.stop();
>  
> @@ -840,8 +842,6 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
>  		LOG(RkISP1, Warning)
>  			<< "Failed to stop parameters for " << camera->id();
>  
> -	data->ipa_->stop();
> -
>  	data->frameInfo_.clear();
>  
>  	freeBuffers(camera);
> -- 
> 2.31.1
>
Kieran Bingham April 14, 2021, 2:11 p.m. UTC | #2
Hi Nicolas,

On 06/04/2021 19:23, Nícolas F. R. A. Prado wrote:
> The IPA should be stopped before stopping the streams in order to avoid
> a "No BufferCache available to queue" issue.
> 
> This issue happened while running lc-compliance.
> 
> Suggested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

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

> ---
>  src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> index 037573270d1e..c122c9be2afd 100644
> --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
> @@ -827,6 +827,8 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
>  
>  	isp_->setFrameStartEnabled(false);
>  
> +	data->ipa_->stop();
> +
>  	selfPath_.stop();
>  	mainPath_.stop();
>  
> @@ -840,8 +842,6 @@ void PipelineHandlerRkISP1::stop(Camera *camera)
>  		LOG(RkISP1, Warning)
>  			<< "Failed to stop parameters for " << camera->id();
>  
> -	data->ipa_->stop();
> -
>  	data->frameInfo_.clear();
>  
>  	freeBuffers(camera);
>

Patch
diff mbox series

diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
index 037573270d1e..c122c9be2afd 100644
--- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp
+++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp
@@ -827,6 +827,8 @@  void PipelineHandlerRkISP1::stop(Camera *camera)
 
 	isp_->setFrameStartEnabled(false);
 
+	data->ipa_->stop();
+
 	selfPath_.stop();
 	mainPath_.stop();
 
@@ -840,8 +842,6 @@  void PipelineHandlerRkISP1::stop(Camera *camera)
 		LOG(RkISP1, Warning)
 			<< "Failed to stop parameters for " << camera->id();
 
-	data->ipa_->stop();
-
 	data->frameInfo_.clear();
 
 	freeBuffers(camera);