drm/amd/display: Don't change mpcc tree for medium updates on DCN20 hwseq
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Sun, 5 Apr 2020 20:40:47 +0000 (16:40 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 9 Apr 2020 14:43:16 +0000 (10:43 -0400)
commitc97c8d77b11fcf4c18c2f67dd3878781b1b5c2ff
tree2ee87ce94b836680bb5b0e24324792f510f99917
parentc5f5b9d934ba897182ba7159f4d1f1ff06234e3e
drm/amd/display: Don't change mpcc tree for medium updates on DCN20 hwseq

[Why]
Overlay planes disappear when the plane's alpha blending mode or global
opacity is modified.

These are considered UPDATE_TYPE_MEDIUM and trigger the update_mpcc path
in the DCN hardware sequencer.

On DCN10 we have an "optimization" to avoid touching the blending tree
on these updates, but this is actually required behavior based on how
update_mpcc is structured.

For full updates we acquire a MPCC for the plane, remove it if it
already exists then reinsert it after with insert_plane.

The call to insert_plane can take an optional mpcc to insert the new one
above to preserve the current blending order. The update_mpcc hwseq
function doesn't do this so the overlay gets sent to the very bottom
of the tree.

[How]
Copy the check over from DCN10 to DCN20. The only time we need to
actually touch the tree really is the full update, so this is also
an optimization on top of the fix.

Fixing the logic for insert_plane is rather simple (cache the bot_mpcc
and pass it to insert_plane) but is a change that impacts most display
usecases.

For now stick with the optimization.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Chris Park <Chris.Park@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c