This is a note to let you know that I've just added the patch titled

    drm/radeon: fix hotplug of DP to DVI|HDMI passive adapters (v2)

to the 3.5-stable tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch
and it can be found in the queue-3.5 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From 266dcba541a1ef7e5d82d9e67c67fde2910636e8 Mon Sep 17 00:00:00 2001
From: Jerome Glisse <[email protected]>
Date: Thu, 19 Jul 2012 17:15:56 -0400
Subject: drm/radeon: fix hotplug of DP to DVI|HDMI passive adapters (v2)

From: Jerome Glisse <[email protected]>

commit 266dcba541a1ef7e5d82d9e67c67fde2910636e8 upstream.

No need to retrain the link for passive adapters.

v2: agd5f
- no passive DP to VGA adapters, update comments
- assign radeon_connector_atom_dig after we are sure
  we have a digital connector as analog connectors
  have different private data.
- get new sink type before checking for retrain.  No
  need to check if it's no longer a DP connection.

Signed-off-by: Jerome Glisse <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/gpu/drm/radeon/radeon_connectors.c |   27 ++++++++++++++++++++-------
 1 file changed, 20 insertions(+), 7 deletions(-)

--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -64,14 +64,27 @@ void radeon_connector_hotplug(struct drm
 
        /* just deal with DP (not eDP) here. */
        if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
-               int saved_dpms = connector->dpms;
+               struct radeon_connector_atom_dig *dig_connector =
+                       radeon_connector->con_priv;
 
-               /* Only turn off the display it it's physically disconnected */
-               if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
-                       drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
-               else if (radeon_dp_needs_link_train(radeon_connector))
-                       drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
-               connector->dpms = saved_dpms;
+               /* if existing sink type was not DP no need to retrain */
+               if (dig_connector->dp_sink_type != 
CONNECTOR_OBJECT_ID_DISPLAYPORT)
+                       return;
+
+               /* first get sink type as it may be reset after (un)plug */
+               dig_connector->dp_sink_type = 
radeon_dp_getsinktype(radeon_connector);
+               /* don't do anything if sink is not display port, i.e.,
+                * passive dp->(dvi|hdmi) adaptor
+                */
+               if (dig_connector->dp_sink_type == 
CONNECTOR_OBJECT_ID_DISPLAYPORT) {
+                       int saved_dpms = connector->dpms;
+                       /* Only turn off the display if it's physically 
disconnected */
+                       if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
+                               drm_helper_connector_dpms(connector, 
DRM_MODE_DPMS_OFF);
+                       else if (radeon_dp_needs_link_train(radeon_connector))
+                               drm_helper_connector_dpms(connector, 
DRM_MODE_DPMS_ON);
+                       connector->dpms = saved_dpms;
+               }
        }
 }
 


Patches currently in stable-queue which might be from [email protected] are

queue-3.5/drm-radeon-fix-hotplug-of-dp-to-dvi-hdmi-passive-adapters-v2.patch
queue-3.5/drm-radeon-on-hotplug-force-link-training-to-happen-v2.patch
queue-3.5/drm-radeon-fix-bo-creation-retry-path.patch
queue-3.5/drm-radeon-fix-dpms-on-off-on-trinity-aruba-v2.patch
queue-3.5/drm-radeon-fix-non-revealent-error-message.patch
queue-3.5/drm-radeon-fix-fence-related-segfault-in-cs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to