9f020f7a53ef485d42c8109a5c0052e5e2515854
[openwrt/openwrt.git] /
1 From 84a67330f3457469bc42f203111fc5ad800c506b Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.com>
3 Date: Thu, 13 Aug 2020 18:29:56 +0100
4 Subject: [PATCH] drm/vc4: Set the possible crtcs mask correctly for
5 planes with FKMS
6
7 The driver was assigning all planes to crtcs when actually they're
8 mapped to a specific crtc.
9
10 Correct the mask.
11
12 https://github.com/raspberrypi/linux/issues/3734
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
15 ---
16 drivers/gpu/drm/vc4/vc4_firmware_kms.c | 6 +++++-
17 1 file changed, 5 insertions(+), 1 deletion(-)
18
19 --- a/drivers/gpu/drm/vc4/vc4_firmware_kms.c
20 +++ b/drivers/gpu/drm/vc4/vc4_firmware_kms.c
21 @@ -816,7 +816,7 @@ static struct drm_plane *vc4_fkms_plane_
22 formats[num_formats++] = vc_image_formats[i].drm;
23
24 plane = &vc4_plane->base;
25 - ret = drm_universal_plane_init(dev, plane, 0xff,
26 + ret = drm_universal_plane_init(dev, plane, 0,
27 &vc4_plane_funcs,
28 formats, num_formats, modifiers,
29 type, NULL);
30 @@ -1785,6 +1785,10 @@ static int vc4_fkms_create_screen(struct
31 NULL);
32 drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs);
33
34 + /* Update the possible_crtcs mask for the overlay plane(s) */
35 + for (i = 1; i < (PLANES_PER_CRTC - 1); i++)
36 + planes[i]->possible_crtcs = drm_crtc_mask(crtc);
37 +
38 vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL);
39 if (!vc4_encoder)
40 return -ENOMEM;