• José Roberto de Souza's avatar
    drm/i915/display: Fix glitches when moving cursor with PSR2 selective fetch enabled · ef39826c
    José Roberto de Souza authored
    Legacy cursor APIs are handled by intel_legacy_cursor_update(), that
    calls drm_atomic_helper_update_plane() when going through the
    slow/atomic path to update cursor, what was the case for PSR2
    selective fetch.
    
    drm_atomic_helper_update_plane() sets
    drm_atomic_state->legacy_cursor_update to true when updating the
    cursor plane, to allow several cursor updates to happen within the
    same frame, as userspace does that.
    If drivers waited for a vblank increment at the end of every cursor
    movement that would cause a visible lag in the cursor.
    
    But this optimization do not properly work with PSR2 selective fetch
    dirt area calculation, for example if within a single frame the cursor
    had 3 moves the final dirt area programmed to PSR2_MAN_TRK_CTL would
    be based in the second movement as old state and third movement as new
    state, not updating the area where cursor was in the first state.
    
    So here switching back to the fast path approach in
    intel_legacy_cursor_update() and handling cursor movements as
    frontbuffer rendering(psr_force_hw_tracking_exit()), that is not the
    most optimal for power-savings but is the solution that we have until
    mailbox style updates is implemented.
    
    Also removing the cursor workaround as not it is properly undestand
    the issue and is know that it will never cover all the cases.
    
    Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
    Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
    Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
    Acked-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Reviewed-by: default avatarGwan-gyeong Mun <gwan-gyeong.mun@intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20210930001409.254817-5-jose.souza@intel.com
    ef39826c
intel_fbc.c 44.8 KB