From ea3c1041ccd32b2530fb099f6f4ec2e8c934ad2b Mon Sep 17 00:00:00 2001
From: sandyol55 <97237527+sandyol55@users.noreply.github.com>
Date: Wed, 22 Apr 2026 14:02:23 +0100
Subject: [PATCH] media: i2c: imx477: Fix crop height for 12Mpix 16:9

Struct definition doesn't match the cropped height of the mode causing
Picamera2 ScalerCrop to distort any cropped images. Also causes the
rpi-cam apps --list-cameras to report an incorrect mode crop height.

Signed-off-by: Sandy Sutherland <ao_sutherland@outlook.com>
---
 drivers/media/i2c/imx477.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/i2c/imx477.c
+++ b/drivers/media/i2c/imx477.c
@@ -884,7 +884,7 @@ static const struct imx477_mode supporte
 			.left = IMX477_PIXEL_ARRAY_LEFT,
 			.top = IMX477_PIXEL_ARRAY_TOP + 440,
 			.width = 4056,
-			.height = 3040,
+			.height = 2160,
 		},
 		.frm_length_default = 10,
 		.reg_list = {
