[Intel-gfx] [RFC PATCH v2] drm/i915/dp: try normal detection on connector force enable

Jani Nikula jani.nikula at intel.com
Wed Jun 20 08:48:47 UTC 2018


Connector force enable on DP bypasses the detect hooks, skipping all the
DPCD parameter reading and negotiation. This does not really have a
chance to work, at all, and any modesets are bound to fail.

Try to do the normal detection in the force hook on force enable.

v2: fix unused variable warnings

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103347
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106291
Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula at intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 16 ++++++----------
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 6ac6c8787dcf..93db47ecda06 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4955,21 +4955,17 @@ static void
 intel_dp_force(struct drm_connector *connector)
 {
 	struct intel_dp *intel_dp = intel_attached_dp(connector);
-	struct intel_encoder *intel_encoder = &dp_to_dig_port(intel_dp)->base;
-	struct drm_i915_private *dev_priv = to_i915(intel_encoder->base.dev);
 
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
 		      connector->base.id, connector->name);
 	intel_dp_unset_edid(intel_dp);
 
-	if (connector->status != connector_status_connected)
-		return;
-
-	intel_display_power_get(dev_priv, intel_dp->aux_power_domain);
-
-	intel_dp_set_edid(intel_dp);
-
-	intel_display_power_put(dev_priv, intel_dp->aux_power_domain);
+	/*
+	 * Force enable doesn't really work with DP. Try the normal detect path
+	 * anyway to read the DPCD etc.
+	 */
+	if (connector->status == connector_status_connected)
+		drm_helper_probe_detect(connector, NULL, false);
 }
 
 static int intel_dp_get_modes(struct drm_connector *connector)
-- 
2.11.0



More information about the Intel-gfx mailing list