Skip to content

Commit f748865

Browse files
committed
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 30e8328 commit f748865

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
@@ -816,7 +816,7 @@ static struct drm_plane *vc4_fkms_plane_init(struct drm_device *dev,
816816
formats[num_formats++] = vc_image_formats[i].drm;
817817

818818
plane = &vc4_plane->base;
819-
ret = drm_universal_plane_init(dev, plane, 0xff,
819+
ret = drm_universal_plane_init(dev, plane, 0,
820820
&vc4_plane_funcs,
821821
formats, num_formats, modifiers,
822822
type, NULL);
@@ -1785,6 +1785,10 @@ static int vc4_fkms_create_screen(struct device *dev, struct drm_device *drm,
17851785
NULL);
17861786
drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs);
17871787

1788+
/* Update the possible_crtcs mask for the overlay plane(s) */
1789+
for (i = 1; i < (PLANES_PER_CRTC - 1); i++)
1790+
planes[i]->possible_crtcs = drm_crtc_mask(crtc);
1791+
17881792
vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL);
17891793
if (!vc4_encoder)
17901794
return -ENOMEM;

0 commit comments

Comments
 (0)