diff -urd trident-old/trident_dac.c trident/trident_dac.c --- trident-old/trident_dac.c 2004-04-23 21:52:01 +0200 +++ trident/trident_dac.c 2004-08-27 21:58:39 +0200 @@ -107,14 +107,6 @@ biosMode *mode; switch (depth) { - case 1: - size = sizeof(bios1) / sizeof(biosMode); - mode = bios1; - break; - case 4: - size = sizeof(bios4) / sizeof(biosMode); - mode = bios4; - break; case 8: size = sizeof(bios8) / sizeof(biosMode); mode = bios8; @@ -524,10 +516,7 @@ case IMAGE975: case IMAGE985: case CYBER9388: - if (pScrn->bitsPerPixel >= 8) pReg->tridentRegs3CE[MiscExtFunc] |= 0x10; - else - pReg->tridentRegs3CE[MiscExtFunc] &= ~0x10; if (!pReg->tridentRegs3x4[PreEndControl]) pReg->tridentRegs3x4[PreEndControl] = 0x01; if (!pReg->tridentRegs3x4[PreEndFetch]) @@ -555,10 +544,6 @@ /* Defaults for all trident chipsets follows */ switch (pScrn->bitsPerPixel) { - case 1: - case 4: - offset = pScrn->displayWidth >> 4; - break; case 8: pReg->tridentRegs3CE[MiscExtFunc] |= 0x02; offset = pScrn->displayWidth >> 3; diff -urd trident-old/trident_driver.c trident/trident_driver.c --- trident-old/trident_driver.c 2004-08-17 13:37:42 +0200 +++ trident/trident_driver.c 2004-08-27 22:07:48 +0200 @@ -30,8 +30,6 @@ */ /* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/trident/trident_driver.c,v 1.190 2004/01/21 22:31:54 alanh Exp $ */ -#include "xf1bpp.h" -#include "xf4bpp.h" #include "fb.h" #include "mibank.h" @@ -503,14 +501,6 @@ NULL }; -#ifdef XFree86LOADER -static const char *miscfbSymbols[] = { - "xf1bppScreenInit", - "xf4bppScreenInit", - NULL -}; -#endif - static const char *fbSymbols[] = { "fbPictureInit", "fbScreenInit", @@ -584,7 +574,7 @@ setupDone = TRUE; xf86AddDriver(&TRIDENT, module, 0); LoaderRefSymLists(vgahwSymbols, fbSymbols, i2cSymbols, vbeSymbols, - miscfbSymbols, ramdacSymbols, int10Symbols, + ramdacSymbols, int10Symbols, xaaSymbols, shadowSymbols, NULL); return (pointer)TRUE; } @@ -700,25 +690,6 @@ xf86PrintChipsets(TRIDENT_NAME, "driver for Trident chipsets", TRIDENTChipsets); } -static void -TRIDENTFix1bpp(ScrnInfoPtr pScrn) { - vgaHWPtr hwp = VGAHWPTR(pScrn); -/* In 1 bpp we have color 0 at LUT 0 and color 1 at LUT 0x3f. - This makes white and black look right (otherwise they were both - black. I'm sure there's a better way to do that, just lazy to - search the docs. */ - - (*hwp->writeDacWriteAddr)(hwp, 0x00); - (*hwp->writeDacData)(hwp, 0x00); - (*hwp->writeDacData)(hwp, 0x00); - (*hwp->writeDacData)(hwp, 0x00); - - (*hwp->writeDacWriteAddr)(hwp, 0x3F); - (*hwp->writeDacData)(hwp, 0x3F); - (*hwp->writeDacData)(hwp, 0x3F); - (*hwp->writeDacData)(hwp, 0x3F); -} - Bool TRIDENTClockSelect(ScrnInfoPtr pScrn, int no) { @@ -1070,8 +1041,6 @@ int i, NoClocks = 16; CARD8 revision; ClockRangePtr clockRanges; - char *mod = NULL; - const char *Sym = ""; Bool ddcLoaded = FALSE; char *s; @@ -1121,8 +1090,6 @@ } else { /* Check that the returned depth is one we support */ switch (pScrn->depth) { - case 1: - case 4: case 8: if (pScrn->bitsPerPixel != pScrn->depth) { xf86DrvMsg(pScrn->scrnIndex, X_ERROR, @@ -1238,7 +1205,7 @@ xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pTrident->Options); /* Set the bits per RGB for 8bpp mode */ - if (pScrn->depth <= 8) { + if (pScrn->depth == 8) { /* XXX This is here just to test options. */ /* Default to 8 */ pScrn->rgbBits = 6; @@ -1412,9 +1379,6 @@ if (!pTrident->Linear) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Ignoring Option SHADOW_FB" " in non-Linear Mode\n"); - else if (pScrn->depth < 8) - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Tgnoring Option SHADOW_FB" - " when depth < 8"); else { pTrident->ShadowFB = TRUE; pTrident->NoAccel = TRUE; @@ -1427,9 +1391,6 @@ if (!pTrident->Linear) xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Ignoring Option ROTATE " "in non-Linear Mode\n"); - else if (pScrn->depth < 8) - xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "Ignoring Option ROTATE " - "when depth < 8"); else { if(!xf86NameCmp(s, "CW")) { /* accel is disabled below for shadowFB */ @@ -2290,10 +2251,9 @@ * care of this, we don't worry about setting them here. */ - if ((pScrn->depth < 8) || - (pScrn->bitsPerPixel == 24)) { + if (pScrn->bitsPerPixel == 24) { xf86DrvMsg(pScrn->scrnIndex, X_PROBED, - "Disabling Engine due to 24bpp or < 8bpp.\n"); + "Disabling Engine due to 24bpp.\n"); pTrident->NoAccel = TRUE; } @@ -2360,35 +2320,21 @@ /* Load bpp-specific modules */ switch (pScrn->bitsPerPixel) { - case 1: - pTrident->EngineOperation |= 0x00; - mod = "xf1bpp"; - Sym = "xf1bppScreenInit"; - break; - case 4: - pTrident->EngineOperation |= 0x00; - mod = "xf4bpp"; - Sym = "xf4bppScreenInit"; - break; case 8: pTrident->EngineOperation |= 0x00; - mod = "fb"; break; case 16: pTrident->EngineOperation |= 0x01; - mod = "fb"; break; case 24: pTrident->EngineOperation |= 0x03; - mod = "fb"; break; case 32: pTrident->EngineOperation |= 0x02; - mod = "fb"; break; } - if (mod && xf86LoadSubModule(pScrn, mod) == NULL) { + if (xf86LoadSubModule(pScrn, "fb") == NULL) { if (IsPciCard && UseMMIO) { TRIDENTDisableMMIO(pScrn); TRIDENTUnmapMem(pScrn); @@ -2397,13 +2343,7 @@ return FALSE; } - if (mod) { - if (Sym) { - xf86LoaderReqSymbols(Sym, NULL); - } else { - xf86LoaderReqSymLists(fbSymbols, NULL); - } - } + xf86LoaderReqSymLists(fbSymbols, NULL); if (!xf86LoadSubModule(pScrn, "i2c")) { if (IsPciCard && UseMMIO) { @@ -2870,16 +2810,6 @@ */ switch (pScrn->bitsPerPixel) { - case 1: - ret = xf1bppScreenInit(pScreen, FBStart, width, - height, pScrn->xDpi, pScrn->yDpi, - displayWidth); - break; - case 4: - ret = xf4bppScreenInit(pScreen, FBStart, width, - height, pScrn->xDpi, pScrn->yDpi, - displayWidth); - break; case 8: case 16: case 24: @@ -2916,15 +2846,10 @@ visual->blueMask = pScrn->mask.blue; } } - } else { - if (pScrn->bitsPerPixel == 1) { - TRIDENTFix1bpp(pScrn); - } } /* must be after RGB ordering fixed */ - if (pScrn->bitsPerPixel > 4) - fbPictureInit (pScreen, 0, 0); + fbPictureInit (pScreen, 0, 0); xf86SetBlackWhitePixels(pScreen); @@ -3021,9 +2946,6 @@ /* Initialise cursor functions */ miDCInitialize (pScreen, xf86GetPointerScreenFuncs()); - if (pScrn->bitsPerPixel < 8) - pTrident->HWCursor = FALSE; - if (pTrident->HWCursor) { xf86SetSilkenMouse(pScreen); TridentHWCursorInit(pScreen); @@ -3115,9 +3037,6 @@ vgaIOBase = VGAHWPTR(pScrn)->IOBase; switch (pScrn->bitsPerPixel) { - case 4: - base >>= 3; - break; case 8: if (pScrn->progClock) base = (base & 0xFFFFFFF8) >> 2; diff -urd trident-old/tvga_dac.c trident/tvga_dac.c --- trident-old/tvga_dac.c 2004-04-23 21:52:01 +0200 +++ trident/tvga_dac.c 2004-08-27 21:54:08 +0200 @@ -55,7 +55,6 @@ OUTB(vgaIOBase + 4, FIFOControl); pReg->tridentRegs3x4[FIFOControl] = INB(vgaIOBase + 5) | 0x24; - if (pScrn->bitsPerPixel >= 8) { /* YUK ! here we have to mess with old mode operation */ OUTB(0x3C4, 0x0B); OUTB(0x3C5, 0x00); /* Goto Old Mode */ OUTB(0x3C4, OldMode2 + NewMode2); @@ -64,7 +63,6 @@ pReg->tridentRegs3x4[Underline] = 0x40; if (pTrident->Chipset < TGUI9440AGi) pReg->tridentRegs3x4[CRTCMode] = 0xA3; - } if (pScrn->videoRam > 512) pReg->tridentRegs3C4[ConfPort2] |= 0x20; @@ -72,10 +70,6 @@ pReg->tridentRegs3C4[ConfPort2] &= 0xDF; switch (pScrn->bitsPerPixel) { - case 1: - case 4: - offset = pScrn->displayWidth >> 4; - break; case 8: if (pScrn->videoRam < 1024) offset = pScrn->displayWidth >> 3; @@ -165,11 +159,9 @@ OUTW_3x4(LinearAddReg); OUTW_3x4(FIFOControl); OUTW_3C4(ConfPort2); - if (pScrn->bitsPerPixel >= 8) { - OUTW_3x4(Underline); - if (pTrident->Chipset < TGUI9440AGi) + OUTW_3x4(Underline); + if (pTrident->Chipset < TGUI9440AGi) OUTW_3x4(CRTCMode); - } OUTW_3x4(AddColReg); OUTW_3CE(MiscExtFunc); OUTW_3x4(Offset); @@ -210,11 +202,9 @@ OUTW(0x3C4, ((0x80 ^ 0x02) << 8) | NewMode1); OUTW(vgaIOBase + 4, (0x92 << 8) | NewMode1); - if (pScrn->bitsPerPixel >= 8) { - INB_3x4(Underline); - if (pTrident->Chipset < TGUI9440AGi) + INB_3x4(Underline); + if (pTrident->Chipset < TGUI9440AGi) INB_3x4(CRTCMode); - } INB_3x4(LinearAddReg); INB_3x4(FIFOControl); INB_3x4(CRTCModuleTest);