Message ID | 20250923190657.21453-2-hansg@kernel.org |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Hans, thank you for the patch. Hans de Goede <hansg@kernel.org> writes: > Currently context_.configuration.agc.againMin is not initialized > when the control reports a non 0 minumum gain value. > > So far only the againMin == 0 case was handled and > context_.configuration.agc.againMin was left unset otherwise. > > Signed-off-by: Hans de Goede <hansg@kernel.org> Reviewed-by: Milan Zamazal <mzamazal@redhat.com> > --- > src/ipa/simple/soft_simple.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp > index c94c4cd55..e70439ee5 100644 > --- a/src/ipa/simple/soft_simple.cpp > +++ b/src/ipa/simple/soft_simple.cpp > @@ -246,7 +246,9 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) > * other) we limit the range of the gain values used. > */ > context_.configuration.agc.againMax = againMax; > - if (!againMin) { > + if (againMin) { > + context_.configuration.agc.againMin = againMin; > + } else { > LOG(IPASoft, Warning) > << "Minimum gain is zero, that can't be linear"; > context_.configuration.agc.againMin =
Hi Hans, Thank you for the patch! Quoting Hans de Goede (2025-09-23 20:06:53) > Currently context_.configuration.agc.againMin is not initialized > when the control reports a non 0 minumum gain value. > > So far only the againMin == 0 case was handled and > context_.configuration.agc.againMin was left unset otherwise. > > Signed-off-by: Hans de Goede <hansg@kernel.org> > --- > src/ipa/simple/soft_simple.cpp | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp > index c94c4cd55..e70439ee5 100644 > --- a/src/ipa/simple/soft_simple.cpp > +++ b/src/ipa/simple/soft_simple.cpp > @@ -246,7 +246,9 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) > * other) we limit the range of the gain values used. > */ > context_.configuration.agc.againMax = againMax; > - if (!againMin) { > + if (againMin) { > + context_.configuration.agc.againMin = againMin; > + } else { Nice! Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com> > LOG(IPASoft, Warning) > << "Minimum gain is zero, that can't be linear"; > context_.configuration.agc.againMin = > -- > 2.51.0 > Best wishes, Isaac
diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp index c94c4cd55..e70439ee5 100644 --- a/src/ipa/simple/soft_simple.cpp +++ b/src/ipa/simple/soft_simple.cpp @@ -246,7 +246,9 @@ int IPASoftSimple::configure(const IPAConfigInfo &configInfo) * other) we limit the range of the gain values used. */ context_.configuration.agc.againMax = againMax; - if (!againMin) { + if (againMin) { + context_.configuration.agc.againMin = againMin; + } else { LOG(IPASoft, Warning) << "Minimum gain is zero, that can't be linear"; context_.configuration.agc.againMin =
Currently context_.configuration.agc.againMin is not initialized when the control reports a non 0 minumum gain value. So far only the againMin == 0 case was handled and context_.configuration.agc.againMin was left unset otherwise. Signed-off-by: Hans de Goede <hansg@kernel.org> --- src/ipa/simple/soft_simple.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)