Commit 4f233eff authored by Pekka Enberg's avatar Pekka Enberg Committed by Chris Wilson

i915: Fix spurious TV detection after 9d0498a2 + 9559fcdb

Partial revert of 9d0498a2.
Signed-off-by: default avatarPekka Enberg <penberg@kernel.org>
Tested-by: default avatarHugh Dickins <hughd@google.com>
Tested-by: default avatarSven Joachim <svenjoac@gmx.de>
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
parent c74696b9
...@@ -1231,7 +1231,6 @@ intel_tv_detect_type (struct intel_tv *intel_tv) ...@@ -1231,7 +1231,6 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
struct drm_encoder *encoder = &intel_tv->base.enc; struct drm_encoder *encoder = &intel_tv->base.enc;
struct drm_device *dev = encoder->dev; struct drm_device *dev = encoder->dev;
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
struct intel_crtc *intel_crtc = to_intel_crtc(encoder->crtc);
unsigned long irqflags; unsigned long irqflags;
u32 tv_ctl, save_tv_ctl; u32 tv_ctl, save_tv_ctl;
u32 tv_dac, save_tv_dac; u32 tv_dac, save_tv_dac;
...@@ -1268,11 +1267,15 @@ intel_tv_detect_type (struct intel_tv *intel_tv) ...@@ -1268,11 +1267,15 @@ intel_tv_detect_type (struct intel_tv *intel_tv)
DAC_C_0_7_V); DAC_C_0_7_V);
I915_WRITE(TV_CTL, tv_ctl); I915_WRITE(TV_CTL, tv_ctl);
I915_WRITE(TV_DAC, tv_dac); I915_WRITE(TV_DAC, tv_dac);
intel_wait_for_vblank(dev, intel_crtc->pipe); POSTING_READ(TV_DAC);
msleep(20);
tv_dac = I915_READ(TV_DAC); tv_dac = I915_READ(TV_DAC);
I915_WRITE(TV_DAC, save_tv_dac); I915_WRITE(TV_DAC, save_tv_dac);
I915_WRITE(TV_CTL, save_tv_ctl); I915_WRITE(TV_CTL, save_tv_ctl);
intel_wait_for_vblank(dev, intel_crtc->pipe); POSTING_READ(TV_CTL);
msleep(20);
/* /*
* A B C * A B C
* 0 1 1 Composite * 0 1 1 Composite
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment