diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-22 14:10:09 -0400 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-23 06:05:44 -0400 |
commit | 29e1316ab129f2d3a9ea874e7c9a4cb936f43542 (patch) | |
tree | 45130e31d563a1e79d3628aa37a3bad63c6bb355 /drivers/gpu/drm/i915/intel_tv.c | |
parent | 20f0cd55f68e0678909214c60b3595a22124bdb0 (diff) |
drm/i915/tv: Sleep before checking for state changes.
We need to wait for the PLLs to settle prior to detecting the state
changes. The BIOS writers guide suggests waiting for the next vblank.
Reported-by: Carlos R. Mafra <crmafra2@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_tv.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 49ab11c667bb..106560bc84db 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1271,8 +1271,12 @@ intel_tv_detect_type (struct intel_tv *intel_tv) | |||
1271 | I915_WRITE(TV_DAC, tv_dac); | 1271 | I915_WRITE(TV_DAC, tv_dac); |
1272 | POSTING_READ(TV_DAC); | 1272 | POSTING_READ(TV_DAC); |
1273 | 1273 | ||
1274 | intel_wait_for_vblank(intel_tv->base.base.dev, | ||
1275 | to_intel_crtc(intel_tv->base.base.crtc)->pipe); | ||
1276 | |||
1274 | type = -1; | 1277 | type = -1; |
1275 | if (wait_for((tv_dac = I915_READ(TV_DAC)) & TVDAC_STATE_CHG, 20) == 0) { | 1278 | if (wait_for((tv_dac = I915_READ(TV_DAC)) & TVDAC_STATE_CHG, 20) == 0) { |
1279 | DRM_DEBUG_KMS("TV detected: %x, %x\n", tv_ctl, tv_dac); | ||
1276 | /* | 1280 | /* |
1277 | * A B C | 1281 | * A B C |
1278 | * 0 1 1 Composite | 1282 | * 0 1 1 Composite |
@@ -1289,8 +1293,7 @@ intel_tv_detect_type (struct intel_tv *intel_tv) | |||
1289 | DRM_DEBUG_KMS("Detected Component TV connection\n"); | 1293 | DRM_DEBUG_KMS("Detected Component TV connection\n"); |
1290 | type = DRM_MODE_CONNECTOR_Component; | 1294 | type = DRM_MODE_CONNECTOR_Component; |
1291 | } else { | 1295 | } else { |
1292 | DRM_DEBUG_KMS("Unrecognised TV connection: %x\n", | 1296 | DRM_DEBUG_KMS("Unrecognised TV connection\n"); |
1293 | tv_dac); | ||
1294 | } | 1297 | } |
1295 | } | 1298 | } |
1296 | 1299 | ||