ipa: raspberrypi: Limit the maximum sensor gain used

Limit the gain code to the maximum value reported by the sensor controls
when sending to DelayedControls. The AGC algorithm will handle a lower
gain used by the sensor, provided it knows the actual gain used. This
change ensures that DelayedControls will never report an unclipped gain
used.

Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
Reviewed-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
1 file changed