aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 10:54:34 +0200
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-08-21 19:07:07 +0200
commit8299d1f057439f94c6a4412e2e5c5082b82a30c9 (patch)
tree1bf678d61f11f7394493be464c7876e496f7faed /target/linux/bcm27xx/patches-5.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch
parent33b6885975ce376ff075362b7f0890326043111b (diff)
downloadupstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.gz
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.tar.bz2
upstream-8299d1f057439f94c6a4412e2e5c5082b82a30c9.zip
bcm27xx: add kernel 5.10 support
Rebased RPi foundation patches on linux 5.10.59, removed applied and reverted patches, wireless patches and defconfig patches. bcm2708: boot tested on RPi B+ v1.2 bcm2709: boot tested on RPi 4B v1.1 4G 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.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch')
-rw-r--r--target/linux/bcm27xx/patches-5.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch b/target/linux/bcm27xx/patches-5.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch
new file mode 100644
index 0000000000..711b2e5f17
--- /dev/null
+++ b/target/linux/bcm27xx/patches-5.10/950-0522-vc4-drm-SQUASH-Fix-source-offsets-with-DRM_FORMAT_P0.patch
@@ -0,0 +1,30 @@
+From 38643fd0a26ba42938a361db296e28f3b4975d8c Mon Sep 17 00:00:00 2001
+From: Dom Cobley <popcornmix@gmail.com>
+Date: Wed, 31 Mar 2021 18:12:55 +0100
+Subject: [PATCH] vc4/drm: SQUASH: Fix source offsets with
+ DRM_FORMAT_P030
+
+x_off should only be within current stripe
+The stripe number is accounted for elsewhere
+
+Fixes: 9b1b1beb1c7e58b ("vc4/drm: Fix source offsets with DRM_FORMAT_P030")
+
+Signed-off-by: Dom Cobley <popcornmix@gmail.com>
+---
+ drivers/gpu/drm/vc4/vc4_plane.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_plane.c
++++ b/drivers/gpu/drm/vc4/vc4_plane.c
+@@ -825,8 +825,9 @@ static int vc4_plane_mode_set(struct drm
+ * and bits[3:0] should be between 0 and 11, indicating which
+ * of the 12-pixels in that 128-bit word is the first pixel to be used
+ */
+- u32 aligned = vc4_state->src_x / 12;
+- u32 last_bits = vc4_state->src_x % 12;
++ u32 remaining_pixels = vc4_state->src_x % 96;
++ u32 aligned = remaining_pixels / 12;
++ u32 last_bits = remaining_pixels % 12;
+
+ x_off = aligned * 16 + last_bits;
+ hvs_format = HVS_PIXEL_FORMAT_YCBCR_10BIT;