ipa: ipu3: agc: Reset frame count when configuring AGC

The frame count is used to skip the gain and exposure filtering when
starting. It thus needs to be reset when configuring the algorithm, to
avoid slower convergence when stopping and restarting.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com>
Reviewed-by: Umang Jain <umang.jain@ideasonboard.com>
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
diff --git a/src/ipa/ipu3/algorithms/agc.cpp b/src/ipa/ipu3/algorithms/agc.cpp
index 1eb1bce..70cff3f 100644
--- a/src/ipa/ipu3/algorithms/agc.cpp
+++ b/src/ipa/ipu3/algorithms/agc.cpp
@@ -102,6 +102,7 @@
 	frameContext.agc.gain = std::max(minAnalogueGain_, kMinAnalogueGain);
 	frameContext.agc.exposure = 10ms / configuration.sensor.lineDuration;
 
+	frameCount_ = 0;
 	return 0;
 }