diff options
author | Zhenyu Wang <zhenyu.z.wang@intel.com> | 2009-03-04 06:36:03 -0500 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-03-27 18:12:15 -0400 |
commit | bf5a269a4cc966f783b9faaf3fffd8fa31b53383 (patch) | |
tree | 2b1ee986cffaa89320bbb3dc7c92ff56ae3a302d /drivers | |
parent | d2d9f23240a7ec29a496ee072ffdf69c4f6cdc76 (diff) |
drm/i915: TV detection fix
Check that the encoder has a real enabled crtc for TV detect, and fix
missing TV type setting after detect.
Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/i915/intel_tv.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c index 7021798f98e9..ceca9471a75a 100644 --- a/drivers/gpu/drm/i915/intel_tv.c +++ b/drivers/gpu/drm/i915/intel_tv.c | |||
@@ -1406,6 +1406,7 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_output *intel_output) | |||
1406 | tv_dac = I915_READ(TV_DAC); | 1406 | tv_dac = I915_READ(TV_DAC); |
1407 | I915_WRITE(TV_DAC, save_tv_dac); | 1407 | I915_WRITE(TV_DAC, save_tv_dac); |
1408 | I915_WRITE(TV_CTL, save_tv_ctl); | 1408 | I915_WRITE(TV_CTL, save_tv_ctl); |
1409 | intel_wait_for_vblank(dev); | ||
1409 | } | 1410 | } |
1410 | /* | 1411 | /* |
1411 | * A B C | 1412 | * A B C |
@@ -1456,7 +1457,7 @@ intel_tv_detect(struct drm_connector *connector) | |||
1456 | mode = reported_modes[0]; | 1457 | mode = reported_modes[0]; |
1457 | drm_mode_set_crtcinfo(&mode, CRTC_INTERLACE_HALVE_V); | 1458 | drm_mode_set_crtcinfo(&mode, CRTC_INTERLACE_HALVE_V); |
1458 | 1459 | ||
1459 | if (encoder->crtc) { | 1460 | if (encoder->crtc && encoder->crtc->enabled) { |
1460 | type = intel_tv_detect_type(encoder->crtc, intel_output); | 1461 | type = intel_tv_detect_type(encoder->crtc, intel_output); |
1461 | } else { | 1462 | } else { |
1462 | crtc = intel_get_load_detect_pipe(intel_output, &mode, &dpms_mode); | 1463 | crtc = intel_get_load_detect_pipe(intel_output, &mode, &dpms_mode); |
@@ -1467,6 +1468,8 @@ intel_tv_detect(struct drm_connector *connector) | |||
1467 | type = -1; | 1468 | type = -1; |
1468 | } | 1469 | } |
1469 | 1470 | ||
1471 | tv_priv->type = type; | ||
1472 | |||
1470 | if (type < 0) | 1473 | if (type < 0) |
1471 | return connector_status_disconnected; | 1474 | return connector_status_disconnected; |
1472 | 1475 | ||