This patch by Egbert Eich. --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h~ Fri May 4 14:05:35 2001 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp.h Sun Aug 12 22:58:32 2001 @@ -77,6 +77,7 @@ /* MMIO Base for BitBLT operation. This is IOBase for 5446 and 7548, IOBase+0x100 for 5480 */ unsigned char * BLTBase; + CARD32 transRop; /* XXX For XF86Config based mem configuration */ CARD32 sr0f, sr17; } AlpRec, *AlpPtr; --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c~ Fri May 4 14:05:35 2001 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_driver.c Sun Aug 12 22:58:32 2001 @@ -758,7 +758,7 @@ * XXX Check if this is correct */ if (!pCir->UseMMIO) { - pScrn->racIoFlags = RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT; + pScrn->racIoFlags = RAC_COLORMAP | RAC_CURSOR | RAC_VIEWPORT | RAC_FB; xf86SetOperatingState(resVgaMemShared, pCir->pEnt->index,ResUnusedOpr); } else { xf86SetOperatingState(RES_SHARED_VGA, pCir->pEnt->index, ResUnusedOpr); --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c~ Thu Feb 15 12:39:27 2001 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaa.c Sun Aug 12 22:58:32 2001 @@ -91,16 +91,14 @@ dest = y2 * pitch + x2 * pScrn->bitsPerPixel / 8; source = y1 * pitch + x1 * pScrn->bitsPerPixel / 8; if (dest > source) { - decrement = 1; + decrement = 1 << 8; dest += hh * pitch + ww; source += hh * pitch + ww; } WAIT; - outb(0x3CE, 0x30); - outb(0x3CF, decrement); - outb(0x3CE, 0x31); + outw(0x3CE, decrement | 0x30); /* Width */ outw(0x3CE, ((ww << 8) & 0xff00) | 0x20); --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c~ Thu Feb 15 12:39:27 2001 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/alp_xaam.c Sun Aug 12 22:58:32 2001 @@ -18,23 +18,23 @@ #ifdef DEBUG #define minb(p) \ - ErrorF("minb(%X)\n", p),\ - MMIO_IN8(pCir->chip.alp->BLTBase, (p)) + (ErrorF("minb(%X)\n", p),\ + MMIO_IN8(pCir->chip.alp->BLTBase, (p))) #define moutb(p,v) \ - ErrorF("moutb(%X)\n", p),\ - MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v)) + (ErrorF("moutb(%X, %X)\n", p,v),\ + MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v))) #define vga_minb(p) \ - ErrorF("minb(%X)\n", p),\ - MMIO_IN8(hwp->MMIOBase, (hwp->MMIOOffset + (p))) + (ErrorF("minb(%X)\n", p),\ + MMIO_IN8(hwp->MMIOBase, (hwp->MMIOOffset + (p)))) #define vga_moutb(p,v) \ - ErrorF("moutb(%X)\n", p),\ - MMIO_OUT8(pCir->MMIOBase, (hwp->MMIOOffset + (p)),(v)) + { ErrorF("moutb(%X, %X)\n", p,v);\ + MMIO_OUT8(hwp->MMIOBase, (hwp->MMIOOffset + (p)),(v));} #define minl(p) \ - ErrorF("minl(%X)\n", p),\ - MMIO_IN32(pCir->chip.alp->BLTBase, (p)) + (ErrorF("minl(%X)\n", p),\ + MMIO_IN32(pCir->chip.alp->BLTBase, (p))) #define moutl(p,v) \ - ErrorF("moutl(%X)\n", p),\ - MMIO_OUT32(pCir->chip.alp->BLTBase, (p),(v)) + (ErrorF("moutl(%X, %X)\n", p,v),\ + MMIO_OUT32(pCir->chip.alp->BLTBase, (p),(v))) #else #define minb(p) MMIO_IN8(pCir->chip.alp->BLTBase, (p)) #define moutb(p,v) MMIO_OUT8(pCir->chip.alp->BLTBase, (p),(v)) @@ -65,9 +65,7 @@ }; #define WAIT while(minl(0x40) & pCir->chip.alp->waitMsk){}; -#define WAIT_1 while(minl(0x40) & 0x1){}; - -#define SetupForRop(rop) moutb(0x1A, translated_rop[rop]) +#define WAIT_1 while((minl(0x40)) & 0x1){}; static void AlpSync(ScrnInfoPtr pScrn) { @@ -88,8 +86,8 @@ WAIT; - SetupForRop(rop); - + pCir->chip.alp->transRop = translated_rop[rop] << 16; + #ifdef ALP_DEBUG ErrorF("AlpSetupForScreenToScreenCopy xdir=%d ydir=%d rop=%x planemask=%x trans_color=%x\n", xdir, ydir, rop, planemask, trans_color); @@ -124,7 +122,7 @@ moutl(0x08, (hh << 16) | ww); /* source */ moutl(0x14, source & 0x3fffff); - moutl(0x18, 0x0d0000 | decrement); + moutl(0x18, pCir->chip.alp->transRop | decrement); /* dest */ write_mem_barrier(); @@ -153,8 +151,6 @@ WAIT; - SetupForRop(rop); - #ifdef ALP_DEBUG ErrorF("AlpSetupForSolidFill color=%x rop=%x planemask=%x\n", color, rop, planemask); @@ -164,7 +160,9 @@ /* Set dest pitch */ moutl(0x0C, pitch & 0x1fff); - moutl(0x18, (0xC0|((pScrn->bitsPerPixel - 8) << 1)) | 0x040d0000); + moutl(0x18, (((pScrn->bitsPerPixel - 8) << 1)) + | translated_rop[rop] << 16 + | 0x040000C0); } static void @@ -249,6 +247,7 @@ switch (pCir->Chipset) { case PCI_CHIP_GD5480: + case PCI_CHIP_GD5446: pCir->chip.alp->BLTBase = pCir->IOBase + 0x100; break; default: --- XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_dga.c~ Sun Apr 1 09:00:10 2001 +++ XFree86-4.1.0/xc/programs/Xserver/hw/xfree86/drivers/cirrus/cir_dga.c Sun Aug 12 22:58:32 2001 @@ -78,7 +78,6 @@ if (!pCir->DGAnumModes) { - ErrorF("DGAINIT\n"); pMode = firstMode = pScrn->modes; while (pMode) { newmodes = xrealloc(modes, (num + 1) * sizeof (DGAModeRec));