diff mbox series

[v2,04/18] media: i2c: imx219: Fix test pattern window for 640x480 mode

Message ID 20230821223001.28480-5-laurent.pinchart@ideasonboard.com (mailing list archive)
State New, archived
Headers show
Series media: i2c: imx219: Miscellaneous cleanups and improvements | expand

Commit Message

Laurent Pinchart Aug. 21, 2023, 10:29 p.m. UTC
The 640x480 mode specifies incorrect values for the TP_WINDOW_WIDTH and
TP_WINDOW_HEIGHT registers, which likely got copied from the 1640x1232
mode. They should be identical to the X_OUTPUT_SIZE and Y_OUTPUT_SIZE
registers as for all the other modes, to avoid cropping the test
pattern. Fix them.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 drivers/media/i2c/imx219.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Dave Stevenson Aug. 22, 2023, 4:11 p.m. UTC | #1
On Mon, 21 Aug 2023 at 23:30, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> The 640x480 mode specifies incorrect values for the TP_WINDOW_WIDTH and
> TP_WINDOW_HEIGHT registers, which likely got copied from the 1640x1232
> mode. They should be identical to the X_OUTPUT_SIZE and Y_OUTPUT_SIZE
> registers as for all the other modes, to avoid cropping the test
> pattern. Fix them.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

> ---
>  drivers/media/i2c/imx219.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
> index 8cab0251bd6a..08011192daa6 100644
> --- a/drivers/media/i2c/imx219.c
> +++ b/drivers/media/i2c/imx219.c
> @@ -264,8 +264,8 @@ static const struct cci_reg_sequence mode_640_480_regs[] = {
>         { IMX219_REG_Y_ADD_END_A, 1711 },
>         { IMX219_REG_X_OUTPUT_SIZE, 640 },
>         { IMX219_REG_Y_OUTPUT_SIZE, 480 },
> -       { IMX219_REG_TP_WINDOW_WIDTH, 1640 },
> -       { IMX219_REG_TP_WINDOW_HEIGHT, 1232 },
> +       { IMX219_REG_TP_WINDOW_WIDTH, 640 },
> +       { IMX219_REG_TP_WINDOW_HEIGHT, 480 },
>  };
>
>  static const struct cci_reg_sequence raw8_framefmt_regs[] = {
> --
> Regards,
>
> Laurent Pinchart
>
diff mbox series

Patch

diff --git a/drivers/media/i2c/imx219.c b/drivers/media/i2c/imx219.c
index 8cab0251bd6a..08011192daa6 100644
--- a/drivers/media/i2c/imx219.c
+++ b/drivers/media/i2c/imx219.c
@@ -264,8 +264,8 @@  static const struct cci_reg_sequence mode_640_480_regs[] = {
 	{ IMX219_REG_Y_ADD_END_A, 1711 },
 	{ IMX219_REG_X_OUTPUT_SIZE, 640 },
 	{ IMX219_REG_Y_OUTPUT_SIZE, 480 },
-	{ IMX219_REG_TP_WINDOW_WIDTH, 1640 },
-	{ IMX219_REG_TP_WINDOW_HEIGHT, 1232 },
+	{ IMX219_REG_TP_WINDOW_WIDTH, 640 },
+	{ IMX219_REG_TP_WINDOW_HEIGHT, 480 },
 };
 
 static const struct cci_reg_sequence raw8_framefmt_regs[] = {