[libcamera-devel] [PATCH] libcamera: ipu3: Do not over-write metadata

Kieran Bingham kieran.bingham at ideasonboard.com
Fri Feb 19 14:46:02 CET 2021


Hi Jacopo,

On 19/02/2021 11:22, Jacopo Mondi wrote:
> When a Request is completed upon receiving the IPA produced metadata,
> the metadata associated with the Request are over-written, deleting
> the information set, in example, at ImgU output buffer completion time.
> 
> If any additional Request metadata should be registered by inspecting
> the IPA produced metadata it has to be done without deleting the already
> registered entries.
> 
> Fix this by replacing the metadata over-write with a todo entry.
> 
> This change fixes CTS which was broken due to missing metadata in
> the completed requests.
> 
> Fixes: 9708f49fecf2 ("libcamera: ipu3: Share parameter and statistic buffers with IPA")
> Signed-off-by: Jacopo Mondi <jacopo at jmondi.org>
> ---
>  src/libcamera/pipeline/ipu3/ipu3.cpp | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/ipu3/ipu3.cpp b/src/libcamera/pipeline/ipu3/ipu3.cpp
> index 2aed826a892a..9e867ab2e98a 100644
> --- a/src/libcamera/pipeline/ipu3/ipu3.cpp
> +++ b/src/libcamera/pipeline/ipu3/ipu3.cpp
> @@ -1101,8 +1101,11 @@ void IPU3CameraData::queueFrameAction(unsigned int id,
>  		if (!info)
>  			break;
> 
> +		/*
> +		 * \todo Parse the value of the controls returned by the IPA
> +		 * in action.controls to register additional request metadata.
> +		 */
>  		Request *request = info->request;
> -		request->metadata() = action.controls;

I'm wondering if our objects let us do metadata() += controls; here, but
I only as a query if we can update control lists with anther list,
rathar than overwrite it, which is perhaps what was inteneded here.

But even still - it needs full consideration, so it's better removed
until it's actually needed and used.

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

>  		info->metadataProcessed = true;
>  		if (frameInfos_.tryComplete(info))
>  			pipe_->completeRequest(request);
> --
> 2.30.0
> 
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel at lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel
> 

-- 
Regards
--
Kieran


More information about the libcamera-devel mailing list