1 From 43568d1ac29fbbdc812a52a82f6ec1cd5ff6d6e6 Mon Sep 17 00:00:00 2001
2 From: Naushir Patuck <naush@raspberrypi.com>
3 Date: Thu, 18 Feb 2021 15:23:11 +0000
4 Subject: [PATCH] media: i2c: imx477: Replace existing 1012x760 mode
6 The existing 1012x760 120 fps mode has significant IQ problem using
7 the internal sensor scaler. Replace this mode with a 1332x990 120 fps
8 mode instead. This new mode has a smaller field of view, but does not
9 suffer from the bad IQ of the original mode.
11 Signed-off-by: Naushir Patuck <naush@raspberrypi.com>
13 drivers/media/i2c/imx477.c | 97 ++++++++++++++++++++------------------
14 1 file changed, 50 insertions(+), 47 deletions(-)
16 --- a/drivers/media/i2c/imx477.c
17 +++ b/drivers/media/i2c/imx477.c
18 @@ -770,7 +770,7 @@ static const struct imx477_reg mode_2028
21 /* 4x4 binned. 120fps */
22 -static const struct imx477_reg mode_1012x760_regs[] = {
23 +static const struct imx477_reg mode_1332x990_regs[] = {
27 @@ -786,28 +786,31 @@ static const struct imx477_reg mode_1012
67 @@ -831,29 +834,29 @@ static const struct imx477_reg mode_1012
115 @@ -870,21 +873,21 @@ static const struct imx477_reg mode_1012
146 @@ -893,7 +896,7 @@ static const struct imx477_reg mode_1012
155 @@ -974,9 +977,9 @@ static const struct imx477_mode supporte
157 static const struct imx477_mode supported_modes_10bit[] = {
159 - /* 720P 120fps. 4x4 binned */
162 + /* 120fps. 2x2 binned and cropped */
165 .line_length_pix = 0x1460,
168 @@ -987,10 +990,10 @@ static const struct imx477_mode supporte
169 * rectangle once the driver is expanded to represent
170 * its processing blocks with multiple subdevs.
172 - .left = IMX477_PIXEL_ARRAY_LEFT + 4,
173 - .top = IMX477_PIXEL_ARRAY_TOP,
176 + .left = IMX477_PIXEL_ARRAY_LEFT + 696,
177 + .top = IMX477_PIXEL_ARRAY_TOP + 528,
181 .timeperframe_min = {
183 @@ -998,11 +1001,11 @@ static const struct imx477_mode supporte
185 .timeperframe_default = {
187 - .denominator = 60000
188 + .denominator = 12000
191 - .num_of_regs = ARRAY_SIZE(mode_1012x760_regs),
192 - .regs = mode_1012x760_regs,
193 + .num_of_regs = ARRAY_SIZE(mode_1332x990_regs),
194 + .regs = mode_1332x990_regs,