]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitcc98afaf8a7dea615a1fa7fd85d3049bd6b76523
treee309cf9bca9fc9c8d2f9e87757aa4901deefc727
parent10b14ad337a1c36235ffa3c5ce876937dd95e9ee
drm: vc4: adapt to new behaviour of drm_crtc.c

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