[libcamera-devel] [PATCH v3 2/3] pipeline: ipa: rpi: Return lens controls from ipa->configure()

Jacopo Mondi jacopo.mondi at ideasonboard.com
Tue Jun 6 15:38:13 CEST 2023


Hi Naush

On Mon, Jun 05, 2023 at 10:14:05AM +0100, Naushir Patuck via libcamera-devel wrote:
> In addition to sensor controls, return lens controls from
> IpaBase::configure() back to the pipeline handler. If there are lens
> controls present in the ControlList, action them in the pipeline handler
> as part of the configure routine.
>
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
> Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>

2/3 and 3/3 could be squashed
for both
Reviewed-by: Jacopo Mondi <jacopo.mondi at ideasonboard.com>

Thanks
   j

> ---
>  include/libcamera/ipa/raspberrypi.mojom             | 3 ++-
>  src/ipa/rpi/common/ipa_base.cpp                     | 2 +-
>  src/libcamera/pipeline/rpi/common/pipeline_base.cpp | 6 ++++--
>  3 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/include/libcamera/ipa/raspberrypi.mojom b/include/libcamera/ipa/raspberrypi.mojom
> index ba786e647ca1..4f20792e4679 100644
> --- a/include/libcamera/ipa/raspberrypi.mojom
> +++ b/include/libcamera/ipa/raspberrypi.mojom
> @@ -46,7 +46,8 @@ struct ConfigParams {
>  struct ConfigResult {
>  	float modeSensitivity;
>  	libcamera.ControlInfoMap controlInfo;
> -	libcamera.ControlList controls;
> +	libcamera.ControlList sensorControls;
> +	libcamera.ControlList lensControls;
>  };
>
>  struct StartResult {
> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp
> index db7a0eb3a1ca..599ad146a863 100644
> --- a/src/ipa/rpi/common/ipa_base.cpp
> +++ b/src/ipa/rpi/common/ipa_base.cpp
> @@ -201,7 +201,7 @@ int32_t IpaBase::configure(const IPACameraSensorInfo &sensorInfo, const ConfigPa
>  		applyAGC(&agcStatus, ctrls);
>  	}
>
> -	result->controls = std::move(ctrls);
> +	result->sensorControls = std::move(ctrls);
>
>  	/*
>  	 * Apply the correct limits to the exposure, gain and frame duration controls
> diff --git a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> index 3bb5ec531e4f..2ab0b971149a 100644
> --- a/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> +++ b/src/libcamera/pipeline/rpi/common/pipeline_base.cpp
> @@ -1192,8 +1192,10 @@ int CameraData::configureIPA(const CameraConfiguration *config, ipa::RPi::Config
>  		return -EPIPE;
>  	}
>
> -	if (!result->controls.empty())
> -		setSensorControls(result->controls);
> +	if (!result->sensorControls.empty())
> +		setSensorControls(result->sensorControls);
> +	if (!result->lensControls.empty())
> +		setLensControls(result->lensControls);
>
>  	return 0;
>  }
> --
> 2.34.1
>


More information about the libcamera-devel mailing list