• Nicholas Kazlauskas's avatar
    drm/amd/display: Maintain z-ordering when creating planes · f6ff2a08
    Nicholas Kazlauskas authored
    [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: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarSun peng Li <Sunpeng.Li@amd.com>
    Acked-by: Bhawanpreet Lakha <Bhawanpreet Lakha@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    f6ff2a08
amdgpu_dm.c 186 KB