f0395d81a1b824fa8eea88a583784ffa6eee4260
[openwrt/staging/thess.git] /
1 From d6a5177c459c6e8b9213fd97b2d795d46611da8c 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 657/782] drm/vc4: In FKMS look at the modifiers correctly for
5 SAND
6
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.
10
11 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
12 ---
13 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 5 ++++-
14 1 file changed, 4 insertions(+), 1 deletion(-)
15
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
19 }
20 mb->plane.planes[3] = 0;
21
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
28 break;
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
32 + * bytes.
33 + */
34 mb->plane.pitch = fourcc_mod_broadcom_param(fb->modifier);
35 break;
36 }