drm/i915/xelpd: Enhanced pipe underrun reporting
authorMatt Roper <matthew.d.roper@intel.com>
Wed, 26 May 2021 00:06:54 +0000 (17:06 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Wed, 26 May 2021 13:46:33 +0000 (06:46 -0700)
commit8bcc0840cf7ccf40db5e03cafe11c1cb28a0a73c
treec654d558a1bd9cc17d024d9c1d0375c4504f0701
parentabfe041de01f16d74df522d92cf5e3f6523971dd
drm/i915/xelpd: Enhanced pipe underrun reporting

XE_LPD brings enhanced underrun recovery:  the hardware can somewhat
mitigate underruns by using an interpolated replacement pixel (soft
underrun) or the previous pixel (hard underrun).  Furthermore, underruns
can now be caused downstream by the port, even if the pipe itself is
operating properly.  The interrupt register and PIPE_STATUS register
give us extra bits to recognize hard/soft underruns and determine
whether the underrun was caused by the port, so we'll use that
information to print some more descriptive errors when underruns occur.

v2:
 - Keep ICL's PIPE_STATUS defined separately from the old GMCH pipe
   status register.  (Ville)
 - Only read/clear the PIPE_STATUS register on platforms with
   display ver >= 11. (Lucas)
v3:
 - Actually enable+unmask all the new underrun interrupts, clear stale
   bits out from PIPE_STATUS before enabling the interrupts, report all
   FIFO underruns errors at once, rename a bunch of stuff to unconfuse
   vs. PIPESTAT. (Ville)

Bspec: 50335
Bspec: 50366
Cc: Lucas De Marchi <lucas.demarchi@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210526000656.3060314-2-matthew.d.roper@intel.com
drivers/gpu/drm/i915/display/intel_fifo_underrun.c
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_irq.h
drivers/gpu/drm/i915/i915_reg.h