[PATCH v2 04/20] media: imx355: Remove setting FRM_LENGTH_LINES in the mode regs

From: Dave Stevenson

Date: Tue Jul 07 2026 - 13:07:57 EST


Registers 0x0340 and 0x0341 (FRM_LENGTH_LINES) are already written
from the set_ctrl(V4L2_CID_VBLANK) handler, so don't write them
from the mode register list.

Reviewed-by: Jacopo Mondi <jacopo.mondi@xxxxxxxxxxxxxxxx>
Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
---
drivers/media/i2c/imx355.c | 28 ----------------------------
1 file changed, 28 deletions(-)

diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
index 83a59aa8b098..28b210f1a868 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -253,8 +253,6 @@ static const struct imx355_reg_list imx355_global_setting = {
static const struct imx355_reg mode_3268x2448_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x0a },
- { 0x0341, 0x37 },
{ 0x0344, 0x00 },
{ 0x0345, 0x08 },
{ 0x0346, 0x00 },
@@ -277,8 +275,6 @@ static const struct imx355_reg mode_3268x2448_regs[] = {
static const struct imx355_reg mode_3264x2448_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x0a },
- { 0x0341, 0x37 },
{ 0x0344, 0x00 },
{ 0x0345, 0x08 },
{ 0x0346, 0x00 },
@@ -301,8 +297,6 @@ static const struct imx355_reg mode_3264x2448_regs[] = {
static const struct imx355_reg mode_3280x2464_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x0a },
- { 0x0341, 0x37 },
{ 0x0344, 0x00 },
{ 0x0345, 0x00 },
{ 0x0346, 0x00 },
@@ -325,8 +319,6 @@ static const struct imx355_reg mode_3280x2464_regs[] = {
static const struct imx355_reg mode_1940x1096_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x02 },
{ 0x0345, 0xa0 },
{ 0x0346, 0x02 },
@@ -349,8 +341,6 @@ static const struct imx355_reg mode_1940x1096_regs[] = {
static const struct imx355_reg mode_1936x1096_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x02 },
{ 0x0345, 0xa0 },
{ 0x0346, 0x02 },
@@ -373,8 +363,6 @@ static const struct imx355_reg mode_1936x1096_regs[] = {
static const struct imx355_reg mode_1924x1080_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x02 },
{ 0x0345, 0xa8 },
{ 0x0346, 0x02 },
@@ -397,8 +385,6 @@ static const struct imx355_reg mode_1924x1080_regs[] = {
static const struct imx355_reg mode_1920x1080_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x02 },
{ 0x0345, 0xa8 },
{ 0x0346, 0x02 },
@@ -421,8 +407,6 @@ static const struct imx355_reg mode_1920x1080_regs[] = {
static const struct imx355_reg mode_1640x1232_regs[] = {
{ 0x0342, 0x07 },
{ 0x0343, 0x2c },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x00 },
{ 0x0345, 0x00 },
{ 0x0346, 0x00 },
@@ -445,8 +429,6 @@ static const struct imx355_reg mode_1640x1232_regs[] = {
static const struct imx355_reg mode_1640x922_regs[] = {
{ 0x0342, 0x07 },
{ 0x0343, 0x2c },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x00 },
{ 0x0345, 0x00 },
{ 0x0346, 0x01 },
@@ -469,8 +451,6 @@ static const struct imx355_reg mode_1640x922_regs[] = {
static const struct imx355_reg mode_1300x736_regs[] = {
{ 0x0342, 0x07 },
{ 0x0343, 0x2c },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x01 },
{ 0x0345, 0x58 },
{ 0x0346, 0x01 },
@@ -493,8 +473,6 @@ static const struct imx355_reg mode_1300x736_regs[] = {
static const struct imx355_reg mode_1296x736_regs[] = {
{ 0x0342, 0x07 },
{ 0x0343, 0x2c },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x01 },
{ 0x0345, 0x58 },
{ 0x0346, 0x01 },
@@ -517,8 +495,6 @@ static const struct imx355_reg mode_1296x736_regs[] = {
static const struct imx355_reg mode_1284x720_regs[] = {
{ 0x0342, 0x07 },
{ 0x0343, 0x2c },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x01 },
{ 0x0345, 0x68 },
{ 0x0346, 0x02 },
@@ -541,8 +517,6 @@ static const struct imx355_reg mode_1284x720_regs[] = {
static const struct imx355_reg mode_1280x720_regs[] = {
{ 0x0342, 0x07 },
{ 0x0343, 0x2c },
- { 0x0340, 0x05 },
- { 0x0341, 0x1a },
{ 0x0344, 0x01 },
{ 0x0345, 0x68 },
{ 0x0346, 0x02 },
@@ -565,8 +539,6 @@ static const struct imx355_reg mode_1280x720_regs[] = {
static const struct imx355_reg mode_820x616_regs[] = {
{ 0x0342, 0x0e },
{ 0x0343, 0x58 },
- { 0x0340, 0x02 },
- { 0x0341, 0x8c },
{ 0x0344, 0x00 },
{ 0x0345, 0x00 },
{ 0x0346, 0x00 },

--
2.34.1