]>
Commit | Line | Data |
---|---|---|
d4dafbb3 | 1 | This patch by Egbert Eich. |
2 | ||
3 | --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h~ Fri May 4 14:05:35 2001 | |
4 | +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h Sun Aug 12 22:58:32 2001 | |
5 | @@ -77,6 +77,7 @@ | |
6 | /* MMIO Base for BitBLT operation. This is | |
7 | IOBase for 5446 and 7548, IOBase+0x100 for 5480 */ | |
8 | unsigned char * BLTBase; | |
9 | + CARD32 transRop; | |
10 | /* XXX For XF86Config based mem configuration */ | |
11 | CARD32 sr0f, sr17; | |
12 | } AlpRec, *AlpPtr; | |
13 | --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c~ Fri May 4 14:05:35 2001 | |
14 | +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c Sun Aug 12 22:58:32 2001 | |
15 | @@ -758,7 +758,7 @@ | |
16 | * XXX Check if this is correct | |
17 | */ | |
18 | if (!pCir->UseMMIO) { | |
19 | - pScrn->racIoFlags = RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; | |
20 | + pScrn->racIoFlags = RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT | RAC_FB; | |
21 | xf86SetOperatingState(resVgaMemShared, pCir->pEnt->index,ResUnusedOpr); | |
22 | } else { | |
23 | xf86SetOperatingState(RES_SHARED_VGA, pCir->pEnt->index, ResUnusedOpr); | |
24 | --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c~ Thu Feb 15 12:39:27 2001 | |
25 | +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c Sun Aug 12 22:58:32 2001 | |
26 | @@ -91,16 +91,14 @@ | |
27 | dest = y2 * pitch + x2 * pScrn->bitsPerPixel / 8; | |
28 | source = y1 * pitch + x1 * pScrn->bitsPerPixel / 8; | |
29 | if (dest > source) { | |
30 | - decrement = 1; | |
31 | + decrement = 1 << 8; | |
32 | dest += hh * pitch + ww; | |
33 | source += hh * pitch + ww; | |
34 | } | |
35 | ||
36 | WAIT; | |
37 | ||
38 | - outb(0x3CE, 0x30); | |
39 | - outb(0x3CF, decrement); | |
40 | - outb(0x3CE, 0x31); | |
41 | + outw(0x3CE, decrement | 0x30); | |
42 | ||
43 | /* Width */ | |
44 | outw(0x3CE, ((ww << 8) & 0xff00) | 0x20); | |
45 | --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c~ Thu Feb 15 12:39:27 2001 | |
46 | +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c Sun Aug 12 22:58:32 2001 | |
47 | @@ -18,23 +18,23 @@ | |
48 | ||
49 | #ifdef DEBUG | |
50 | #define minb(p) \ | |
51 | - ErrorF("minb(%X)\n", p),\ | |
52 | - MMIO_IN8(pCir->chip.alp->BLTBase, (p)) | |
53 | + (ErrorF("minb(%X)\n", p),\ | |
54 | + MMIO_IN8(pCir->chip.alp->BLTBase, (p))) | |
55 | #define moutb(p,v) \ | |
56 | - ErrorF("moutb(%X)\n", p),\ | |
57 | - MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v)) | |
58 | + (ErrorF("moutb(%X, %X)\n", p,v),\ | |
59 | + MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v))) | |
60 | #define vga_minb(p) \ | |
61 | - ErrorF("minb(%X)\n", p),\ | |
62 | - MMIO_IN8(hwp->MMIOBase, (hwp->MMIOOffset + (p))) | |
63 | + (ErrorF("minb(%X)\n", p),\ | |
64 | + MMIO_IN8(hwp->MMIOBase, (hwp->MMIOOffset + (p)))) | |
65 | #define vga_moutb(p,v) \ | |
66 | - ErrorF("moutb(%X)\n", p),\ | |
67 | - MMIO_OUT8(pCir->MMIOBase, (hwp->MMIOOffset + (p)),(v)) | |
68 | + { ErrorF("moutb(%X, %X)\n", p,v);\ | |
69 | + MMIO_OUT8(hwp->MMIOBase, (hwp->MMIOOffset + (p)),(v));} | |
70 | #define minl(p) \ | |
71 | - ErrorF("minl(%X)\n", p),\ | |
72 | - MMIO_IN32(pCir->chip.alp->BLTBase, (p)) | |
73 | + (ErrorF("minl(%X)\n", p),\ | |
74 | + MMIO_IN32(pCir->chip.alp->BLTBase, (p))) | |
75 | #define moutl(p,v) \ | |
76 | - ErrorF("moutl(%X)\n", p),\ | |
77 | - MMIO_OUT32(pCir->chip.alp->BLTBase, (p),(v)) | |
78 | + (ErrorF("moutl(%X, %X)\n", p,v),\ | |
79 | + MMIO_OUT32(pCir->chip.alp->BLTBase, (p),(v))) | |
80 | #else | |
81 | #define minb(p) MMIO_IN8(pCir->chip.alp->BLTBase, (p)) | |
82 | #define moutb(p,v) MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v)) | |
83 | @@ -65,9 +65,7 @@ | |
84 | }; | |
85 | ||
86 | #define WAIT while(minl(0x40) & pCir->chip.alp->waitMsk){}; | |
87 | -#define WAIT_1 while(minl(0x40) & 0x1){}; | |
88 | - | |
89 | -#define SetupForRop(rop) moutb(0x1A, translated_rop[rop]) | |
90 | +#define WAIT_1 while((minl(0x40)) & 0x1){}; | |
91 | ||
92 | static void AlpSync(ScrnInfoPtr pScrn) | |
93 | { | |
94 | @@ -88,8 +86,8 @@ | |
95 | ||
96 | WAIT; | |
97 | ||
98 | - SetupForRop(rop); | |
99 | - | |
100 | + pCir->chip.alp->transRop = translated_rop[rop] << 16; | |
101 | + | |
102 | #ifdef ALP_DEBUG | |
103 | ErrorF("AlpSetupForScreenToScreenCopy xdir=%d ydir=%d rop=%x planemask=%x trans_color=%x\n", | |
104 | xdir, ydir, rop, planemask, trans_color); | |
105 | @@ -124,7 +122,7 @@ | |
106 | moutl(0x08, (hh << 16) | ww); | |
107 | /* source */ | |
108 | moutl(0x14, source & 0x3fffff); | |
109 | - moutl(0x18, 0x0d0000 | decrement); | |
110 | + moutl(0x18, pCir->chip.alp->transRop | decrement); | |
111 | ||
112 | /* dest */ | |
113 | write_mem_barrier(); | |
114 | @@ -153,8 +151,6 @@ | |
115 | ||
116 | WAIT; | |
117 | ||
118 | - SetupForRop(rop); | |
119 | - | |
120 | #ifdef ALP_DEBUG | |
121 | ErrorF("AlpSetupForSolidFill color=%x rop=%x planemask=%x\n", | |
122 | color, rop, planemask); | |
123 | @@ -164,7 +160,9 @@ | |
124 | ||
125 | /* Set dest pitch */ | |
126 | moutl(0x0C, pitch & 0x1fff); | |
127 | - moutl(0x18, (0xC0|((pScrn->bitsPerPixel - 8) << 1)) | 0x040d0000); | |
128 | + moutl(0x18, (((pScrn->bitsPerPixel - 8) << 1)) | |
129 | + | translated_rop[rop] << 16 | |
130 | + | 0x040000C0); | |
131 | } | |
132 | ||
133 | static void | |
134 | @@ -249,6 +247,7 @@ | |
135 | ||
136 | switch (pCir->Chipset) { | |
137 | case PCI_CHIP_GD5480: | |
138 | + case PCI_CHIP_GD5446: | |
139 | pCir->chip.alp->BLTBase = pCir->IOBase + 0x100; | |
140 | break; | |
141 | default: | |
142 | --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_dga.c~ Sun Apr 1 09:00:10 2001 | |
143 | +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_dga.c Sun Aug 12 22:58:32 2001 | |
144 | @@ -78,7 +78,6 @@ | |
145 | ||
146 | ||
147 | if (!pCir->DGAnumModes) { | |
148 | - ErrorF("DGAINIT\n"); | |
149 | pMode = firstMode = pScrn->modes; | |
150 | while (pMode) { | |
151 | newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec)); |