cd2f7bd04f9452fbc5a65a8014648158acf4628d
[openwrt/staging/jow.git] /
1 From da7972664ce5c26a876d092d8161901985f9fa8f 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 664/703] 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 }