diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0636-media-v4l2-ctrls-Add-V4L2_CID_NOTIFY_GAINS-control.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0636-media-v4l2-ctrls-Add-V4L2_CID_NOTIFY_GAINS-control.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0636-media-v4l2-ctrls-Add-V4L2_CID_NOTIFY_GAINS-control.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0636-media-v4l2-ctrls-Add-V4L2_CID_NOTIFY_GAINS-control.patch b/target/linux/bcm27xx/patches-5.15/950-0636-media-v4l2-ctrls-Add-V4L2_CID_NOTIFY_GAINS-control.patch new file mode 100644 index 0000000000..67546c062c --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0636-media-v4l2-ctrls-Add-V4L2_CID_NOTIFY_GAINS-control.patch @@ -0,0 +1,51 @@ +From fa9c40c42f2db87e80ac4a89df6a5ecab1b98031 Mon Sep 17 00:00:00 2001 +From: David Plowman <david.plowman@raspberrypi.com> +Date: Mon, 16 Aug 2021 13:39:08 +0200 +Subject: [PATCH] media: v4l2-ctrls: Add V4L2_CID_NOTIFY_GAINS control + +commit a9c80593ff80ddb7c6496624e5384e1ea3460a72 upstream. + +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 | 1 + + include/uapi/linux/v4l2-controls.h | 1 + + 2 files changed, 2 insertions(+) + +--- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c ++++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c +@@ -1109,6 +1109,7 @@ const char *v4l2_ctrl_get_name(u32 id) + case V4L2_CID_TEST_PATTERN_GREENR: return "Green (Red) Pixel Value"; + case V4L2_CID_TEST_PATTERN_BLUE: return "Blue Pixel Value"; + case V4L2_CID_TEST_PATTERN_GREENB: return "Green (Blue) Pixel Value"; ++ case V4L2_CID_NOTIFY_GAINS: return "Notify Gains"; + + /* Image processing controls */ + /* Keep the order of the 'case's the same as in v4l2-controls.h! */ +--- a/include/uapi/linux/v4l2-controls.h ++++ b/include/uapi/linux/v4l2-controls.h +@@ -1123,6 +1123,7 @@ enum v4l2_jpeg_chroma_subsampling { + #define V4L2_CID_TEST_PATTERN_BLUE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 6) + #define V4L2_CID_TEST_PATTERN_GREENB (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 7) + #define V4L2_CID_UNIT_CELL_SIZE (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 8) ++#define V4L2_CID_NOTIFY_GAINS (V4L2_CID_IMAGE_SOURCE_CLASS_BASE + 9) + + + /* Image processing controls */ |