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