drm/i915/tgl: handle DP aux interrupts
authorLucas De Marchi <lucas.demarchi@intel.com>
Thu, 25 Jul 2019 23:48:13 +0000 (16:48 -0700)
committerLucas De Marchi <lucas.demarchi@intel.com>
Tue, 30 Jul 2019 19:31:08 +0000 (12:31 -0700)
For Tiger Lake the DE Port Interrupt Definition bits changed, so use the
new bit definitions.

Cc: Jose Souza <jose.souza@intel.com>
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: Anusha Srivatsa <anusha.srivatsa@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190713010940.17711-7-lucas.demarchi@intel.com
Link: https://patchwork.freedesktop.org/patch/msgid/20190725234813.27179-4-lucas.demarchi@intel.com
drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_reg.h

index e43582be24e6446d1fdeb6275f58d7c62756d19d..fbe13bacd5b701faa9b0b5b534719ce25a29feb3 100644 (file)
@@ -2951,19 +2951,25 @@ static void gen11_hpd_irq_handler(struct drm_i915_private *dev_priv, u32 iir)
 
 static u32 gen8_de_port_aux_mask(struct drm_i915_private *dev_priv)
 {
-       u32 mask = GEN8_AUX_CHANNEL_A;
+       u32 mask;
+
+       if (INTEL_GEN(dev_priv) >= 12)
+               /* TODO: Add AUX entries for USBC */
+               return TGL_DE_PORT_AUX_DDIA |
+                       TGL_DE_PORT_AUX_DDIB |
+                       TGL_DE_PORT_AUX_DDIC;
 
+       mask = GEN8_AUX_CHANNEL_A;
        if (INTEL_GEN(dev_priv) >= 9)
                mask |= GEN9_AUX_CHANNEL_B |
                        GEN9_AUX_CHANNEL_C |
                        GEN9_AUX_CHANNEL_D;
 
-       if (IS_CNL_WITH_PORT_F(dev_priv))
+       if (IS_CNL_WITH_PORT_F(dev_priv) || IS_GEN(dev_priv, 11))
                mask |= CNL_AUX_CHANNEL_F;
 
-       if (INTEL_GEN(dev_priv) >= 11)
-               mask |= ICL_AUX_CHANNEL_E |
-                       CNL_AUX_CHANNEL_F;
+       if (IS_GEN(dev_priv, 11))
+               mask |= ICL_AUX_CHANNEL_E;
 
        return mask;
 }
index e2f6634b65f40595b543617c1dcb7c87032793f2..21306dd3790aa4b0a86164976aa2c8e2d13259fc 100644 (file)
@@ -7418,6 +7418,9 @@ enum {
 #define  GEN8_PORT_DP_A_HOTPLUG                (1 << 3)
 #define  BXT_DE_PORT_GMBUS             (1 << 1)
 #define  GEN8_AUX_CHANNEL_A            (1 << 0)
+#define  TGL_DE_PORT_AUX_DDIC          (1 << 2)
+#define  TGL_DE_PORT_AUX_DDIB          (1 << 1)
+#define  TGL_DE_PORT_AUX_DDIA          (1 << 0)
 
 #define GEN8_DE_MISC_ISR _MMIO(0x44460)
 #define GEN8_DE_MISC_IMR _MMIO(0x44464)