Skip to contentSkip to conversation

media: i2c: imx576: Fix line length register

PATCH In review David Carlier 2 participants 2 messages Oct 9

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 media: i2c: imx576: Fix line length register

The line length is written to FRAME_LENGTH_LINES instead of LINE_LENGTH_PCK. The value is later overwritten by the VBLANK control, so the sensor runs with its default line length while the driver reports HBLANK and PIXEL_RATE computed from IMX576_LINE_LENGTH.

Fixes ee2e9bf41d3e ("media: i2c: add imx576 image sensor driver")
---
 drivers/media/i2c/imx576.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/imx576.c +1 -1
index 3fcd28d18a51..6243683302c7 100644
@@ -507,7 +507,7 @@ static int imx576_set_window(struct imx576 *imx576,
 	format = v4l2_subdev_state_get_format(state, 0);
 
 	/* Line length */
-	cci_write(imx576->regmap, CCS_R_FRAME_LENGTH_LINES, IMX576_LINE_LENGTH,
+	cci_write(imx576->regmap, CCS_R_LINE_LENGTH_PCK, IMX576_LINE_LENGTH,
 		  &ret);
 
 	/* Imaging area */
Signature · 1 line
2.55.0
Reviewed-by on v1 1/1
#1 lore raw

Hi David,

Quoted 25 lines

The line length is written to FRAME_LENGTH_LINES instead of LINE_LENGTH_PCK. The value is later overwritten by the VBLANK control, so the sensor runs with its default line length while the driver reports HBLANK and PIXEL_RATE computed from IMX576_LINE_LENGTH.

Fixes ee2e9bf41d3e ("media: i2c: add imx576 image sensor driver")

---
drivers/media/i2c/imx576.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
drivers/media/i2c/imx576.c +1 -2
index 3fcd28d18a51..6243683302c7 100644
@@ -507,7 +507,7 @@ static int imx576_set_window(struct imx576 *imx576,
 	format = v4l2_subdev_state_get_format(state, 0);
 
 	/* Line length */
-	cci_write(imx576->regmap, CCS_R_FRAME_LENGTH_LINES, IMX576_LINE_LENGTH,
+	cci_write(imx576->regmap, CCS_R_LINE_LENGTH_PCK, IMX576_LINE_LENGTH,
 		  &ret);
 
 	/* Imaging area */
--
Quoted 1 line

2.55

Ah, thanks for catching this

Best Regards,
Himanshu