diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-22 15:41:25 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-05-24 11:54:07 -0400 |
commit | bf2125e2f7e931b50a6c76ba0435ba001409ccbf (patch) | |
tree | 1dbd4c96d6a988955d65cad5aa772ac6b53bdf51 /drivers/gpu | |
parent | 3347111999870c37eab1b969e90af9fdaf0334ba (diff) |
drm/i915: wait for a vblank to pass after tv detect
Otherwise the hw will get confused and result in a black screen.
This regression has been most likely introduce in
commit 974b93315b2213b74a42a87e8a9d4fc8c0dbe90c
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Sun Sep 5 00:44:20 2010 +0100
drm/i915/tv: Poll for DAC state change
That commit replace the first msleep(20) with a busy-loop, but failed
to keep the 2nd msleep around. Later on we've replaced all these
msleep(20) by proper vblanks.
For reference also see the commit in xf86-video-intel:
commit 1142be53eb8d2ee8a9b60ace5d49f0ba27332275
Author: Jesse Barnes <jbarnes@hobbes.lan>
Date: Mon Jun 9 08:52:59 2008 -0700
Fix TV programming: add vblank wait after TV_CTL writes
Fxies FDO bug #14000; we need to wait for vblank after
writing TV_CTL or following "DPMS on" calls may not actually enable the output.
v2: As suggested by Chris Wilson, add a small comment to ensure that
no one accidentally removes this vblank wait again - there really
seems to be no sane explanation for why we need it, but it is
required.
Launchpad: https://bugs.launchpad.net/ubuntu/+source/xserver-xorg-video-intel/+bug/763688
Reported-and-Tested-by: Robert Lowery <rglowery@exemail.com.au>
Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
Cc: stable@vger.kernel.org
Acked-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 3346612d295..475f6d4d97f 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1194,6 +1194,11 @@ intel_tv_detect_type(struct intel_tv *intel_tv, | |||
1194 | 1194 | ||
1195 | I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN); | 1195 | I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN); |
1196 | I915_WRITE(TV_CTL, save_tv_ctl); | 1196 | I915_WRITE(TV_CTL, save_tv_ctl); |
1197 | POSTING_READ(TV_CTL); | ||
1198 | |||
1199 | /* For unknown reasons the hw barfs if we don't do this vblank wait. */ | ||
1200 | intel_wait_for_vblank(intel_tv->base.base.dev, | ||
1201 | to_intel_crtc(intel_tv->base.base.crtc)->pipe); | ||
1197 | 1202 | ||
1198 | /* Restore interrupt config */ | 1203 | /* Restore interrupt config */ |
1199 | if (connector->polled & DRM_CONNECTOR_POLL_HPD) { | 1204 | if (connector->polled & DRM_CONNECTOR_POLL_HPD) { |