1 This patch by Egbert Eich.
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
6 /* MMIO Base for BitBLT operation. This is
7 IOBase for 5446 and 7548, IOBase+0x100 for 5480 */
8 unsigned char * BLTBase;
10 /* XXX For XF86Config based mem configuration */
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
16 * XXX Check if this is correct
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);
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
27 dest = y2 * pitch + x2 * pScrn->bitsPerPixel / 8;
28 source = y1 * pitch + x1 * pScrn->bitsPerPixel / 8;
32 dest += hh * pitch + ww;
33 source += hh * pitch + ww;
39 - outb(0x3CF, decrement);
41 + outw(0x3CE, decrement | 0x30);
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
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)))
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)))
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));}
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)))
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)))
81 #define minb(p) MMIO_IN8(pCir->chip.alp->BLTBase, (p))
82 #define moutb(p,v) MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v))
86 #define WAIT while(minl(0x40) & pCir->chip.alp->waitMsk){};
87 -#define WAIT_1 while(minl(0x40) & 0x1){};
89 -#define SetupForRop(rop) moutb(0x1A, translated_rop[rop])
90 +#define WAIT_1 while((minl(0x40)) & 0x1){};
92 static void AlpSync(ScrnInfoPtr pScrn)
100 + pCir->chip.alp->transRop = translated_rop[rop] << 16;
103 ErrorF("AlpSetupForScreenToScreenCopy xdir=%d ydir=%d rop=%x planemask=%x trans_color=%x\n",
104 xdir, ydir, rop, planemask, trans_color);
106 moutl(0x08, (hh << 16) | ww);
108 moutl(0x14, source & 0x3fffff);
109 - moutl(0x18, 0x0d0000 | decrement);
110 + moutl(0x18, pCir->chip.alp->transRop | decrement);
121 ErrorF("AlpSetupForSolidFill color=%x rop=%x planemask=%x\n",
122 color, rop, planemask);
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
136 switch (pCir->Chipset) {
137 case PCI_CHIP_GD5480:
138 + case PCI_CHIP_GD5446:
139 pCir->chip.alp->BLTBase = pCir->IOBase + 0x100;
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
147 if (!pCir->DGAnumModes) {
148 - ErrorF("DGAINIT\n");
149 pMode = firstMode = pScrn->modes;
151 newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec));