Skip to content

Commit 4b1079d

Browse files
6by9HiassofT
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. raspberrypi#3734 Signed-off-by: Dave Stevenson <[email protected]>
1 parent ba1137e commit 4b1079d

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

785785
plane = &vc4_plane->base;
786-
ret = drm_universal_plane_init(dev, plane, 0xff,
786+
ret = drm_universal_plane_init(dev, plane, 0,
787787
&vc4_plane_funcs,
788788
formats, num_formats, modifiers,
789789
type, NULL);
@@ -1759,6 +1759,10 @@ static int vc4_fkms_create_screen(struct device *dev, struct drm_device *drm,
17591759
NULL);
17601760
drm_crtc_helper_add(crtc, &vc4_crtc_helper_funcs);
17611761

1762+
/* Update the possible_crtcs mask for the overlay plane(s) */
1763+
for (i = 1; i < (PLANES_PER_CRTC - 1); i++)
1764+
planes[i]->possible_crtcs = drm_crtc_mask(crtc);
1765+
17621766
vc4_encoder = devm_kzalloc(dev, sizeof(*vc4_encoder), GFP_KERNEL);
17631767
if (!vc4_encoder)
17641768
return -ENOMEM;

0 commit comments

Comments
 (0)