• Maarten Lankhorst's avatar
    drm/atomic: Make async plane update checks work as intended, v2. · 669c9215
    Maarten Lankhorst authored
    By always keeping track of the last commit in plane_state, we know
    whether there is an active update on the plane or not. With that
    information we can reject the fast update, and force the slowpath
    to be used as was originally intended.
    
    We cannot use plane_state->crtc->state here, because this only mentions
    the most recent commit for the crtc, but not the planes that were part
    of it. We specifically care about what the last commit involving this
    plane is, which can only be tracked with a pointer in the plane state.
    
    Changes since v1:
    - Clean up the whole function here, instead of partially earlier.
    - Add mention in the commit message why we need commit in plane_state.
    - Swap plane->state in intel_legacy_cursor_update, instead of
      reassigning all variables. With this commit We know that the cursor
      is not part of any active commits so this hack can be removed.
    
    Cc: Gustavo Padovan <gustavo.padovan@collabora.com>
    Signed-off-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    Reviewed-by: default avatarGustavo Padovan <gustavo.padovan@collabora.com>
    Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> #v1
    Link: https://patchwork.freedesktop.org/patch/msgid/20170904104838.23822-7-maarten.lankhorst@linux.intel.com
    [mlankhorst: Amend commit for merge conflicts with drm-intel]
    669c9215
drm_plane.h 20.3 KB