drm/i915/ehl: Port C's hotplug interrupt is associated with TC1 bits
authorVivek Kasireddy <vivek.kasireddy@intel.com>
Fri, 11 Oct 2019 00:26:18 +0000 (17:26 -0700)
committerMatt Roper <matthew.d.roper@intel.com>
Mon, 14 Oct 2019 16:16:27 +0000 (09:16 -0700)
On platforms that have the MCC PCH, Port C's hotplug interrupt
bits are mapped to TC1 bits.

Suggested-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reviewed-by: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Matt Roper <matthew.d.roper@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191011002618.3087-1-vivek.kasireddy@intel.com
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/i915_irq.c

index 38aa09cfbed3e14619096d29d228b00e8e598b83..830c71e5c8616d9a96652a292c826239232082e3 100644 (file)
@@ -5282,6 +5282,9 @@ static bool icl_combo_port_connected(struct drm_i915_private *dev_priv,
 {
        enum port port = intel_dig_port->base.port;
 
+       if (HAS_PCH_MCC(dev_priv) && port == PORT_C)
+               return I915_READ(SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
+
        return I915_READ(SDEISR) & SDE_DDI_HOTPLUG_ICP(port);
 }
 
index 3af7f7914c40b6f4a55f30aae6689125ed5f570c..a7c968b01af3dfdaa2e6db52316c2257828e24dc 100644 (file)
@@ -2249,8 +2249,8 @@ static void icp_irq_handler(struct drm_i915_private *dev_priv, u32 pch_iir)
                tc_port_hotplug_long_detect = tgp_tc_port_hotplug_long_detect;
                pins = hpd_tgp;
        } else if (HAS_PCH_MCC(dev_priv)) {
-               ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_TGP;
-               tc_hotplug_trigger = 0;
+               ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
+               tc_hotplug_trigger = pch_iir & SDE_TC_HOTPLUG_ICP(PORT_TC1);
                pins = hpd_icp;
        } else {
                ddi_hotplug_trigger = pch_iir & SDE_DDI_MASK_ICP;
@@ -3377,8 +3377,8 @@ static void icp_hpd_irq_setup(struct drm_i915_private *dev_priv,
 static void mcc_hpd_irq_setup(struct drm_i915_private *dev_priv)
 {
        icp_hpd_irq_setup(dev_priv,
-                         SDE_DDI_MASK_TGP, 0,
-                         TGP_DDI_HPD_ENABLE_MASK, 0,
+                         SDE_DDI_MASK_ICP, SDE_TC_HOTPLUG_ICP(PORT_TC1),
+                         ICP_DDI_HPD_ENABLE_MASK, ICP_TC_HPD_ENABLE(PORT_TC1),
                          hpd_icp);
 }