drm/i915/irq: Clear GFX_MSTR_IRQ as part of IRQ reset
authorGustavo Sousa <gustavo.sousa@intel.com>
Wed, 20 Sep 2023 19:53:52 +0000 (16:53 -0300)
committerLucas De Marchi <lucas.demarchi@intel.com>
Mon, 25 Sep 2023 16:04:32 +0000 (09:04 -0700)
Starting with Xe_LP+, GFX_MSTR_IRQ contains status bits that have W1C
behavior. If we do not properly reset them, we would miss delivery of
interrupts if a pending bit is set when enabling IRQs.

As an example, the display part of our probe routine contains paths
where we wait for vblank interrupts. If a display interrupt was already
pending when enabling IRQs, we would time out waiting for the vblank.

Avoid the potential issue by clearing GFX_MSTR_IRQ as part of the IRQ
reset.

v2:
  - Move logic from gen11_gt_irq_reset() to dg1_irq_reset(). (Matt)

BSpec: 50875, 54028
Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Gustavo Sousa <gustavo.sousa@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230920195351.59421-2-gustavo.sousa@intel.com
drivers/gpu/drm/i915/i915_irq.c

index 1bfcfbe6e30b8edfde1d8022ddff2c9712bc33a6..8130f043693b17c7f15a902e9eb080c7de760f00 100644 (file)
@@ -751,6 +751,8 @@ static void dg1_irq_reset(struct drm_i915_private *dev_priv)
 
        GEN3_IRQ_RESET(uncore, GEN11_GU_MISC_);
        GEN3_IRQ_RESET(uncore, GEN8_PCU_);
+
+       intel_uncore_write(uncore, GEN11_GFX_MSTR_IRQ, ~0);
 }
 
 static void cherryview_irq_reset(struct drm_i915_private *dev_priv)