• Ville Syrjälä's avatar
    drm/i915: Reorganize plane register writes to make them more atomic · 83234d13
    Ville Syrjälä authored
    Some observations about the plane registers:
    - the control register will self-arm if the plane is not already
      enabled, thus we want to write it as close to (or ideally after)
      the surface register
    - tileoff/linoff/offset/aux_offset are self-arming as well so we want
      them close to the surface register as well
    - color keying registers we maybe self arming before SKL. Not 100%
      sure but we can try to keep them near to the surface register
      as well
    - chv pipe b csc register are double buffered but self arming so
      moving them down a bit
    - the rest should be mostly armed by the surface register so we can
      safely write them first, and to just for some consistency let's try
      to follow keep them in order based on the register offset
    
    None of this will have any effect of course unless the vblank evasion
    fails (which it still does sometimes). Another potential future benefit
    might be pulling the non-self armings registers outside the vblank
    evasion since they won't latch until the arming register has been
    written. This would make the critical section a bit lighter and thus
    less likely to exceed the deadline.
    
    v2: Rebase due to input CSC
    v3: Swap LINOFF/TILEOFF and KEYMSK/KEYMAX to actually follow
        the last rule above (Matt)
        Add a bit more rationale to the commit message (Matt)
    
    Cc: Matt Roper <matthew.d.roper@intel.com>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-2-ville.syrjala@linux.intel.comReviewed-by: default avatarMatt Roper <matthew.d.roper@intel.com>
    Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
    83234d13
intel_sprite.c 63.1 KB