]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commit
drm/i915: Reorganize plane register writes to make them more atomic
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 14 Nov 2018 21:07:17 +0000 (23:07 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 28 Nov 2018 19:51:50 +0000 (21:51 +0200)
commit83234d13f9fda65e6c1a5e5900aa247334b1a621
tree2d6ceccfc2b902e7f85a1ca8a16e57d44da4593f
parent1aca96cc545536fc00b533764135ced79a9a65ba
drm/i915: Reorganize plane register writes to make them more atomic

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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20181114210729.16185-2-ville.syrjala@linux.intel.com
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_sprite.c