]> www.infradead.org Git - users/jedix/linux-maple.git/commit
media: v4l2-ctrls: Add V4L2_CID_NOTIFY_GAINS control
authorDavid Plowman <david.plowman@raspberrypi.com>
Mon, 16 Aug 2021 11:39:08 +0000 (13:39 +0200)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Sat, 21 Aug 2021 07:09:05 +0000 (09:09 +0200)
commit5ea47993c14d6c3cd885452ddbc5c8f3ac917d7a
treea0b1c5a59769337036f4e03c78b00e87c0fd69e1
parentfbe8c9fb0e2eedaf2d29e202fffc63ad6ecf0229
media: v4l2-ctrls: Add V4L2_CID_NOTIFY_GAINS control

We add a new control V4L2_CID_NOTIFY_GAINS which allows the sensor to
be notified what gains will be applied to the different colour
channels by subsequent processing (such as by an ISP), even though the
sensor will not apply any of these gains itself.

For Bayer sensors this will be an array control taking 4 values which
are the 4 gains arranged in the fixed order B, Gb, Gr and R,
irrespective of the exact Bayer order of the sensor itself. The use of
an array makes it straightforward to extend this control to non-Bayer
sensors (for example, sensors with an RGBW pattern) in future.

The units are in all cases linear with the default value indicating a
gain of exactly 1.0. For example, if the default value were reported as
128 then the value 192 would represent a gain of exactly 1.5.

Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/v4l2-core/v4l2-ctrls-defs.c
include/uapi/linux/v4l2-controls.h