[PATCH 5/5] libcamera: ipu3: Return Raw buffers on error
Dan Scally
dan.scally at ideasonboard.com
Tue Mar 5 14:33:27 CET 2024
Hi Jacopo
On 21/02/2024 17:40, Jacopo Mondi wrote:
> When a Request is cancelled, all its application-provided buffers
> are completed and the paramters and stats buffer are made available
> again to the pipeline handler.
>
> If the RAW buffer doesn't come from the application (no RAW stream
> requested) it comes from the CIO2Device internal pool. Return it to
> the CIO2 pool in case of error.
>
> Signed-off-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>
> ---
That one's a good catch!
Reviewed-by: Daniel Scally <dan.scally at ideasonboard.com>
> src/libcamera/pipeline/ipu3/ipu3.cpp | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index f61e4a10892e..bcbcfd3dc290 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1393,6 +1393,9 @@ void IPU3CameraData::cio2BufferReady(FrameBuffer *buffer)
> availableParamBuffers_.push(request->paramBuffer);
> availableStatBuffers_.push(request->statBuffer);
>
> + /* Return RAW buffer to the CIO2. */
> + cio2_.tryReturnBuffer(buffer);
> +
> pipe()->completeRequest(request->_o<Request>());
> return;
> }
More information about the libcamera-devel
mailing list