]> git.pld-linux.org Git - packages/xorg-driver-video-intel.git/blame - xorg-driver-video-intel-git.patch
- rel 2; git fixes
[packages/xorg-driver-video-intel.git] / xorg-driver-video-intel-git.patch
CommitLineData
c598badf
AM
1commit 376397c21eb9a7e4ea79d349af41da81c1af861f
2Author: Zhenyu Wang <zhenyuw@linux.intel.com>
3Date: Tue Aug 18 10:01:12 2009 +0800
4
5 Fix VGA plane disabling
6
7 Only apply on G4X with SR01 bit5 workaround for VGA plane disable, and
8 restore behavior back for other chips to make sure other modes got disabled
9 too.
10
11 For bug #17235, #19715, #21064, #23178
12
13 Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
14
15diff --git a/src/i830_display.c b/src/i830_display.c
16index 59ededc..f83e021 100644
17--- a/src/i830_display.c
18+++ b/src/i830_display.c
19@@ -1076,29 +1076,31 @@ i830_disable_vga_plane (xf86CrtcPtr crtc)
20 {
21 ScrnInfoPtr pScrn = crtc->scrn;
22 I830Ptr pI830 = I830PTR(pScrn);
23- uint32_t vgacntrl = INREG(VGACNTRL);
24 uint8_t sr01;
25
26- if (vgacntrl & VGA_DISP_DISABLE)
27- return;
28-
29 /*
30- Set bit 5 of SR01;
31- Wait 30us;
32- */
33- OUTREG8(SRX, 1);
34- sr01 = INREG8(SRX + 1);
35- OUTREG8(SRX + 1, sr01 | (1 << 5));
36- usleep(30);
37- /* disable center mode on 965GM and G4X platform */
38- if (IS_I965GM(pI830) || IS_G4X(pI830))
39- vgacntrl &= ~(3 << 24);
40-
41- vgacntrl |= VGA_DISP_DISABLE;
42-
43- OUTREG(VGACNTRL, vgacntrl);
44+ * Bug #17235: G4X machine needs following steps
45+ * for disable VGA.
46+ * - set bit 5 of SR01;
47+ * - Wait 30us;
48+ * - disable vga plane;
49+ * - restore SR01;
50+ */
51+ if (IS_G4X(pI830)) {
52+ OUTREG8(SRX, 1);
53+ sr01 = INREG8(SRX + 1);
54+ OUTREG8(SRX + 1, sr01 | (1 << 5));
55+ usleep(30);
56+ }
57+
58+ OUTREG(VGACNTRL, VGA_DISP_DISABLE);
59 i830WaitForVblank(pScrn);
60
61+ /* restore SR01 */
62+ if (IS_G4X(pI830)) {
63+ OUTREG8(SRX, 1);
64+ OUTREG8(SRX + 1, sr01);
65+ }
66 }
67
68 static void
This page took 0.036651 seconds and 4 git commands to generate.