Skip to contentSkip to conversation

drm/radeon/kms: fix dp_detect handling for DP bridge chips

PATCH In review [email protected] 2 participants 2 messages Oct 4, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/radeon/kms: fix dp_detect handling for DP bridge chips

From: Alex Deucher <[email protected]>

The HPD pin is not reliable for detecting whether a monitor is connected or not. Skip HPD and just use DDC or load detection.

Fixes phantom VGA connected bugs.

---
 drivers/gpu/drm/radeon/radeon_connectors.c |   21 ++++++---------------
 1 files changed, 6 insertions(+), 15 deletions(-)
drivers/gpu/drm/radeon/radeon_connectors.c +6 -15
index bce63fd..449c3d8 100644
@@ -1303,23 +1303,14 @@ radeon_dp_detect(struct drm_connector *connector, bool force)
 		/* get the DPCD from the bridge */
 		radeon_dp_getdpcd(radeon_connector);
 
-		if (radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
-			ret = connector_status_connected;
-		else {
-			/* need to setup ddc on the bridge */
-			if (encoder)
-				radeon_atom_ext_encoder_setup_ddc(encoder);
+		if (encoder) {
+			/* setup ddc on the bridge */
+			radeon_atom_ext_encoder_setup_ddc(encoder);
 			if (radeon_ddc_probe(radeon_connector,
-					     radeon_connector->requires_extended_probe))
+					     radeon_connector->requires_extended_probe)) /* try DDC */
 				ret = connector_status_connected;
-		}
-
-		if ((ret == connector_status_disconnected) &&
-		    radeon_connector->dac_load_detect) {
-			struct drm_encoder *encoder = radeon_best_single_encoder(connector);
-			struct drm_encoder_helper_funcs *encoder_funcs;
-			if (encoder) {
-				encoder_funcs = encoder->helper_private;
+			else if (radeon_connector->dac_load_detect) { /* try load detection */
+				struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private;
 				ret = encoder_funcs->detect(encoder, connector);
 			}
 		}
Signature · 1 line
1.7.1.1
Reviewed-by Tested-by on v1 1/1
#1 lore raw
Quoted 9 lines · On Die, 2011-10-04 at 12:23 -0400, [email protected] wrote:

From: Alex Deucher <[email protected]>

The HPD pin is not reliable for detecting whether a monitor is connected or not. Skip HPD and just use DDC or load detection.

Fixes phantom VGA connected bugs.

Just verified that it no longer incorrectly detects VGA as connected on my Llano board.

Signature · 6 lines
Earthling Michel Dänzer           |                   http://www.amd.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel