]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm: vc4: adapt to new behaviour of drm_crtc.c
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>
Wed, 1 Feb 2017 09:35:08 +0000 (10:35 +0100)
committerEric Anholt <eric@anholt.net>
Wed, 8 Feb 2017 22:19:23 +0000 (14:19 -0800)
When drm_crtc_init_with_planes() was orignally added
(in drm_crtc.c, 22c89b87965b6dc5eb31b965dd09bdb0b3a46d8b
drm: Add drm_crtc_init_with_planes() (v2)), it only checked for "primary"
being non-null. If that was the case, it modified primary->possible_crtcs.

Then, when support for cursor planes was added
(4ae66c8276aeb3f7c61edd609c33f75eac950cc2 drm: Allow drivers to register
cursor planes with crtc), the same behaviour was implemented for cursor
planes.

vc4_plane_init() since its inception has passed 0xff as "possible_crtcs"
parameter to drm_universal_plane_init(). With a change in drm_crtc.c
(5ba7ceacacf832047e7541453e2b3819b9d11092 drm: don't override
possible_crtcs for primary/cursor planes) passing 0xff results in primary's
possible_crtcs set to 0xff (cursor was updated manually by vc4_crtc.c).
Consequently, it would be allowed to use the primary plane from CRTC 1 (for
example) on CRTC 0, which would result in the overlay and cursors being
buried.

Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: http://patchwork.freedesktop.org/patch/msgid/1485941708-27892-1-git-send-email-andrzej.p@samsung.com
Fixes: 5ba7ceacacf8 ("drm: don't override possible_crtcs for primary/cursor planes")
drivers/gpu/drm/vc4/vc4_plane.c

index 881bf489478b01b34e9e4df6013fe608c42215ee..686cdd3c86f2e9178768282a0dd173850e0bf063 100644 (file)
@@ -858,7 +858,7 @@ struct drm_plane *vc4_plane_init(struct drm_device *dev,
                }
        }
        plane = &vc4_plane->base;
-       ret = drm_universal_plane_init(dev, plane, 0xff,
+       ret = drm_universal_plane_init(dev, plane, 0,
                                       &vc4_plane_funcs,
                                       formats, num_formats,
                                       type, NULL);