aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2012-07-19 17:25:55 -0400
committerLuis Henriques <luis.henriques@canonical.com>2012-08-13 09:10:36 -0400
commitfe42a286d03c467500a813a7f8fa01ab2de952b3 (patch)
tree87716b54b36858fdc359a7f12cf1fa8bbc437583 /drivers/gpu
parente6b86c3ec109948eb3bad9f2028f195a8f94e510 (diff)
drm/radeon: on hotplug force link training to happen (v2)
BugLink: http://bugs.launchpad.net/bugs/1034988 commit ca2ccde5e2f24a792caa4cca919fc5c6f65d1887 upstream. To have DP behave like VGA/DVI we need to retrain the link on hotplug. For this to happen we need to force link training to happen by setting connector dpms to off before asking it turning it on again. v2: agd5f - drop the dp_get_link_status() change in atombios_dp.c for now. We still need the dpms OFF change. Signed-off-by: Jerome Glisse <jglisse@redhat.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/radeon/radeon_connectors.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index aaa526213c1..322066636d6 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -79,10 +79,16 @@ void radeon_connector_hotplug(struct drm_connector *connector)
79 if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) { 79 if (dig_connector->dp_sink_type == CONNECTOR_OBJECT_ID_DISPLAYPORT) {
80 int saved_dpms = connector->dpms; 80 int saved_dpms = connector->dpms;
81 /* Only turn off the display if it's physically disconnected */ 81 /* Only turn off the display if it's physically disconnected */
82 if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) 82 if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
83 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); 83 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
84 else if (radeon_dp_needs_link_train(radeon_connector)) 84 } else if (radeon_dp_needs_link_train(radeon_connector)) {
85 /* set it to OFF so that drm_helper_connector_dpms()
86 * won't return immediately since the current state
87 * is ON at this point.
88 */
89 connector->dpms = DRM_MODE_DPMS_OFF;
85 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); 90 drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
91 }
86 connector->dpms = saved_dpms; 92 connector->dpms = saved_dpms;
87 } 93 }
88 } 94 }