[libcamera-devel] [PATCH v3 8/8] libcamera: ipu3: Connect viewfinder's BufferReady signal

Niklas Söderlund niklas.soderlund at ragnatech.se
Fri Apr 5 13:53:48 CEST 2019


Hi Jacopo,

Thanks for your efforts!

On 2019-04-03 17:07:35 +0200, Jacopo Mondi wrote:
> Connect the viewfinder buffer ready signal to the IPU3CameraData slot
> that complets the buffer first, and if not waiting for other buffers
> completes the request as well.
> 
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>

Depending on the outcome of the question in 7/8 I think this patch looks 
good. I would add my tag if I felt comfortable with 7/8.

> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 17e3e8677e28..706e4f647ed7 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -167,7 +167,7 @@ private:
>  		{
>  		}
>  
> -		void imguOutputBufferReady(Buffer *buffer);
> +		void imguCaptureBufferReady(Buffer *buffer);
>  		void imguInputBufferReady(Buffer *buffer);
>  		void cio2BufferReady(Buffer *buffer);
>  
> @@ -755,7 +755,9 @@ int PipelineHandlerIPU3::registerCameras()
>  		data->imgu_->input_->bufferReady.connect(data.get(),
>  					&IPU3CameraData::imguInputBufferReady);
>  		data->imgu_->output_.dev->bufferReady.connect(data.get(),
> -					&IPU3CameraData::imguOutputBufferReady);
> +					&IPU3CameraData::imguCaptureBufferReady);
> +		data->imgu_->viewfinder_.dev->bufferReady.connect(data.get(),
> +					&IPU3CameraData::imguCaptureBufferReady);
>  
>  		/* Create and register the Camera instance. */
>  		std::string cameraName = cio2->sensor_->entityName() + " "
> @@ -799,13 +801,13 @@ void PipelineHandlerIPU3::IPU3CameraData::imguInputBufferReady(Buffer *buffer)
>   *
>   * Buffers completed from the ImgU output are directed to the application.
>   */
> -void PipelineHandlerIPU3::IPU3CameraData::imguOutputBufferReady(Buffer *buffer)
> +void PipelineHandlerIPU3::IPU3CameraData::imguCaptureBufferReady(Buffer *buffer)
>  {
>  	Request *request = requestFromBuffer(buffer);
>  	ASSERT(request);
>  
> -	pipe_->completeBuffer(camera_, request, buffer);
> -	pipe_->completeRequest(camera_, request);
> +	if (pipe_->completeBuffer(camera_, request, buffer))
> +		pipe_->completeRequest(camera_, request);
>  }
>  
>  /**
> -- 
> 2.21.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

-- 
Regards,
Niklas Söderlund


More information about the libcamera-devel mailing list