]> 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)
commit8812a9ca26077bdc169261b9d17cdf983bff7893
treee309cf9bca9fc9c8d2f9e87757aa4901deefc727
parent3817fb10340d8abb0fc6bea606c8410bf0d56dd2
drm: vc4: adapt to new behaviour of drm_crtc.c

When drm_crtc_init_with_planes() was orignally added
(in drm_crtc.c, f758a46bd16bbc6ca3c2ecad2fa6de1c87b0119c
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
(3a8f74c038b704bb959a56f033b80959b55687b1 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
(6feb34178bbe37d292ac6deccba4db72591f506b 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: 6feb34178bbe ("drm: don't override possible_crtcs for primary/cursor planes")
drivers/gpu/drm/vc4/vc4_plane.c