From: Ville Syrjälä <ville.syrj...@linux.intel.com>

Xorg/modesetting expects to be able to change the modifier already
when submitting the first async flip. Let's convert the first async
flip to a sync flip so that we can accommodate it. For now I limit
this behaviour to skl+ since earlier platforms don't support async
flips with anything but X-tile anyway, but we could extend this if
needed to allow eg. stride changes/etc.

We already convert the first async flip to a sync flip on on ADL+
to reprogram the watermarks/DDB, and on BDW-GLK the hardware
anyway converts the first async flip to a sync flip (due to the
double buffering behaviour of the async flip bit). So actually
this will only slow down the first async flip on ICL and TGL.

I've also included a workaround for async flip GGTT/DMAR faults
on ADL. Just bumping the alignment to 16k seems effective, and
so that seems like a reasonable enough solution for the moment.
But this probably needs further analysis later.

Test-with: 20240319202443.27951-1-ville.syrj...@linux.intel.com

Ville Syrjälä (6):
  drm/i915: Align PLANE_SURF to 16k on ADL for async flips
  drm/i915: Reject async flips if we need to change DDB/watermarks
  drm/i915: Allow the initial async flip to change modifier
  drm/i915: Eliminate extra frame from skl-glk sync->async flip change
  drm/i915: s/need_async_flip_disable_wa/need_async_flip_toggle_wa/
  drm/i915: Extract ilk_must_disable_lp_wm()

 drivers/gpu/drm/i915/display/i9xx_plane.c     |   7 +-
 .../gpu/drm/i915/display/intel_atomic_plane.c | 118 ++++++++++++------
 drivers/gpu/drm/i915/display/intel_display.c  |   9 +-
 .../drm/i915/display/intel_display_types.h    |   2 +-
 drivers/gpu/drm/i915/display/intel_dpt.c      |   7 +-
 drivers/gpu/drm/i915/display/intel_dpt.h      |   3 +-
 drivers/gpu/drm/i915/display/intel_fb.c       |  17 ++-
 drivers/gpu/drm/i915/display/intel_fb_pin.c   |  10 +-
 .../drm/i915/display/skl_universal_plane.c    |   8 +-
 drivers/gpu/drm/i915/display/skl_watermark.c  |  12 ++
 10 files changed, 137 insertions(+), 56 deletions(-)

-- 
2.43.2

Reply via email to