提交 8ed9a5bc 编写于 作者: L ling.ma@intel.com 提交者: Eric Anholt

drm/i915: set TV detection mode when tv is already connected

We used load_detect_temp flag to determine whether to set tv to the test
mode. However if the TV already has a mode set, we still need to set the
test mode to determine connection.  This results in blinking, but there is
no other reliable way to determine TV connection.

freedesktop.org bug #22035
Signed-off-by: NMa Ling <ling.ma@intel.com>
Signed-off-by: NEric Anholt <eric@anholt.net>
上级 921809a5
...@@ -1383,34 +1383,31 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_output *intel_output) ...@@ -1383,34 +1383,31 @@ intel_tv_detect_type (struct drm_crtc *crtc, struct intel_output *intel_output)
/* /*
* Detect TV by polling) * Detect TV by polling)
*/ */
if (intel_output->load_detect_temp) { save_tv_dac = tv_dac;
/* TV not currently running, prod it with destructive detect */ tv_ctl = I915_READ(TV_CTL);
save_tv_dac = tv_dac; save_tv_ctl = tv_ctl;
tv_ctl = I915_READ(TV_CTL); tv_ctl &= ~TV_ENC_ENABLE;
save_tv_ctl = tv_ctl; tv_ctl &= ~TV_TEST_MODE_MASK;
tv_ctl &= ~TV_ENC_ENABLE; tv_ctl |= TV_TEST_MODE_MONITOR_DETECT;
tv_ctl &= ~TV_TEST_MODE_MASK; tv_dac &= ~TVDAC_SENSE_MASK;
tv_ctl |= TV_TEST_MODE_MONITOR_DETECT; tv_dac &= ~DAC_A_MASK;
tv_dac &= ~TVDAC_SENSE_MASK; tv_dac &= ~DAC_B_MASK;
tv_dac &= ~DAC_A_MASK; tv_dac &= ~DAC_C_MASK;
tv_dac &= ~DAC_B_MASK; tv_dac |= (TVDAC_STATE_CHG_EN |
tv_dac &= ~DAC_C_MASK; TVDAC_A_SENSE_CTL |
tv_dac |= (TVDAC_STATE_CHG_EN | TVDAC_B_SENSE_CTL |
TVDAC_A_SENSE_CTL | TVDAC_C_SENSE_CTL |
TVDAC_B_SENSE_CTL | DAC_CTL_OVERRIDE |
TVDAC_C_SENSE_CTL | DAC_A_0_7_V |
DAC_CTL_OVERRIDE | DAC_B_0_7_V |
DAC_A_0_7_V | DAC_C_0_7_V);
DAC_B_0_7_V | I915_WRITE(TV_CTL, tv_ctl);
DAC_C_0_7_V); I915_WRITE(TV_DAC, tv_dac);
I915_WRITE(TV_CTL, tv_ctl); intel_wait_for_vblank(dev);
I915_WRITE(TV_DAC, tv_dac); tv_dac = I915_READ(TV_DAC);
intel_wait_for_vblank(dev); I915_WRITE(TV_DAC, save_tv_dac);
tv_dac = I915_READ(TV_DAC); I915_WRITE(TV_CTL, save_tv_ctl);
I915_WRITE(TV_DAC, save_tv_dac); intel_wait_for_vblank(dev);
I915_WRITE(TV_CTL, save_tv_ctl);
intel_wait_for_vblank(dev);
}
/* /*
* A B C * A B C
* 0 1 1 Composite * 0 1 1 Composite
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册