]> git.baikalelectronics.ru Git - kernel.git/commit
media: atmel: atmel-isc-base: clamp wb gain coefficients
authorEugen Hristev <eugen.hristev@microchip.com>
Mon, 13 Dec 2021 13:49:36 +0000 (14:49 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Sun, 23 Jan 2022 20:18:44 +0000 (21:18 +0100)
commitcd56e40b4c2ce5a754b355d155d5d8f82c18cc1f
tree569cff4a521113d902b44a3e8873d140b6ea0211
parentab9a9349be20eb70385852607eda3e585ed553d7
media: atmel: atmel-isc-base: clamp wb gain coefficients

White balance computed gains can overflow above the 13 bits hardware
coefficient that can be used, in some specific scenarios like a subexposure
from the sensor when the image is mostly black.
In this case the computed gain has to be clamped to the maximum value
allowed by the hardware.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Reviewed-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/atmel/atmel-isc-base.c