summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/gma500/psb_intel_sdvo.c
diff options
context:
space:
mode:
authorPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2013-04-15 22:02:07 +0200
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>2013-04-15 23:38:06 +0200
commit4dd6a897959aca968c59f0b2bc08c2d855cd553c (patch)
tree3eabc9d7968c58be2a0d849255021ba68056ca66 /drivers/gpu/drm/gma500/psb_intel_sdvo.c
parent0c1a14c2c17f13c1869e82783bd49774bba67254 (diff)
drm/gma500: Check connector status before restoring sdvo
This patch fixes a bug introduced by: commit 749387dc8d8270b279f27a0a794cdf4f4a4aa774 Author: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Date: Sun Apr 7 16:35:50 2013 +0200 drm/gma500: Fix hibernation problems on sdvo encoders The bug is triggered when we do a mode set on a sdvo encoder with all connectors in the disconnected state. A crtc is considered enabled by drm even though all of its connectors are disconnected. Work around this by adding a check in our sdvo restore function. Also remove the unneeded dpms on. Prepare and Commit will take care of that. Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/gma500/psb_intel_sdvo.c')
-rw-r--r--drivers/gpu/drm/gma500/psb_intel_sdvo.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/gma500/psb_intel_sdvo.c b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
index cd1b40722edd..19e36603b23b 100644
--- a/drivers/gpu/drm/gma500/psb_intel_sdvo.c
+++ b/drivers/gpu/drm/gma500/psb_intel_sdvo.c
@@ -1854,12 +1854,11 @@ static void psb_intel_sdvo_restore(struct drm_connector *connector)
REG_WRITE(sdvo->sdvo_reg, sdvo->saveSDVO);
- /* Force dpms on upon resume */
- psb_intel_sdvo_dpms(encoder, DRM_MODE_DPMS_ON);
-
/* Force a full mode set on the crtc. We're supposed to have the
mode_config lock already. */
- drm_crtc_helper_set_mode(crtc, &crtc->mode, crtc->x, crtc->y, NULL);
+ if (connector->status == connector_status_connected)
+ drm_crtc_helper_set_mode(crtc, &crtc->mode, crtc->x, crtc->y,
+ NULL);
}
static const struct drm_encoder_helper_funcs psb_intel_sdvo_helper_funcs = {