drm/amd/display: Maintain z-ordering when creating planes
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Mon, 25 Mar 2019 16:17:14 +0000 (12:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 15 Apr 2019 05:20:49 +0000 (00:20 -0500)
commitf6ff2a08f49d565e38300f1a9d2f13359c7efc54
tree24638e5aef9ce805812fed8c6f376aa2bcc58e7a
parent7817183227798d32e0f49f2bfe865da05e48623a
drm/amd/display: Maintain z-ordering when creating planes

[Why]
The overlay will be incorrectly placed *below* the primary plane for
commits with state->allow_modeset = true because the primary plane
won't be removed and recreated in the same commit.

[How]
Add the should_reset_plane helper to determine if the plane should be
reset or not. If we need to add or force reset any plane in the context
then we'll need to do the same for every plane on the stream.

Unfortunately we need to do the remove / recreate routine for removing
planes as well since DC currently isn't well equipped to handle the
plane with the top pipe being removed with other planes still active.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Sun peng Li <Sunpeng.Li@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c