diff options
author | Keith Packard <keithp@keithp.com> | 2011-05-12 20:10:58 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-07-13 14:07:55 -0400 |
commit | 2bf71160f94270319eb965935045f825ec446e8a (patch) | |
tree | 64873b373917346ff37f0897884d2dae313b6987 | |
parent | 835bff7ef220f9d7df94970557a6a2296f74106f (diff) |
drm/i915: TVDAC_STATE_CHG does not indicate successful load-detect
Do not use this bit to indicate that load detection has completed,
instead just wait for vblank, at which point the load registers will
have been updated.
Signed-off-by: Keith Packard <keithp@keithp.com>
Tested-by: Yi Sun <yi.sun@intel.com>
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 950ae1477738..210d570fd516 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1283,26 +1283,26 @@ intel_tv_detect_type (struct intel_tv *intel_tv, | |||
1283 | to_intel_crtc(intel_tv->base.base.crtc)->pipe); | 1283 | to_intel_crtc(intel_tv->base.base.crtc)->pipe); |
1284 | 1284 | ||
1285 | type = -1; | 1285 | type = -1; |
1286 | if (wait_for((tv_dac = I915_READ(TV_DAC)) & TVDAC_STATE_CHG, 20) == 0) { | 1286 | tv_dac = I915_READ(TV_DAC); |
1287 | DRM_DEBUG_KMS("TV detected: %x, %x\n", tv_ctl, tv_dac); | 1287 | DRM_DEBUG_KMS("TV detected: %x, %x\n", tv_ctl, tv_dac); |
1288 | /* | 1288 | /* |
1289 | * A B C | 1289 | * A B C |
1290 | * 0 1 1 Composite | 1290 | * 0 1 1 Composite |
1291 | * 1 0 X svideo | 1291 | * 1 0 X svideo |
1292 | * 0 0 0 Component | 1292 | * 0 0 0 Component |
1293 | */ | 1293 | */ |
1294 | if ((tv_dac & TVDAC_SENSE_MASK) == (TVDAC_B_SENSE | TVDAC_C_SENSE)) { | 1294 | if ((tv_dac & TVDAC_SENSE_MASK) == (TVDAC_B_SENSE | TVDAC_C_SENSE)) { |
1295 | DRM_DEBUG_KMS("Detected Composite TV connection\n"); | 1295 | DRM_DEBUG_KMS("Detected Composite TV connection\n"); |
1296 | type = DRM_MODE_CONNECTOR_Composite; | 1296 | type = DRM_MODE_CONNECTOR_Composite; |
1297 | } else if ((tv_dac & (TVDAC_A_SENSE|TVDAC_B_SENSE)) == TVDAC_A_SENSE) { | 1297 | } else if ((tv_dac & (TVDAC_A_SENSE|TVDAC_B_SENSE)) == TVDAC_A_SENSE) { |
1298 | DRM_DEBUG_KMS("Detected S-Video TV connection\n"); | 1298 | DRM_DEBUG_KMS("Detected S-Video TV connection\n"); |
1299 | type = DRM_MODE_CONNECTOR_SVIDEO; | 1299 | type = DRM_MODE_CONNECTOR_SVIDEO; |
1300 | } else if ((tv_dac & TVDAC_SENSE_MASK) == 0) { | 1300 | } else if ((tv_dac & TVDAC_SENSE_MASK) == 0) { |
1301 | DRM_DEBUG_KMS("Detected Component TV connection\n"); | 1301 | DRM_DEBUG_KMS("Detected Component TV connection\n"); |
1302 | type = DRM_MODE_CONNECTOR_Component; | 1302 | type = DRM_MODE_CONNECTOR_Component; |
1303 | } else { | 1303 | } else { |
1304 | DRM_DEBUG_KMS("Unrecognised TV connection\n"); | 1304 | DRM_DEBUG_KMS("Unrecognised TV connection\n"); |
1305 | } | 1305 | type = -1; |
1306 | } | 1306 | } |
1307 | 1307 | ||
1308 | I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN); | 1308 | I915_WRITE(TV_DAC, save_tv_dac & ~TVDAC_STATE_CHG_EN); |