58d23b7bcbcfc8233db80910168b9f1345150d5e
[openwrt/staging/thess.git] /
1 From 8bc19baeeca276374bed2d2ec95029d34fd93d7d Mon Sep 17 00:00:00 2001
2 From: David Plowman <david.plowman@raspberrypi.com>
3 Date: Wed, 29 Jan 2020 15:31:32 +0000
4 Subject: [PATCH] media: ov5647: change defaults to better match raw
5 camera applications.
6
7 Specifically:
8
9 * AWB is now off by default.
10
11 * AEC/AGC is also off by default.
12
13 * The default mode is changed to the 10-bit 2x2 binned mode.
14
15 AWB and AEC/AGC can be re-enabled using the usual V4L2 controls. The
16 original 8-bit mode will be respected if an application requests the
17 8-bit format.
18
19 Signed-off-by: David Plowman <david.plowman@raspberrypi.com>
20 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
21 ---
22 drivers/media/i2c/ov5647.c | 10 +++++-----
23 1 file changed, 5 insertions(+), 5 deletions(-)
24
25 --- a/drivers/media/i2c/ov5647.c
26 +++ b/drivers/media/i2c/ov5647.c
27 @@ -669,8 +669,8 @@ static struct ov5647_mode supported_mode
28 },
29 };
30
31 -/* Use original 8-bit VGA mode as default. */
32 -#define OV5647_DEFAULT_MODE (&supported_modes_8bit[0])
33 +/* Use 2x2 binned 10-bit mode as default. */
34 +#define OV5647_DEFAULT_MODE (&supported_modes_10bit[2])
35
36 static int ov5647_write(struct v4l2_subdev *sd, u16 reg, u8 val)
37 {
38 @@ -1367,18 +1367,18 @@ static int ov5647_probe(struct i2c_clien
39 0, /* min */
40 1, /* max */
41 1, /* step */
42 - 1); /* default */
43 + 0); /* default */
44 v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
45 V4L2_CID_AUTO_WHITE_BALANCE,
46 0, /* min */
47 1, /* max */
48 1, /* step */
49 - 1); /* default */
50 + 0); /* default */
51 v4l2_ctrl_new_std_menu(&sensor->ctrls, &ov5647_ctrl_ops,
52 V4L2_CID_EXPOSURE_AUTO,
53 V4L2_EXPOSURE_MANUAL, /* max */
54 0, /* skip_mask */
55 - V4L2_EXPOSURE_AUTO); /* default */
56 + V4L2_EXPOSURE_MANUAL); /* default */
57 ctrl = v4l2_ctrl_new_std(&sensor->ctrls, &ov5647_ctrl_ops,
58 V4L2_CID_EXPOSURE,
59 4, /* min lines */