[Intel-gfx] Valid DP connection without EDID?

Takashi Iwai tiwai at suse.de
Fri Sep 14 16:19:22 CEST 2012


Hi,

we've got a machine showing a ghost DP2 output on a docking station.
The docking station has only one DP port and it's connected to DP1.
As a result, we get an DP2 active output containing the bogus VESA
standard modes 1024x768, 800x600, 640x480 although it's not connected
at all.

Looking a bit deeply on it, it seems that the connector gives actually
the valid DPCD.  So intel_dp_detect() returns
connector_status_connected.  But since there is no real connection,
EDID isn't obtained.  Thus of course no valid modes set.

A quick patch below adds (moves) a check of EDID and returns the
disconnected state when no valid EDID is returned.  An open question
is whether this is really safe.  Is there any case where no valid EDID
is returned but the connection is still valid?


thanks,

Takashi

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index a6c426a..144da02 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2200,16 +2200,17 @@ intel_dp_detect(struct drm_connector *connector, bool force)
 
 	intel_dp_probe_oui(intel_dp);
 
+	edid = intel_dp_get_edid(connector, &intel_dp->adapter);
+	if (!edid)
+		return connector_status_disconnected;
+
 	if (intel_dp->force_audio != HDMI_AUDIO_AUTO) {
 		intel_dp->has_audio = (intel_dp->force_audio == HDMI_AUDIO_ON);
 	} else {
-		edid = intel_dp_get_edid(connector, &intel_dp->adapter);
-		if (edid) {
-			intel_dp->has_audio = drm_detect_monitor_audio(edid);
-			connector->display_info.raw_edid = NULL;
-			kfree(edid);
-		}
+		intel_dp->has_audio = drm_detect_monitor_audio(edid);
 	}
+	connector->display_info.raw_edid = NULL;
+	kfree(edid);
 
 	return connector_status_connected;
 }




More information about the Intel-gfx mailing list