• Nicholas Kazlauskas's avatar
    drm/amd/display: Don't change mpcc tree for medium updates on DCN20 hwseq · c97c8d77
    Nicholas Kazlauskas authored
    [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: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarChris Park <Chris.Park@amd.com>
    Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    c97c8d77
dcn20_hwseq.c 73.8 KB