[v2,1/6] ipa: software_isp: Fix context_.configuration.agc.againMin init
diff mbox series

Message ID 20250925221708.7471-2-hansg@kernel.org
State New
Headers show
Series
  • ipa: software_isp: AGC: Fox AGC oscillation bug
Related show

Commit Message

Hans de Goede Sept. 25, 2025, 10:17 p.m. UTC
Currently context_.configuration.agc.againMin is not initialized
when the control reports a non 0 minimum gain value.

So far only the againMin == 0 case was handled and
context_.configuration.agc.againMin was left unset otherwise.

Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com>
Tested-by: Milan Zamazal <mzamazal@redhat.com>
Tested-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Hans de Goede <hansg@kernel.org>
---
 src/ipa/simple/soft_simple.cpp | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/src/ipa/simple/soft_simple.cpp b/src/ipa/simple/soft_simple.cpp
index c94c4cd5..e70439ee 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 =