bcm27xx: add linux 5.4 support
[openwrt/openwrt.git] / target / linux / bcm27xx / patches-5.4 / 950-0318-v4l2-Add-a-Greyworld-AWB-mode.patch
1 From 1b14387d6b699c4cfc8218867997b1508a67167a Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Fri, 6 Sep 2019 15:04:51 +0100
4 Subject: [PATCH] v4l2: Add a Greyworld AWB mode.
5
6 Adds a simple greyworld white balance preset, mainly for use
7 with cameras without an IR filter (eg Raspberry Pi NoIR)
8
9 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
10 ---
11 drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
12 include/uapi/linux/v4l2-controls.h | 1 +
13 2 files changed, 2 insertions(+)
14
15 --- a/drivers/media/v4l2-core/v4l2-ctrls.c
16 +++ b/drivers/media/v4l2-core/v4l2-ctrls.c
17 @@ -271,6 +271,7 @@ const char * const *v4l2_ctrl_get_menu(u
18 "Flash",
19 "Cloudy",
20 "Shade",
21 + "Greyworld",
22 NULL,
23 };
24 static const char * const camera_iso_sensitivity_auto[] = {
25 --- a/include/uapi/linux/v4l2-controls.h
26 +++ b/include/uapi/linux/v4l2-controls.h
27 @@ -850,6 +850,7 @@ enum v4l2_auto_n_preset_white_balance {
28 V4L2_WHITE_BALANCE_FLASH = 7,
29 V4L2_WHITE_BALANCE_CLOUDY = 8,
30 V4L2_WHITE_BALANCE_SHADE = 9,
31 + V4L2_WHITE_BALANCE_GREYWORLD = 10,
32 };
33
34 #define V4L2_CID_WIDE_DYNAMIC_RANGE (V4L2_CID_CAMERA_CLASS_BASE+21)