diff options
author | Jesse Barnes <jbarnes@virtuousgeek.org> | 2010-08-18 16:20:54 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2010-08-22 01:59:23 -0400 |
commit | 9d0498a2bf7455159b317f19531a3e5db2ecc9c4 (patch) | |
tree | 41f2a8b1013d2ee12852d8885b9952120f3d6ebb /drivers/gpu/drm/i915/intel_dp.c | |
parent | d240f20f545fa4ed78ce48d1eb62ab529f2b1467 (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_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index caaaa8f9db3e..9caccd03dccb 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1145,12 +1145,13 @@ intel_dp_set_link_train(struct intel_dp *intel_dp, | |||
1145 | { | 1145 | { |
1146 | struct drm_device *dev = intel_dp->base.enc.dev; | 1146 | struct drm_device *dev = intel_dp->base.enc.dev; |
1147 | struct drm_i915_private *dev_priv = dev->dev_private; | 1147 | struct drm_i915_private *dev_priv = dev->dev_private; |
1148 | struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.enc.crtc); | ||
1148 | int ret; | 1149 | int ret; |
1149 | 1150 | ||
1150 | I915_WRITE(intel_dp->output_reg, dp_reg_value); | 1151 | I915_WRITE(intel_dp->output_reg, dp_reg_value); |
1151 | POSTING_READ(intel_dp->output_reg); | 1152 | POSTING_READ(intel_dp->output_reg); |
1152 | if (first) | 1153 | if (first) |
1153 | intel_wait_for_vblank(dev); | 1154 | intel_wait_for_vblank(dev, intel_crtc->pipe); |
1154 | 1155 | ||
1155 | intel_dp_aux_native_write_1(intel_dp, | 1156 | intel_dp_aux_native_write_1(intel_dp, |
1156 | DP_TRAINING_PATTERN_SET, | 1157 | DP_TRAINING_PATTERN_SET, |