[Intel-gfx] [PATCH 6/6] drm/i915/dp: Get TC link reference during DP detection
José Roberto de Souza
jose.souza at intel.com
Wed Mar 18 23:59:56 UTC 2020
As now the cost to lock and use a TC port is higher due the
implementation of the TCCOLD sequences it is worty to hold a reference
of the TC port to avoid all this locking at every aux transaction
part of the DisplayPort detection.
Cc: Imre Deak <imre.deak at intel.com>
Cc: Cooper Chiou <cooper.chiou at intel.com>
Cc: Kai-Heng Feng <kai.heng.feng at canonical.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
drivers/gpu/drm/i915/display/intel_dp.c | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index ef2e06e292d5..89b52211928b 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5718,6 +5718,7 @@ intel_dp_detect(struct drm_connector *connector,
struct intel_dp *intel_dp = intel_attached_dp(to_intel_connector(connector));
struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
struct intel_encoder *encoder = &dig_port->base;
+ enum phy phy = intel_port_to_phy(dev_priv, encoder->port);
enum drm_connector_status status;
drm_dbg_kms(&dev_priv->drm, "[CONNECTOR:%d:%s]\n",
@@ -5726,12 +5727,17 @@ intel_dp_detect(struct drm_connector *connector,
!drm_modeset_is_locked(&dev_priv->drm.mode_config.connection_mutex));
/* Can't disconnect eDP */
- if (intel_dp_is_edp(intel_dp))
+ if (intel_dp_is_edp(intel_dp)) {
status = edp_detect(intel_dp);
- else if (intel_digital_port_connected(encoder))
- status = intel_dp_detect_dpcd(intel_dp);
- else
- status = connector_status_disconnected;
+ } else {
+ if (intel_phy_is_tc(dev_priv, phy))
+ intel_tc_port_get_link(dig_port, 1);
+
+ if (intel_digital_port_connected(encoder))
+ status = intel_dp_detect_dpcd(intel_dp);
+ else
+ status = connector_status_disconnected;
+ }
if (status == connector_status_disconnected) {
memset(&intel_dp->compliance, 0, sizeof(intel_dp->compliance));
@@ -5809,6 +5815,9 @@ intel_dp_detect(struct drm_connector *connector,
if (status != connector_status_connected && !intel_dp->is_mst)
intel_dp_unset_edid(intel_dp);
+ if (intel_phy_is_tc(dev_priv, phy))
+ intel_tc_port_put_link(dig_port);
+
/*
* Make sure the refs for power wells enabled during detect are
* dropped to avoid a new detect cycle triggered by HPD polling.
--
2.25.2
More information about the Intel-gfx
mailing list