From 99f69ddf1b58611456e52c5b600bd7b46e16f408 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Tue, 17 Apr 2012 11:36:45 -0400 Subject: [PATCH] drm/radeon/kms: fix DP re-plug We want to use the DPMS paths to re-program the display hw, but don't actually want to change the DPMS state. Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=46711 Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- drivers/gpu/drm/radeon/radeon_connectors.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index bd05156..910ea6d 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c @@ -64,13 +64,20 @@ void radeon_connector_hotplug(struct drm_connector *connector) /* just deal with DP (not eDP) here. */ if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) { + /* save the dpms state since we don't actually want to change it, + * we just want to use the dpms code pathes to turn the reprogram + * the display hw. + */ int saved_dpms = connector->dpms; /* Only turn off the display it it's physically disconnected */ - if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) + if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) { + connector->dpms = DRM_MODE_DPMS_ON; drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF); - else if (radeon_dp_needs_link_train(radeon_connector)) + } else if (radeon_dp_needs_link_train(radeon_connector)) { + connector->dpms = DRM_MODE_DPMS_OFF; drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON); + } connector->dpms = saved_dpms; } } -- 1.7.7.5