]>
Commit | Line | Data |
---|---|---|
5d73b4f4 AF |
1 | Index: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h |
2 | =================================================================== | |
3 | RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h,v | |
4 | retrieving revision 1.4 | |
5 | retrieving revision 1.5 | |
6 | diff -u -r1.4 -r1.5 | |
7 | --- xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h 2000/12/06 15:35:15 1.4 | |
8 | +++ xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h 2001/01/22 21:09:33 1.5 | |
9 | @@ -1,4 +1,4 @@ | |
10 | -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h,v 1.4 2000/12/06 15:35:15 eich Exp $ */ | |
11 | +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h,v 1.5 2001/01/22 21:09:33 dawes Exp $ */ | |
12 | ||
13 | /* (c) Itai Nahshon */ | |
14 | ||
15 | @@ -69,6 +69,10 @@ | |
16 | CARD32 monoPattern8x8; | |
17 | ||
18 | Bool autoStart; | |
19 | + | |
20 | + /* MMIO Base for BitBLT operation. This is | |
21 | + IOBase for 5446 and 7548, IOBase+0x100 for 5480 */ | |
22 | + unsigned char * BLTBase; | |
23 | /* XXX For XF86Config based mem configuration */ | |
24 | CARD32 sr0f, sr17; | |
25 | } AlpRec, *AlpPtr; | |
26 | Index: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c | |
27 | =================================================================== | |
28 | RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v | |
29 | retrieving revision 1.17 | |
30 | retrieving revision 1.18 | |
31 | diff -u -r1.17 -r1.18 | |
32 | --- xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c 2000/12/07 15:43:44 1.17 | |
33 | +++ xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c 2001/01/21 21:19:24 1.18 | |
34 | @@ -11,7 +11,7 @@ | |
35 | * Guy DESBIEF | |
36 | */ | |
37 | ||
38 | -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.17 2000/12/07 15:43:44 tsi Exp $ */ | |
39 | +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c,v 1.18 2001/01/21 21:19:24 tsi Exp $ */ | |
40 | ||
41 | /* All drivers should typically include these */ | |
42 | #include "xf86.h" | |
43 | @@ -59,11 +59,9 @@ | |
44 | ||
45 | /* These need to be checked */ | |
46 | #if 0 | |
47 | -#ifdef XFreeXDGA | |
48 | #define _XF86DGA_SERVER_ | |
49 | #include "extensions/xf86dgastr.h" | |
50 | #endif | |
51 | -#endif | |
52 | ||
53 | #include "xf86DDC.h" | |
54 | #include "xf86int10.h" | |
55 | @@ -112,10 +110,8 @@ | |
56 | ||
57 | static void AlpSetClock(CirPtr pCir, vgaHWPtr hwp, int freq); | |
58 | ||
59 | -#ifdef DPMSExtension | |
60 | -static void AlpDisplayPowerManagementSet(ScrnInfoPtr pScrn, | |
61 | - int PowerManagementMode, int flags); | |
62 | -#endif | |
63 | +static void AlpDisplayPowerManagementSet(ScrnInfoPtr pScrn, | |
64 | + int PowerManagementMode, int flags); | |
65 | ||
66 | /* | |
67 | * This is intentionally screen-independent. It indicates the binding | |
68 | @@ -1078,10 +1074,7 @@ | |
69 | AlpFreeRec(pScrn); | |
70 | return FALSE; | |
71 | } | |
72 | - xf86LoaderReqSymbols("fbScreenInit",NULL); | |
73 | -#ifdef RENDER | |
74 | - xf86LoaderReqSymbols("fbPictureInit", NULL); | |
75 | -#endif | |
76 | + xf86LoaderReqSymbols("fbScreenInit", "fbPictureInit", NULL); | |
77 | break; | |
78 | } | |
79 | ||
80 | @@ -1582,9 +1575,7 @@ | |
81 | } | |
82 | if (!ret) | |
83 | return FALSE; | |
84 | -#ifdef RENDER | |
85 | fbPictureInit (pScreen, 0, 0); | |
86 | -#endif | |
87 | ||
88 | #ifdef ALP_DEBUG | |
89 | ErrorF("AlpScreenInit after depth dependent init\n"); | |
90 | @@ -1716,9 +1707,7 @@ | |
91 | if (pScrn->bitsPerPixel > 1 && pScrn->bitsPerPixel <= 8) | |
92 | vgaHWHandleColormaps(pScreen); | |
93 | ||
94 | -#ifdef DPMSExtension | |
95 | xf86DPMSInit(pScreen, AlpDisplayPowerManagementSet, 0); | |
96 | -#endif | |
97 | ||
98 | pScrn->memPhysBase = pCir->FbAddress; | |
99 | pScrn->fbOffset = 0; | |
100 | @@ -1983,7 +1972,6 @@ | |
101 | * | |
102 | * Sets VESA Display Power Management Signaling (DPMS) Mode. | |
103 | */ | |
104 | -#ifdef DPMSExtension | |
105 | static void | |
106 | AlpDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, | |
107 | int flags) | |
108 | @@ -2031,7 +2019,6 @@ | |
109 | gr0e |= hwp->readGr(hwp, 0x0E) & ~0x06; | |
110 | hwp->writeGr(hwp, 0x0E, gr0e); | |
111 | } | |
112 | -#endif | |
113 | ||
114 | #ifdef ALPPROBEI2C | |
115 | static void AlpProbeI2C(int scrnIndex) | |
116 | Index: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c | |
117 | =================================================================== | |
118 | RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c,v | |
119 | retrieving revision 1.4 | |
120 | retrieving revision 1.5 | |
121 | diff -u -r1.4 -r1.5 | |
122 | --- xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c 2000/12/06 15:35:15 1.4 | |
123 | +++ xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c 2001/01/22 21:09:34 1.5 | |
124 | @@ -1,6 +1,6 @@ | |
125 | /* (c) Itai Nahshon */ | |
126 | ||
127 | -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c,v 1.4 2000/12/06 15:35:15 eich Exp $ */ | |
128 | +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c,v 1.5 2001/01/22 21:09:34 dawes Exp $ */ | |
129 | ||
130 | #include "xf86.h" | |
131 | #include "xf86_OSproc.h" | |
132 | @@ -19,21 +19,21 @@ | |
133 | #ifdef DEBUG | |
134 | #define minb(p) \ | |
135 | ErrorF("minb(%X)\n", p),\ | |
136 | - MMIO_IN8(pCir->IOBase, (p)) | |
137 | + MMIO_IN8(pCir->chip.alp->BLTBase, (p)) | |
138 | #define moutb(p,v) \ | |
139 | ErrorF("moutb(%X)\n", p),\ | |
140 | - MMIO_OUT8(pCir->IOBase, (p),(v)) | |
141 | + MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v)) | |
142 | #define minl(p) \ | |
143 | ErrorF("minl(%X)\n", p),\ | |
144 | - MMIO_IN32(pCir->IOBase, (p)) | |
145 | + MMIO_IN32(pCir->chip.alp->BLTBase, (p)) | |
146 | #define moutl(p,v) \ | |
147 | ErrorF("moutl(%X)\n", p),\ | |
148 | - MMIO_OUT32(pCir->IOBase, (p),(v)) | |
149 | + MMIO_OUT32(pCir->chip.alp->BLTBase, (p),(v)) | |
150 | #else | |
151 | -#define minb(p) MMIO_IN8(pCir->IOBase, (p)) | |
152 | -#define moutb(p,v) MMIO_OUT8(pCir->IOBase, (p),(v)) | |
153 | -#define minl(p) MMIO_IN32(pCir->IOBase, (p)) | |
154 | -#define moutl(p,v) MMIO_OUT32(pCir->IOBase, (p),(v)) | |
155 | +#define minb(p) MMIO_IN8(pCir->chip.alp->BLTBase, (p)) | |
156 | +#define moutb(p,v) MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v)) | |
157 | +#define minl(p) MMIO_IN32(pCir->chip.alp->BLTBase, (p)) | |
158 | +#define moutl(p,v) MMIO_OUT32(pCir->chip.alp->BLTBase, (p),(v)) | |
159 | #endif | |
160 | ||
161 | #define WAIT while(minb(0x40) & pCir->chip.alp->waitMsk){}; | |
162 | @@ -174,6 +174,17 @@ | |
163 | ||
164 | XAAPtr = XAACreateInfoRec(); | |
165 | if (!XAAPtr) return FALSE; | |
166 | + | |
167 | + | |
168 | + switch (pCir->Chipset) | |
169 | + { | |
170 | + case PCI_CHIP_GD5480: | |
171 | + pCir->chip.alp->BLTBase = pCir->IOBase + 0x100; | |
172 | + break; | |
173 | + default: | |
174 | + pCir->chip.alp->BLTBase = pCir->IOBase; | |
175 | + break; | |
176 | + } | |
177 | ||
178 | XAAPtr->SetupForScreenToScreenCopy = AlpSetupForScreenToScreenCopy; | |
179 | XAAPtr->SubsequentScreenToScreenCopy = AlpSubsequentScreenToScreenCopy; | |
180 | Index: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c | |
181 | =================================================================== | |
182 | RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c,v | |
183 | retrieving revision 1.62 | |
184 | retrieving revision 1.64 | |
185 | diff -u -r1.62 -r1.64 | |
186 | --- xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c 2000/12/06 15:35:15 1.62 | |
187 | +++ xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c 2001/01/22 21:09:34 1.64 | |
188 | @@ -11,7 +11,7 @@ | |
189 | * Guy DESBIEF | |
190 | */ | |
191 | ||
192 | -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c,v 1.62 2000/12/06 15:35:15 eich Exp $ */ | |
193 | +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_driver.c,v 1.64 2001/01/22 21:09:34 dawes Exp $ */ | |
194 | ||
195 | /* All drivers should typically include these */ | |
196 | #include "xf86.h" | |
197 | @@ -65,9 +65,6 @@ | |
198 | DriverRec CIRRUS = { | |
199 | VERSION, | |
200 | CIR_DRIVER_NAME, | |
201 | -#if 0 | |
202 | - "Driver for Cirrus Logic GD5446, GD5480, and GD5462/4/5 cards", | |
203 | -#endif | |
204 | CIRIdentify, | |
205 | CIRProbe, | |
206 | CIRAvailableOptions, | |
207 | @@ -128,7 +125,12 @@ | |
208 | "LgAvailableOptions", | |
209 | NULL | |
210 | }; | |
211 | - | |
212 | +static const char *vbeSymbols[] = { | |
213 | + "VBEInit", | |
214 | + "vbeDoEDID", | |
215 | + "vbeFree", | |
216 | + NULL | |
217 | +}; | |
218 | ||
219 | #ifdef XFree86LOADER | |
220 | ||
221 | @@ -165,7 +167,7 @@ | |
222 | setupDone = TRUE; | |
223 | xf86AddDriver(&CIRRUS, module, 0); | |
224 | ||
225 | - LoaderRefSymLists(alpSymbols, lgSymbols, NULL); | |
226 | + LoaderRefSymLists(alpSymbols, lgSymbols, vbeSymbols, NULL); | |
227 | return (pointer)1; | |
228 | } | |
229 | if (errmaj) *errmaj = LDR_ONCEONLY; | |
230 | @@ -399,6 +401,9 @@ | |
231 | vbeInfoPtr pVbe; | |
232 | ||
233 | if (xf86LoadSubModule(pScrn, "vbe")) { | |
234 | +#ifdef XFree86LOADER | |
235 | + xf86LoaderReqSymLists(vbeSymbols,NULL); | |
236 | +#endif | |
237 | pVbe = VBEInit(NULL,index); | |
238 | ConfiguredMonitor = vbeDoEDID(pVbe, NULL); | |
239 | } | |
240 | Index: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c | |
241 | =================================================================== | |
242 | RCS file: /cvs/xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c,v | |
243 | retrieving revision 1.33 | |
244 | retrieving revision 1.35 | |
245 | diff -u -r1.33 -r1.35 | |
246 | --- xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c 2000/12/06 15:35:16 1.33 | |
247 | +++ xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c 2001/01/22 21:09:35 1.35 | |
248 | @@ -13,7 +13,7 @@ | |
249 | * David Dawes, Andrew E. Mileski, Leonard N. Zubkoff, | |
250 | * Guy DESBIEF, Itai Nahshon. | |
251 | */ | |
252 | -/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c,v 1.33 2000/12/06 15:35:16 eich Exp $ */ | |
253 | +/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/cirrus/lg_driver.c,v 1.35 2001/01/22 21:09:35 dawes Exp $ */ | |
254 | ||
255 | #define EXPERIMENTAL | |
256 | ||
257 | @@ -94,10 +94,8 @@ | |
258 | static CARD16 LgSetClock(CirPtr pCir, vgaHWPtr hwp, int freq); | |
259 | static void lg_vgaHWSetMmioFunc(vgaHWPtr hwp, CARD8 *base); | |
260 | ||
261 | -#ifdef DPMSExtension | |
262 | -static void LgDisplayPowerManagementSet(ScrnInfoPtr pScrn, | |
263 | - int PowerManagementMode, int flags); | |
264 | -#endif | |
265 | +static void LgDisplayPowerManagementSet(ScrnInfoPtr pScrn, | |
266 | + int PowerManagementMode, int flags); | |
267 | ||
268 | /* | |
269 | * This is intentionally screen-independent. It indicates the binding | |
270 | @@ -863,10 +861,7 @@ | |
271 | LgFreeRec(pScrn); | |
272 | return FALSE; | |
273 | } | |
274 | - xf86LoaderReqSymbols("fbScreenInit",NULL); | |
275 | -#ifdef RENDER | |
276 | - xf86LoaderReqSymbols("fbPictureInit", NULL); | |
277 | -#endif | |
278 | + xf86LoaderReqSymbols("fbScreenInit", "fbPictureInit", NULL); | |
279 | break; | |
280 | } | |
281 | ||
282 | @@ -1426,6 +1421,8 @@ | |
283 | if (!ret) | |
284 | return FALSE; | |
285 | ||
286 | + fbPictureInit (pScreen, 0, 0); | |
287 | + | |
288 | #ifdef LG_DEBUG | |
289 | ErrorF("LgScreenInit after depth dependent init\n"); | |
290 | #endif | |
291 | @@ -1475,9 +1472,7 @@ | |
292 | if (pScrn->bitsPerPixel > 1 && pScrn->bitsPerPixel <= 8) | |
293 | vgaHWHandleColormaps(pScreen); | |
294 | ||
295 | -#ifdef DPMSExtension | |
296 | xf86DPMSInit(pScreen, LgDisplayPowerManagementSet, 0); | |
297 | -#endif | |
298 | ||
299 | pScrn->memPhysBase = pCir->FbAddress; | |
300 | pScrn->fbOffset = 0; | |
301 | @@ -1799,7 +1794,6 @@ | |
302 | * | |
303 | * Sets VESA Display Power Management Signaling (DPMS) Mode. | |
304 | */ | |
305 | -#ifdef DPMSExtension | |
306 | static void | |
307 | LgDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode, | |
308 | int flags) | |
309 | @@ -1843,7 +1837,6 @@ | |
310 | cr1a |= hwp->readCrtc(hwp, 0x1A) & ~0x0C; | |
311 | hwp->writeCrtc(hwp, 0x1A, cr1a); | |
312 | } | |
313 | -#endif | |
314 | ||
315 | #define minb(p) MMIO_IN8(hwp->MMIOBase, (p)) | |
316 | #define moutb(p,v) MMIO_OUT8(hwp->MMIOBase, (p),(v)) |