[PATCH v1] ipa: rpi: Fix incorrect cast for ExposureTime ControlInfo
David Plowman
david.plowman at raspberrypi.com
Thu Feb 13 10:49:51 CET 2025
Hi Naush
Thanks for fixing this.
On Thu, 13 Feb 2025 at 08:58, Naushir Patuck <naush at raspberrypi.com> wrote:
>
> controls::ExposureTime is of type ControlTypeInteger32, but the
> default ControlInfoMap casts a value to int64_t causing incorrect
> initialisation of the associated ControlInfo.
>
> Fix this by casting correctly to int32_t.
>
> Fixes: bea2db5e ("ipa: rpi: Apply default ControlInfo values for sensor controls")
> Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
Reviewed-by: David Plowman <david.plowman at raspberrypi.com>
David
> ---
> src/ipa/rpi/common/ipa_base.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/ipa/rpi/common/ipa_base.cpp b/src/ipa/rpi/common/ipa_base.cpp
> index d5948c4a1ef4..6734c32ed1b1 100644
> --- a/src/ipa/rpi/common/ipa_base.cpp
> +++ b/src/ipa/rpi/common/ipa_base.cpp
> @@ -62,7 +62,7 @@ const ControlInfoMap::Map ipaControls{
> static_cast<int32_t>(controls::ExposureTimeModeManual),
> static_cast<int32_t>(controls::ExposureTimeModeAuto)) },
> { &controls::ExposureTime,
> - ControlInfo(1, 66666, static_cast<int64_t>(defaultExposureTime.get<std::micro>())) },
> + ControlInfo(1, 66666, static_cast<int32_t>(defaultExposureTime.get<std::micro>())) },
> { &controls::AnalogueGainMode,
> ControlInfo(static_cast<int32_t>(controls::AnalogueGainModeAuto),
> static_cast<int32_t>(controls::AnalogueGainModeManual),
> --
> 2.43.0
>
More information about the libcamera-devel
mailing list