]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/display: Fix wrong z-order when updating overlay planes
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Fri, 18 Jan 2019 18:17:55 +0000 (13:17 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 19 Feb 2019 20:58:26 +0000 (15:58 -0500)
commitdb88555743dec6f9f9e2742659aaba78c4bfc454
tree54da4556408ea5921a93d31fd72410c911a567f8
parent4e417f6dd26047d335d1f7ef74ea9ebe1283c558
drm/amd/display: Fix wrong z-order when updating overlay planes

[Why]
If a commit updates an overlay plane via the legacy plane IOCTL
then the only plane in the state will be the overlay plane.

Overlay planes need to be added first to the DC context, but in the
scenario above the plane will be added last. This will result in wrong
z-order during rendering.

[How]
If any non-cursor plane has been updated then the rest of the
non-cursor planes should be added to the CRTC state.

The cursor plane doesn't need to be included for stream updates and
locking it will cause performance issues. It should be ignored.

DC requires that the surface count passed during stream updates
be the number of surfaces currently on the stream to enable fast
updates. This previously wasn't the case without this patch, so this
also allows this optimization to occur.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Tony Cheng <Tony.Cheng@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c