[PATCH] ipa: rkisp1: agc: Fix build on debian 11 (gcc-9)
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Tue Feb 11 21:24:50 CET 2025
On Tue, Feb 11, 2025 at 06:20:56PM +0100, Stefan Klug wrote:
> Apparently not every compiler is able to deduce types the same way. Fix
> compile on gcc-9 by explicitly specifying the type.
>
> Fixes: ee918b370a08 ("ipa: rkisp1: agc: Initialize enum controls with a list of values")
> Signed-off-by: Stefan Klug <stefan.klug at ideasonboard.com>
If this issue affected recent compilers I'd ask for a more detailed
analysis, and a bug report being filed to gcc. As I can't reproduce it
neither with gcc 9.5.0 nor 10.5.0, that's not necessary. I'm still
curious to know why the compiler doesn't consider the right ControlInfo
constructor though.
Reviewed-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
> ---
>
> Hi all,
>
> Unfortunately I broke the CI build of mainline :-(. This patch fixes it.
> A corresponding CI run is here:
> https://gitlab.freedesktop.org/camera/libcamera/-/pipelines/1362476
>
> Best regards,
> Stefan
>
> src/ipa/rkisp1/algorithms/agc.cpp | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/src/ipa/rkisp1/algorithms/agc.cpp b/src/ipa/rkisp1/algorithms/agc.cpp
> index e7c6de757593..45ec72188b3a 100644
> --- a/src/ipa/rkisp1/algorithms/agc.cpp
> +++ b/src/ipa/rkisp1/algorithms/agc.cpp
> @@ -151,11 +151,11 @@ int Agc::init(IPAContext &context, const YamlObject &tuningData)
> context.ctrlMap[&controls::ExposureTimeMode] =
> ControlInfo({ { ControlValue(controls::ExposureTimeModeAuto),
> ControlValue(controls::ExposureTimeModeManual) } },
> - controls::ExposureTimeModeAuto);
> + ControlValue(controls::ExposureTimeModeAuto));
> context.ctrlMap[&controls::AnalogueGainMode] =
> ControlInfo({ { ControlValue(controls::AnalogueGainModeAuto),
> ControlValue(controls::AnalogueGainModeManual) } },
> - controls::AnalogueGainModeAuto);
> + ControlValue(controls::AnalogueGainModeAuto));
> /* \todo Move this to the Camera class */
> context.ctrlMap[&controls::AeEnable] = ControlInfo(false, true, true);
> context.ctrlMap.merge(controls());
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list