[PATCH 04/13] media: imx355: Remove the duplication between width/height and x/y_out_size

From: Dave Stevenson

Date: Wed May 06 2026 - 14:26:31 EST


The register settings x_out_size and y_out_size are just width and
height, so drop the values.

Signed-off-by: Dave Stevenson <dave.stevenson@xxxxxxxxxxxxxxx>
---
drivers/media/i2c/imx355.c | 34 ++--------------------------------
1 file changed, 2 insertions(+), 32 deletions(-)

diff --git a/drivers/media/i2c/imx355.c b/drivers/media/i2c/imx355.c
index 6179fe74c897..589bad6c58e4 100644
--- a/drivers/media/i2c/imx355.c
+++ b/drivers/media/i2c/imx355.c
@@ -114,8 +114,6 @@ struct imx355_mode {
u16 y_add_start;
u16 x_add_end;
u16 y_add_end;
- u16 x_out_size;
- u16 y_out_size;
};

struct imx355_clk_params {
@@ -440,8 +438,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0000,
.x_add_end = 0x0ccf,
.y_add_end = 0x099f,
- .x_out_size = 0x0cd0,
- .y_out_size = 0x09a0,
},
{
.width = 3268,
@@ -458,8 +454,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0008,
.x_add_end = 0x0ccb,
.y_add_end = 0x997,
- .x_out_size = 0x0cc4,
- .y_out_size = 0x0990,
},
{
.width = 3264,
@@ -476,8 +470,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0008,
.x_add_end = 0x0cc7,
.y_add_end = 0x0997,
- .x_out_size = 0x0cc0,
- .y_out_size = 0x0990,
},
{
.width = 1940,
@@ -494,8 +486,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x02ac,
.x_add_end = 0x0a33,
.y_add_end = 0x06f3,
- .x_out_size = 0x0794,
- .y_out_size = 0x0448,
},
{
.width = 1936,
@@ -512,8 +502,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x02ac,
.x_add_end = 0x0a2f,
.y_add_end = 0x06f3,
- .x_out_size = 0x0790,
- .y_out_size = 0x0448,
},
{
.width = 1924,
@@ -530,8 +518,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x02b4,
.x_add_end = 0x0a2b,
.y_add_end = 0x06eb,
- .x_out_size = 0x0784,
- .y_out_size = 0x0438,
},
{
.width = 1920,
@@ -548,8 +534,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x02b4,
.x_add_end = 0x0a27,
.y_add_end = 0x06eb,
- .x_out_size = 0x0780,
- .y_out_size = 0x0438,
},
{
.width = 1640,
@@ -566,8 +550,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0000,
.x_add_end = 0x0ccf,
.y_add_end = 0x099f,
- .x_out_size = 0x0668,
- .y_out_size = 0x04d0,
},
{
.width = 1640,
@@ -584,8 +566,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0130,
.x_add_end = 0x0ccf,
.y_add_end = 0x0863,
- .x_out_size = 0x0668,
- .y_out_size = 0x039a,
},
{
.width = 1300,
@@ -602,8 +582,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x01f0,
.x_add_end = 0x0b7f,
.y_add_end = 0x07af,
- .x_out_size = 0x0514,
- .y_out_size = 0x02e0,
},
{
.width = 1296,
@@ -620,8 +598,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x01f0,
.x_add_end = 0x0b77,
.y_add_end = 0x07af,
- .x_out_size = 0x0510,
- .y_out_size = 0x02e0,
},
{
.width = 1284,
@@ -638,8 +614,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0200,
.x_add_end = 0x0b6f,
.y_add_end = 0x079f,
- .x_out_size = 0x0504,
- .y_out_size = 0x02d0,
},
{
.width = 1280,
@@ -656,8 +630,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0200,
.x_add_end = 0x0b67,
.y_add_end = 0x079f,
- .x_out_size = 0x0500,
- .y_out_size = 0x02d0,
},
{
.width = 820,
@@ -674,8 +646,6 @@ static const struct imx355_mode supported_modes[] = {
.y_add_start = 0x0000,
.x_add_end = 0x0ccf,
.y_add_end = 0x099f,
- .x_out_size = 0x0334,
- .y_out_size = 0x0268,
},
};

@@ -1044,11 +1014,11 @@ static int imx355_start_streaming(struct imx355 *imx355)
if (ret)
return ret;
ret = imx355_write_reg(imx355, IMX355_REG_X_OUT_SIZE, 2,
- mode->x_out_size);
+ mode->width);
if (ret)
return ret;
ret = imx355_write_reg(imx355, IMX355_REG_Y_OUT_SIZE, 2,
- mode->y_out_size);
+ mode->height);
if (ret)
return ret;


--
2.34.1