diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 18:04:33 +0100 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2021-02-18 23:42:32 +0100 |
commit | f07e572f6447465d8938679533d604e402b0f066 (patch) | |
tree | cb333bd2a67e59e7c07659514850a0fd55fc825e /target/linux/bcm27xx/patches-5.4/950-1030-media-i2c-imx477-Selection-compliance-fixes.patch | |
parent | 5d3a6fd970619dfc55f8259035c3027d7613a2a6 (diff) | |
download | upstream-f07e572f6447465d8938679533d604e402b0f066.tar.gz upstream-f07e572f6447465d8938679533d604e402b0f066.tar.bz2 upstream-f07e572f6447465d8938679533d604e402b0f066.zip |
bcm27xx: import latest patches from the RPi foundation
bcm2708: boot tested on RPi B+ v1.2
bcm2709: boot tested on RPi 3B v1.2 and RPi 4B v1.1 4G
bcm2710: boot tested on RPi 3B v1.2
bcm2711: boot tested on RPi 4B v1.1 4G
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.4/950-1030-media-i2c-imx477-Selection-compliance-fixes.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.4/950-1030-media-i2c-imx477-Selection-compliance-fixes.patch | 80 |
1 files changed, 80 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.4/950-1030-media-i2c-imx477-Selection-compliance-fixes.patch b/target/linux/bcm27xx/patches-5.4/950-1030-media-i2c-imx477-Selection-compliance-fixes.patch new file mode 100644 index 0000000000..e2ed71be39 --- /dev/null +++ b/target/linux/bcm27xx/patches-5.4/950-1030-media-i2c-imx477-Selection-compliance-fixes.patch @@ -0,0 +1,80 @@ +From cf3885ed8bb4194c5653a9a933b4ea669cdb51c2 Mon Sep 17 00:00:00 2001 +From: Naushir Patuck <naush@raspberrypi.com> +Date: Wed, 9 Dec 2020 11:30:12 +0000 +Subject: [PATCH] media: i2c: imx477: Selection compliance fixes + +To comply with the intended usage of the V4L2 selection target when +used to retrieve a sensor image properties, adjust the rectangles +returned by the imx477 driver. + +The top/left crop coordinates of the TGT_CROP rectangle were set to +(0, 0) instead of (8, 16) which is the offset from the larger physical +pixel array rectangle. This was also a mismatch with the default values +crop rectangle value, so this is corrected. Found with v4l2-compliance. + +While at it, add V4L2_SEL_TGT_CROP_BOUNDS support: CROP_DEFAULT and +CROP_BOUNDS have the same size as the non-active pixels are not readable +using the selection API. Found with v4l2-compliance. + +This commit mirrors 543790f777ba1b3264c168c653db6d415e7c983f done for +the imx219 sensor. + +Signed-off-by: Naushir Patuck <naush@raspberrypi.com> +--- + drivers/media/i2c/imx477.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +--- a/drivers/media/i2c/imx477.c ++++ b/drivers/media/i2c/imx477.c +@@ -900,8 +900,8 @@ static const struct imx477_mode supporte + .height = 3040, + .line_length_pix = 0x5dc0, + .crop = { +- .left = 0, +- .top = 0, ++ .left = IMX477_PIXEL_ARRAY_LEFT, ++ .top = IMX477_PIXEL_ARRAY_TOP, + .width = 4056, + .height = 3040, + }, +@@ -924,8 +924,8 @@ static const struct imx477_mode supporte + .height = 1520, + .line_length_pix = 0x31c4, + .crop = { +- .left = 0, +- .top = 0, ++ .left = IMX477_PIXEL_ARRAY_LEFT, ++ .top = IMX477_PIXEL_ARRAY_TOP, + .width = 4056, + .height = 3040, + }, +@@ -948,8 +948,8 @@ static const struct imx477_mode supporte + .height = 1080, + .line_length_pix = 0x31c4, + .crop = { +- .left = 0, +- .top = 440, ++ .left = IMX477_PIXEL_ARRAY_LEFT, ++ .top = IMX477_PIXEL_ARRAY_TOP + 440, + .width = 4056, + .height = 2600, + }, +@@ -983,8 +983,8 @@ static const struct imx477_mode supporte + * rectangle once the driver is expanded to represent + * its processing blocks with multiple subdevs. + */ +- .left = 4, +- .top = 0, ++ .left = IMX477_PIXEL_ARRAY_LEFT + 4, ++ .top = IMX477_PIXEL_ARRAY_TOP, + .width = 4052, + .height = 3040, + }, +@@ -1696,6 +1696,7 @@ static int imx477_get_selection(struct v + return 0; + + case V4L2_SEL_TGT_CROP_DEFAULT: ++ case V4L2_SEL_TGT_CROP_BOUNDS: + sel->r.left = IMX477_PIXEL_ARRAY_LEFT; + sel->r.top = IMX477_PIXEL_ARRAY_TOP; + sel->r.width = IMX477_PIXEL_ARRAY_WIDTH; |