Skip to content

Commit 62aafb0

Browse files
6by9popcornmix
authored andcommitted
drm/vc4: Set the possible crtcs mask correctly for planes with FKMS
The driver was assigning all planes to crtcs when actually they're mapped to a specific crtc. Correct the mask. #3734 Signed-off-by: Dave Stevenson <[email protected]>
1 parent bd08544 commit 62aafb0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

drivers/gpu/drm/vc4/vc4_firmware_kms.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ static struct drm_plane *vc4_fkms_plane_init(struct drm_device *dev,
799799
formats[num_formats++] = vc_image_formats[i].drm;
800800

801801
plane = &vc4_plane->base;
802-
ret = drm_universal_plane_init(dev, plane, 0xff,
802+
ret = drm_universal_plane_init(dev, plane, 0,
803803
&vc4_plane_funcs,
804804
formats, num_formats, modifiers,
805805
type, NULL);
@@ -1768,6 +1768,10 @@ static int vc4_fkms_create_screen(struct device *dev, struct drm_device *drm,
17681768
NULL);
17691769
drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs);
17701770

1771+
/* Update the possible_crtcs mask for the overlay plane(s) */
1772+
for (i = 1; i < (PLANES_PER_CRTC - 1); i++)
1773+
planes[i]->possible_crtcs = drm_crtc_mask(crtc);
1774+
17711775
vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL);
17721776
if (!vc4_encoder)
17731777
return -ENOMEM;

0 commit comments

Comments
 (0)