diff options
Diffstat (limited to 'meta/packages/xorg-driver/xf86-video-intel-dri2/004_reduce_driver_boottime.patch')
-rwxr-xr-x | meta/packages/xorg-driver/xf86-video-intel-dri2/004_reduce_driver_boottime.patch | 95 |
1 files changed, 95 insertions, 0 deletions
diff --git a/meta/packages/xorg-driver/xf86-video-intel-dri2/004_reduce_driver_boottime.patch b/meta/packages/xorg-driver/xf86-video-intel-dri2/004_reduce_driver_boottime.patch new file mode 100755 index 0000000000..f8c214931e --- /dev/null +++ b/meta/packages/xorg-driver/xf86-video-intel-dri2/004_reduce_driver_boottime.patch | |||
@@ -0,0 +1,95 @@ | |||
1 | diff -urN xf86-video-intel-2.5.96.0/src/i830_display.c xf86-video-intel-2.5.96.0.new/src/i830_display.c | ||
2 | --- xf86-video-intel-2.5.96.0/src/i830_display.c 2008-09-11 05:10:10.000000000 +0800 | ||
3 | +++ xf86-video-intel-2.5.96.0.new/src/i830_display.c 2008-09-25 21:27:42.000000000 +0800 | ||
4 | @@ -376,7 +376,7 @@ | ||
5 | i830WaitForVblank(ScrnInfoPtr pScreen) | ||
6 | { | ||
7 | /* Wait for 20ms, i.e. one cycle at 50hz. */ | ||
8 | - usleep(30000); | ||
9 | + usleep(21000); | ||
10 | } | ||
11 | |||
12 | void | ||
13 | diff -urN xf86-video-intel-2.5.96.0/src/i830_driver.c xf86-video-intel-2.5.96.0.new/src/i830_driver.c | ||
14 | --- xf86-video-intel-2.5.96.0/src/i830_driver.c 2008-09-25 21:23:52.000000000 +0800 | ||
15 | +++ xf86-video-intel-2.5.96.0.new/src/i830_driver.c 2008-09-25 21:30:13.000000000 +0800 | ||
16 | @@ -2293,7 +2293,7 @@ | ||
17 | static void | ||
18 | i830_dpll_settle(void) | ||
19 | { | ||
20 | - usleep(10000); /* 10 ms *should* be plenty */ | ||
21 | + usleep(150); /* 10 ms *should* be plenty */ | ||
22 | } | ||
23 | |||
24 | static Bool | ||
25 | @@ -2315,14 +2315,12 @@ | ||
26 | xf86OutputPtr output = xf86_config->output[i]; | ||
27 | output->funcs->dpms(output, DPMSModeOff); | ||
28 | } | ||
29 | - i830WaitForVblank(pScrn); | ||
30 | |||
31 | /* Disable pipes */ | ||
32 | for (i = 0; i < xf86_config->num_crtc; i++) { | ||
33 | xf86CrtcPtr crtc = xf86_config->crtc[i]; | ||
34 | crtc->funcs->dpms(crtc, DPMSModeOff); | ||
35 | } | ||
36 | - i830WaitForVblank(pScrn); | ||
37 | |||
38 | if (IS_MOBILE(pI830) && !IS_I830(pI830)) | ||
39 | OUTREG(LVDS, pI830->saveLVDS); | ||
40 | @@ -2369,11 +2367,13 @@ | ||
41 | OUTREG(FPA0, pI830->saveFPA0); | ||
42 | OUTREG(FPA1, pI830->saveFPA1); | ||
43 | OUTREG(DPLL_A, pI830->saveDPLL_A); | ||
44 | + POSTING_READ(DPLL_A); | ||
45 | i830_dpll_settle(); | ||
46 | if (IS_I965G(pI830)) | ||
47 | OUTREG(DPLL_A_MD, pI830->saveDPLL_A_MD); | ||
48 | else | ||
49 | OUTREG(DPLL_A, pI830->saveDPLL_A); | ||
50 | + POSTING_READ(DPLL_A); | ||
51 | i830_dpll_settle(); | ||
52 | |||
53 | /* Restore mode config */ | ||
54 | @@ -2409,13 +2409,11 @@ | ||
55 | DISPPLANE_SEL_PIPE_A) { | ||
56 | OUTREG(DSPACNTR, pI830->saveDSPACNTR); | ||
57 | OUTREG(DSPABASE, INREG(DSPABASE)); | ||
58 | - i830WaitForVblank(pScrn); | ||
59 | } | ||
60 | if ((pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_MASK) == | ||
61 | DISPPLANE_SEL_PIPE_A) { | ||
62 | OUTREG(DSPBCNTR, pI830->saveDSPBCNTR); | ||
63 | OUTREG(DSPBBASE, INREG(DSPBBASE)); | ||
64 | - i830WaitForVblank(pScrn); | ||
65 | } | ||
66 | |||
67 | /* See note about pipe programming above */ | ||
68 | @@ -2430,11 +2428,13 @@ | ||
69 | OUTREG(FPB0, pI830->saveFPB0); | ||
70 | OUTREG(FPB1, pI830->saveFPB1); | ||
71 | OUTREG(DPLL_B, pI830->saveDPLL_B); | ||
72 | + POSTING_READ(DPLL_B); | ||
73 | i830_dpll_settle(); | ||
74 | if (IS_I965G(pI830)) | ||
75 | OUTREG(DPLL_B_MD, pI830->saveDPLL_B_MD); | ||
76 | else | ||
77 | OUTREG(DPLL_B, pI830->saveDPLL_B); | ||
78 | + POSTING_READ(DPLL_B); | ||
79 | i830_dpll_settle(); | ||
80 | |||
81 | /* Restore mode config */ | ||
82 | @@ -2468,13 +2468,11 @@ | ||
83 | DISPPLANE_SEL_PIPE_B) { | ||
84 | OUTREG(DSPACNTR, pI830->saveDSPACNTR); | ||
85 | OUTREG(DSPABASE, INREG(DSPABASE)); | ||
86 | - i830WaitForVblank(pScrn); | ||
87 | } | ||
88 | if ((pI830->saveDSPBCNTR & DISPPLANE_SEL_PIPE_MASK) == | ||
89 | DISPPLANE_SEL_PIPE_B) { | ||
90 | OUTREG(DSPBCNTR, pI830->saveDSPBCNTR); | ||
91 | OUTREG(DSPBBASE, INREG(DSPBBASE)); | ||
92 | - i830WaitForVblank(pScrn); | ||
93 | } | ||
94 | } | ||
95 | |||