Openwrt/target/linux/brcm2708/patches-4.19/950-0660-drm-vc4-In-FKMS-look-at-the-modifiers-correctly-for-.patch
Álvaro Fernández Rojas 19226502bf brcm2708: update to latest patches from the RPi foundation
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
2019-08-02 18:51:32 +02:00

37 lines
1.2 KiB
Diff

From 06467a053320efedf24a7facbd58873b22106992 Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Wed, 12 Jun 2019 17:13:21 +0100
Subject: [PATCH 660/725] drm/vc4: In FKMS look at the modifiers correctly for
SAND
Incorrect masking was used in the switch for the modifier,
therefore for SAND (which puts the column pitch in the
modifier) it didn't match.
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
drivers/gpu/drm/vc4/vc4_firmware_kms.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
+++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
@@ -460,7 +460,7 @@ static void vc4_plane_atomic_update(stru
}
mb->plane.planes[3] = 0;
- switch (fb->modifier) {
+ switch (fourcc_mod_broadcom_mod(fb->modifier)) {
case DRM_FORMAT_MOD_BROADCOM_VC4_T_TILED:
switch (mb->plane.vc_image_type) {
case VC_IMAGE_XRGB8888:
@@ -476,6 +476,9 @@ static void vc4_plane_atomic_update(stru
break;
case DRM_FORMAT_MOD_BROADCOM_SAND128:
mb->plane.vc_image_type = VC_IMAGE_YUV_UV;
+ /* Note that the column pitch is passed across in lines, not
+ * bytes.
+ */
mb->plane.pitch = fourcc_mod_broadcom_param(fb->modifier);
break;
}