aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sdvo.c
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-08-18 16:20:54 -0400
committerEric Anholt <eric@anholt.net>2010-08-22 01:59:23 -0400
commit9d0498a2bf7455159b317f19531a3e5db2ecc9c4 (patch)
tree41f2a8b1013d2ee12852d8885b9952120f3d6ebb /drivers/gpu/drm/i915/intel_sdvo.c
parentd240f20f545fa4ed78ce48d1eb62ab529f2b1467 (diff)
drm/i915: wait for actual vblank, not just 20ms
Waiting for a hard coded 20ms isn't always enough to make sure a vblank period has actually occurred, so add code to make sure we really have passed through a vblank period (or that the pipe is off when disabling). This prevents problems with mode setting and link training, and seems to fix a bug like https://bugs.freedesktop.org/show_bug.cgi?id=29278, but on an HP 8440p instead. Hopefully also fixes https://bugs.freedesktop.org/show_bug.cgi?id=29141. Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sdvo.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 5c765bb0845d..093e914e8a41 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1218,6 +1218,7 @@ static void intel_sdvo_dpms(struct drm_encoder *encoder, int mode)
1218 struct drm_device *dev = encoder->dev; 1218 struct drm_device *dev = encoder->dev;
1219 struct drm_i915_private *dev_priv = dev->dev_private; 1219 struct drm_i915_private *dev_priv = dev->dev_private;
1220 struct intel_sdvo *intel_sdvo = enc_to_intel_sdvo(encoder); 1220 struct intel_sdvo *intel_sdvo = enc_to_intel_sdvo(encoder);
1221 struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
1221 u32 temp; 1222 u32 temp;
1222 1223
1223 if (mode != DRM_MODE_DPMS_ON) { 1224 if (mode != DRM_MODE_DPMS_ON) {
@@ -1240,7 +1241,7 @@ static void intel_sdvo_dpms(struct drm_encoder *encoder, int mode)
1240 if ((temp & SDVO_ENABLE) == 0) 1241 if ((temp & SDVO_ENABLE) == 0)
1241 intel_sdvo_write_sdvox(intel_sdvo, temp | SDVO_ENABLE); 1242 intel_sdvo_write_sdvox(intel_sdvo, temp | SDVO_ENABLE);
1242 for (i = 0; i < 2; i++) 1243 for (i = 0; i < 2; i++)
1243 intel_wait_for_vblank(dev); 1244 intel_wait_for_vblank(dev, intel_crtc->pipe);
1244 1245
1245 status = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2); 1246 status = intel_sdvo_get_trained_inputs(intel_sdvo, &input1, &input2);
1246 /* Warn if the device reported failure to sync. 1247 /* Warn if the device reported failure to sync.