854b0ba147f19c8254201f76792f61d69a2dbaa0
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.10 / 950-0443-uapi-bcm2835-isp-Add-colour-denoise-configuration.patch
1 From aed98a04e57de36ad35d4fd09c5ce0c9cdd580dc Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Thu, 14 Jan 2021 09:18:42 +0000
4 Subject: [PATCH] uapi: bcm2835-isp: Add colour denoise configuration
5
6 Add a configuration structure for colour denoise to the bcm2835_isp
7 driver.
8
9 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
10 ---
11 include/uapi/linux/bcm2835-isp.h | 27 +++++++++++++++++++++++++++
12 1 file changed, 27 insertions(+)
13
14 --- a/include/uapi/linux/bcm2835-isp.h
15 +++ b/include/uapi/linux/bcm2835-isp.h
16 @@ -31,6 +31,8 @@
17 (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0007)
18 #define V4L2_CID_USER_BCM2835_ISP_DPC \
19 (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0008)
20 +#define V4L2_CID_USER_BCM2835_ISP_CDN \
21 + (V4L2_CID_USER_BCM2835_ISP_BASE + 0x0009)
22
23 /*
24 * All structs below are directly mapped onto the equivalent structs in
25 @@ -176,6 +178,31 @@ struct bcm2835_isp_gamma {
26 };
27
28 /**
29 + * enum bcm2835_isp_cdn_mode - Mode of operation for colour denoise.
30 + *
31 + * @CDN_MODE_FAST: Fast (but lower quality) colour denoise
32 + * algorithm, typically used for video recording.
33 + * @CDN_HIGH_QUALITY: High quality (but slower) colour denoise
34 + * algorithm, typically used for stills capture.
35 + */
36 +enum bcm2835_isp_cdn_mode {
37 + CDN_MODE_FAST = 0,
38 + CDN_MODE_HIGH_QUALITY = 1,
39 +};
40 +
41 +/**
42 + * struct bcm2835_isp_cdn - Colour denoise parameters set with the
43 + * V4L2_CID_USER_BCM2835_ISP_CDN ctrl.
44 + *
45 + * @enabled: Enable colour denoise.
46 + * @mode: Colour denoise operating mode (see enum &bcm2835_isp_cdn_mode)
47 + */
48 +struct bcm2835_isp_cdn {
49 + __u32 enabled;
50 + __u32 mode;
51 +};
52 +
53 +/**
54 * struct bcm2835_isp_denoise - Denoise parameters set with the
55 * V4L2_CID_USER_BCM2835_ISP_DENOISE ctrl.
56 *