[libcamera-devel] [PATCH] pipeline: raspberrypi: Create empty control list correctly

Laurent Pinchart laurent.pinchart at ideasonboard.com
Mon Oct 4 16:18:02 CEST 2021


Hi David,

Thank you for the patch.

On Mon, Oct 04, 2021 at 02:52:07PM +0100, David Plowman wrote:
> When the start() method is supplied with a NULL list of controls, we
> send an empty control list to the IPA. When the IPA is running in
> isolated mode the control list goes through the data serializer, for
> which it must be marked correctly as a list of "controls::controls",
> otherwise the IPA process will abort.
> 
> Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
> ---
>  src/libcamera/pipeline/raspberrypi/raspberrypi.cpp | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> index 0bdfa727..87836996 100644
> --- a/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> +++ b/src/libcamera/pipeline/raspberrypi/raspberrypi.cpp
> @@ -825,7 +825,8 @@ int PipelineHandlerRPi::start(Camera *camera, const ControlList *controls)
>  
>  	/* Start the IPA. */
>  	ipa::RPi::StartConfig startConfig;
> -	data->ipa_->start(controls ? *controls : ControlList{}, &startConfig);
> +	ControlList emptyControls(controls::controls);
> +	data->ipa_->start(controls ? *controls : emptyControls, &startConfig);

Wouldn't it be better to change the IPA start() method to take a
ControlList pointer, and pass nullptr when no controls are provided ?

>  
>  	/* Apply any gain/exposure settings that the IPA may have passed back. */
>  	if (!startConfig.controls.empty())

-- 
Regards,

Laurent Pinchart


More information about the libcamera-devel mailing list