提交 b40e6d71 编写于 作者: N Naushir Patuck 提交者: Zheng Zengkai

media: i2c: imx477: Replace existing 1012x760 mode

raspberrypi inclusion
category: feature
bugzilla: 50432

--------------------------------

The existing 1012x760 120 fps mode has significant IQ problem using
the internal sensor scaler. Replace this mode with a 1332x990 120 fps
mode instead. This new mode has a smaller field of view, but does not
suffer from the bad IQ of the original mode.
Signed-off-by: NNaushir Patuck <naush@raspberrypi.com>
Signed-off-by: NFang Yafen <yafen@iscas.ac.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 754f1ee3
...@@ -770,7 +770,7 @@ static const struct imx477_reg mode_2028x1080_regs[] = { ...@@ -770,7 +770,7 @@ static const struct imx477_reg mode_2028x1080_regs[] = {
}; };
/* 4x4 binned. 120fps */ /* 4x4 binned. 120fps */
static const struct imx477_reg mode_1012x760_regs[] = { static const struct imx477_reg mode_1332x990_regs[] = {
{0x420b, 0x01}, {0x420b, 0x01},
{0x990c, 0x00}, {0x990c, 0x00},
{0x990d, 0x08}, {0x990d, 0x08},
...@@ -786,28 +786,31 @@ static const struct imx477_reg mode_1012x760_regs[] = { ...@@ -786,28 +786,31 @@ static const struct imx477_reg mode_1012x760_regs[] = {
{0x0112, 0x0a}, {0x0112, 0x0a},
{0x0113, 0x0a}, {0x0113, 0x0a},
{0x0114, 0x01}, {0x0114, 0x01},
{0x0342, 0x14}, {0x0342, 0x1a},
{0x0343, 0x60}, {0x0343, 0x08},
{0x0340, 0x04},
{0x0341, 0x1a},
{0x0344, 0x00}, {0x0344, 0x00},
{0x0345, 0x00}, {0x0345, 0x00},
{0x0346, 0x00}, {0x0346, 0x02},
{0x0347, 0x00}, {0x0347, 0x10},
{0x0348, 0x0f}, {0x0348, 0x0f},
{0x0349, 0xd3}, {0x0349, 0xd7},
{0x034a, 0x0b}, {0x034a, 0x09},
{0x034b, 0xdf}, {0x034b, 0xcf},
{0x00e3, 0x00}, {0x00e3, 0x00},
{0x00e4, 0x00}, {0x00e4, 0x00},
{0x00fc, 0x0a}, {0x00fc, 0x0a},
{0x00fd, 0x0a}, {0x00fd, 0x0a},
{0x00fe, 0x0a}, {0x00fe, 0x0a},
{0x00ff, 0x0a}, {0x00ff, 0x0a},
{0xe013, 0x00},
{0x0220, 0x00}, {0x0220, 0x00},
{0x0221, 0x11}, {0x0221, 0x11},
{0x0381, 0x01}, {0x0381, 0x01},
{0x0383, 0x01}, {0x0383, 0x01},
{0x0385, 0x01}, {0x0385, 0x01},
{0x0387, 0x03}, {0x0387, 0x01},
{0x0900, 0x01}, {0x0900, 0x01},
{0x0901, 0x22}, {0x0901, 0x22},
{0x0902, 0x02}, {0x0902, 0x02},
...@@ -831,29 +834,29 @@ static const struct imx477_reg mode_1012x760_regs[] = { ...@@ -831,29 +834,29 @@ static const struct imx477_reg mode_1012x760_regs[] = {
{0x936d, 0x5f}, {0x936d, 0x5f},
{0x9304, 0x03}, {0x9304, 0x03},
{0x9305, 0x80}, {0x9305, 0x80},
{0x9e9a, 0x3f}, {0x9e9a, 0x2f},
{0x9e9b, 0x3f}, {0x9e9b, 0x2f},
{0x9e9c, 0x3f}, {0x9e9c, 0x2f},
{0x9e9d, 0x27}, {0x9e9d, 0x00},
{0x9e9e, 0x27}, {0x9e9e, 0x00},
{0x9e9f, 0x27}, {0x9e9f, 0x00},
{0xa2a9, 0x27}, {0xa2a9, 0x27},
{0xa2b7, 0x03}, {0xa2b7, 0x03},
{0x0401, 0x01}, {0x0401, 0x00},
{0x0404, 0x00}, {0x0404, 0x00},
{0x0405, 0x20}, {0x0405, 0x10},
{0x0408, 0x00}, {0x0408, 0x01},
{0x0409, 0x00}, {0x0409, 0x5c},
{0x040a, 0x00}, {0x040a, 0x00},
{0x040b, 0x00}, {0x040b, 0x00},
{0x040c, 0x07}, {0x040c, 0x05},
{0x040d, 0xea}, {0x040d, 0x34},
{0x040e, 0x02}, {0x040e, 0x03},
{0x040f, 0xf8}, {0x040f, 0xde},
{0x034c, 0x03}, {0x034c, 0x05},
{0x034d, 0xf4}, {0x034d, 0x34},
{0x034e, 0x02}, {0x034e, 0x03},
{0x034f, 0xf8}, {0x034f, 0xde},
{0x0301, 0x05}, {0x0301, 0x05},
{0x0303, 0x02}, {0x0303, 0x02},
{0x0305, 0x02}, {0x0305, 0x02},
...@@ -870,21 +873,21 @@ static const struct imx477_reg mode_1012x760_regs[] = { ...@@ -870,21 +873,21 @@ static const struct imx477_reg mode_1012x760_regs[] = {
{0x0822, 0x00}, {0x0822, 0x00},
{0x0823, 0x00}, {0x0823, 0x00},
{0x080a, 0x00}, {0x080a, 0x00},
{0x080b, 0x6f}, {0x080b, 0x7f},
{0x080c, 0x00}, {0x080c, 0x00},
{0x080d, 0x3f}, {0x080d, 0x4f},
{0x080e, 0x00}, {0x080e, 0x00},
{0x080f, 0xff}, {0x080f, 0x77},
{0x0810, 0x00}, {0x0810, 0x00},
{0x0811, 0x4f}, {0x0811, 0x5f},
{0x0812, 0x00}, {0x0812, 0x00},
{0x0813, 0x47}, {0x0813, 0x57},
{0x0814, 0x00}, {0x0814, 0x00},
{0x0815, 0x37}, {0x0815, 0x4f},
{0x0816, 0x00}, {0x0816, 0x01},
{0x0817, 0xe7}, {0x0817, 0x27},
{0x0818, 0x00}, {0x0818, 0x00},
{0x0819, 0x2f}, {0x0819, 0x3f},
{0xe04c, 0x00}, {0xe04c, 0x00},
{0xe04d, 0x5f}, {0xe04d, 0x5f},
{0xe04e, 0x00}, {0xe04e, 0x00},
...@@ -893,7 +896,7 @@ static const struct imx477_reg mode_1012x760_regs[] = { ...@@ -893,7 +896,7 @@ static const struct imx477_reg mode_1012x760_regs[] = {
{0x3e37, 0x00}, {0x3e37, 0x00},
{0x3f50, 0x00}, {0x3f50, 0x00},
{0x3f56, 0x00}, {0x3f56, 0x00},
{0x3f57, 0x96}, {0x3f57, 0xbf},
}; };
/* Mode configs */ /* Mode configs */
...@@ -974,9 +977,9 @@ static const struct imx477_mode supported_modes_12bit[] = { ...@@ -974,9 +977,9 @@ static const struct imx477_mode supported_modes_12bit[] = {
static const struct imx477_mode supported_modes_10bit[] = { static const struct imx477_mode supported_modes_10bit[] = {
{ {
/* 720P 120fps. 4x4 binned */ /* 120fps. 2x2 binned and cropped */
.width = 1012, .width = 1332,
.height = 760, .height = 990,
.line_length_pix = 0x1460, .line_length_pix = 0x1460,
.crop = { .crop = {
/* /*
...@@ -987,10 +990,10 @@ static const struct imx477_mode supported_modes_10bit[] = { ...@@ -987,10 +990,10 @@ static const struct imx477_mode supported_modes_10bit[] = {
* rectangle once the driver is expanded to represent * rectangle once the driver is expanded to represent
* its processing blocks with multiple subdevs. * its processing blocks with multiple subdevs.
*/ */
.left = IMX477_PIXEL_ARRAY_LEFT + 4, .left = IMX477_PIXEL_ARRAY_LEFT + 696,
.top = IMX477_PIXEL_ARRAY_TOP, .top = IMX477_PIXEL_ARRAY_TOP + 528,
.width = 4052, .width = 2664,
.height = 3040, .height = 1980,
}, },
.timeperframe_min = { .timeperframe_min = {
.numerator = 100, .numerator = 100,
...@@ -998,11 +1001,11 @@ static const struct imx477_mode supported_modes_10bit[] = { ...@@ -998,11 +1001,11 @@ static const struct imx477_mode supported_modes_10bit[] = {
}, },
.timeperframe_default = { .timeperframe_default = {
.numerator = 100, .numerator = 100,
.denominator = 60000 .denominator = 12000
}, },
.reg_list = { .reg_list = {
.num_of_regs = ARRAY_SIZE(mode_1012x760_regs), .num_of_regs = ARRAY_SIZE(mode_1332x990_regs),
.regs = mode_1012x760_regs, .regs = mode_1332x990_regs,
} }
} }
}; };
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册