Skip to content

Commit 01bb630

Browse files
mattropejlahtine-intel
authored andcommitted
drm/i915/ehl: Make icp_digital_port_connected() use phy instead of port
When looking at SDEISR to determine the connection status of combo outputs, we should use the phy index rather than the port index. Although they're usually the same thing, EHL's DDI-D (port D) is attached to PHY-A and SDEISR doesn't even have bits for a "D" output. It's also possible that future platforms may map DDIs (the internal display engine programming units) to PHYs (the output handling on the IO side) in ways where port!=phy, so let's look at the PHY index by default. v2: Rename to intel_combo_phy_connected. (Lucas) Fixes: 719d240 ("drm/i915/ehl: Enable DDI-D") Cc: José Roberto de Souza <[email protected]> Cc: Lucas De Marchi <[email protected]> Signed-off-by: Matt Roper <[email protected]> Reviewed-by: Lucas De Marchi <[email protected]> Reviewed-by: José Roberto de Souza <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 3d1e388) Signed-off-by: Joonas Lahtinen <[email protected]>
1 parent 4afaab7 commit 01bb630

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5476,15 +5476,13 @@ static bool bxt_digital_port_connected(struct intel_encoder *encoder)
54765476
return I915_READ(GEN8_DE_PORT_ISR) & bit;
54775477
}
54785478

5479-
static bool icl_combo_port_connected(struct drm_i915_private *dev_priv,
5480-
struct intel_digital_port *intel_dig_port)
5479+
static bool intel_combo_phy_connected(struct drm_i915_private *dev_priv,
5480+
enum phy phy)
54815481
{
5482-
enum port port = intel_dig_port->base.port;
5483-
5484-
if (HAS_PCH_MCC(dev_priv) && port == PORT_C)
5482+
if (HAS_PCH_MCC(dev_priv) && phy == PHY_C)
54855483
return I915_READ(SDEISR) & SDE_TC_HOTPLUG_ICP(PORT_TC1);
54865484

5487-
return I915_READ(SDEISR) & SDE_DDI_HOTPLUG_ICP(port);
5485+
return I915_READ(SDEISR) & SDE_DDI_HOTPLUG_ICP(phy);
54885486
}
54895487

54905488
static bool icl_digital_port_connected(struct intel_encoder *encoder)
@@ -5494,7 +5492,7 @@ static bool icl_digital_port_connected(struct intel_encoder *encoder)
54945492
enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
54955493

54965494
if (intel_phy_is_combo(dev_priv, phy))
5497-
return icl_combo_port_connected(dev_priv, dig_port);
5495+
return intel_combo_phy_connected(dev_priv, phy);
54985496
else if (intel_phy_is_tc(dev_priv, phy))
54995497
return intel_tc_port_connected(dig_port);
55005498
else

0 commit comments

Comments
 (0)