drm/i915/psr: Restore PSR interrupt handler for HSW
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 9 Jun 2023 14:13:58 +0000 (17:13 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 16 Jun 2023 14:57:25 +0000 (17:57 +0300)
Add the PSR interrupt handling code back for HSW. Looks like
the removal was never completed anyway since the irq setup
code was lest untouched.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230609141404.12729-8-ville.syrjala@linux.intel.com
Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
drivers/gpu/drm/i915/display/intel_display_irq.c

index ae25787..ae98c99 100644 (file)
@@ -749,6 +749,20 @@ void ivb_display_irq_handler(struct drm_i915_private *dev_priv, u32 de_iir)
        if (de_iir & DE_ERR_INT_IVB)
                ivb_err_int_handler(dev_priv);
 
+       if (de_iir & DE_EDP_PSR_INT_HSW) {
+               struct intel_encoder *encoder;
+
+               for_each_intel_encoder_with_psr(&dev_priv->drm, encoder) {
+                       struct intel_dp *intel_dp = enc_to_intel_dp(encoder);
+                       u32 psr_iir;
+
+                       psr_iir = intel_uncore_rmw(&dev_priv->uncore,
+                                                  EDP_PSR_IIR, 0, 0);
+                       intel_psr_irq_handler(intel_dp, psr_iir);
+                       break;
+               }
+       }
+
        if (de_iir & DE_AUX_CHANNEL_A_IVB)
                intel_dp_aux_irq_handler(dev_priv);