• Nicholas Kazlauskas's avatar
    drm/amd/display: Fix wrong z-order when updating overlay planes · 2d9e6431
    Nicholas Kazlauskas authored
    [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: default avatarNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
    Reviewed-by: default avatarLeo Li <sunpeng.li@amd.com>
    Acked-by: default avatarTony Cheng <Tony.Cheng@amd.com>
    Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
    2d9e6431
amdgpu_dm.c 171 KB