]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob
bc414f7925be6b3a9189ee3dd0d1c475894e09e4
[thirdparty/kernel/stable-queue.git] /
1 From fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 Mon Sep 17 00:00:00 2001
2 From: Zhao Yakui <yakui.zhao@intel.com>
3 Date: Wed, 7 Apr 2010 17:11:19 +0800
4 Subject: drm/i915: Configure the TV sense state correctly on GM45 to make TV detection reliable
5
6 From: Zhao Yakui <yakui.zhao@intel.com>
7
8 commit fb8b5a39b6310379d7b54c0c7113703a8eaf4a57 upstream.
9
10 The TV detection logic is not reliable on the Cantiga platform.
11 Sometimes the TV will be misdetected as the following two cases:
12 - TV is misdetected on some laptops. e.g. There is no TV connector
13 port or no TV is attached. But the TV is shown as connected.
14 - TV connector type is misdetected. e.g. the component TV is
15 attached, but the TV is shown as S-video type.
16
17 According to the hardware requirement, the TV sense state bits of TV DAC
18 register should be cleared to zero on Cantiga platfrom.
19
20 https://bugzilla.kernel.org/show_bug.cgi?id=14792
21
22 Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
23 Tested-by: Santi <santi@agolina.net>
24 Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
25 Signed-off-by: Eric Anholt <eric@anholt.net>
26 Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
27
28 ---
29 drivers/gpu/drm/i915/intel_tv.c | 9 +++++++++
30 1 file changed, 9 insertions(+)
31
32 --- a/drivers/gpu/drm/i915/intel_tv.c
33 +++ b/drivers/gpu/drm/i915/intel_tv.c
34 @@ -1399,6 +1399,15 @@ intel_tv_detect_type (struct drm_crtc *c
35 DAC_A_0_7_V |
36 DAC_B_0_7_V |
37 DAC_C_0_7_V);
38 +
39 + /*
40 + * The TV sense state should be cleared to zero on cantiga platform. Otherwise
41 + * the TV is misdetected. This is hardware requirement.
42 + */
43 + if (IS_GM45(dev))
44 + tv_dac &= ~(TVDAC_STATE_CHG_EN | TVDAC_A_SENSE_CTL |
45 + TVDAC_B_SENSE_CTL | TVDAC_C_SENSE_CTL);
46 +
47 I915_WRITE(TV_CTL, tv_ctl);
48 I915_WRITE(TV_DAC, tv_dac);
49 intel_wait_for_vblank(dev);