Index: i740/i740_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/i740/i740_driver.c,v retrieving revision 1.2 diff -u -r1.2 i740_driver.c --- i740/i740_driver.c 23 Apr 2004 19:35:03 -0000 1.2 +++ i740/i740_driver.c 26 Aug 2004 15:44:16 -0000 @@ -75,23 +75,7 @@ #include "micmap.h" -#define USE_FB - -#ifdef USE_FB #include "fb.h" -#else -/* Drivers using cfb need: */ - -#define PSZ 8 -#include "cfb.h" -#undef PSZ - -/* Drivers supporting bpp 16, 24 or 32 with cfb need one or more of: */ - -#include "cfb16.h" -#include "cfb24.h" -#include "cfb32.h" -#endif /* The driver's own header file: */ @@ -222,17 +206,8 @@ #ifdef XFree86LOADER static const char *fbSymbols[] = { -#ifdef USE_FB "fbScreenInit", "fbPictureInit", -#else - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", -#endif - "cfb8_32ScreenInit", - "cfb24_32ScreenInit", NULL }; #endif @@ -498,9 +473,6 @@ int i; MessageType from; int temp; -#ifndef USE_FB - char *mod=0, *reqSym=0; -#endif int flags24; rgb defaultWeight = {0, 0, 0}; @@ -793,37 +765,11 @@ xf86SetDpi(pScrn, 0, 0); -#ifdef USE_FB if (!xf86LoadSubModule(pScrn, "fb")) { I740FreeRec(pScrn); return FALSE; } xf86LoaderReqSymbols("fbScreenInit","fbPictureInit", NULL); -#else - switch (pScrn->bitsPerPixel) { - case 8: - mod = "cfb"; - reqSym = "cfbScreenInit"; - break; - case 16: - mod = "cfb16"; - reqSym = "cfb16ScreenInit"; - break; - case 24: - mod = "cfb24"; - reqSym = "cfb24ScreenInit"; - break; - case 32: - mod = "cfb32"; - reqSym = "cfb32ScreenInit"; - break; - } - if (mod && !xf86LoadSubModule(pScrn, mod)) { - I740FreeRec(pScrn); - return FALSE; - } - xf86LoaderReqSymbols(reqSym, NULL); -#endif if (!xf86ReturnOptValBool(pI740->Options, OPTION_NOACCEL, FALSE)) { if (!xf86LoadSubModule(pScrn, "xaa")) { @@ -1594,12 +1540,9 @@ if (!miSetVisualTypes(pScrn->depth, miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, pScrn->defaultVisual)) return FALSE; -#ifdef USE_FB if (!miSetPixmapDepths ()) return FALSE; -#endif switch (pScrn->bitsPerPixel) { -#ifdef USE_FB case 8: case 16: case 24: @@ -1610,45 +1553,13 @@ pScrn->displayWidth,pScrn->bitsPerPixel)) return FALSE; break; -#else - case 8: - if (!cfbScreenInit(pScreen, pI740->FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth)) - return FALSE; - break; - case 16: - if (!cfb16ScreenInit(pScreen, pI740->FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth)) - return FALSE; - break; - case 24: - if (!cfb24ScreenInit(pScreen, pI740->FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth)) - return FALSE; - break; - case 32: - if (!cfb32ScreenInit(pScreen, pI740->FbBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth)) - return FALSE; - break; -#endif default: xf86DrvMsg(scrnIndex, X_ERROR, "Internal error: invalid bpp (%d) in I740ScrnInit\n", pScrn->bitsPerPixel); return FALSE; } -#ifdef USE_FB fbPictureInit(pScreen,0,0); -#endif xf86SetBlackWhitePixels(pScreen); Index: nsc/nsc_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_driver.c,v retrieving revision 1.2 diff -u -r1.2 nsc_driver.c --- nsc/nsc_driver.c 23 Apr 2004 19:40:15 -0000 1.2 +++ nsc/nsc_driver.c 26 Aug 2004 15:44:16 -0000 @@ -145,7 +145,6 @@ #define DEBUG(x) #define NSC_TRACE 0 -#define CFB 0 #define HWVGA 1 /* Includes that are used by all drivers */ @@ -167,20 +166,7 @@ #define RC_MAX_DEPTH 24 /* Frame buffer stuff */ -#if CFB -/* - * If using cfb, cfb.h is required. Select the others for the bpp values - * the driver supports. - */ -#define PSZ 8 /* needed for cfb.h */ -#include "cfb.h" -#undef PSZ -#include "cfb16.h" -#include "cfb24.h" -#include "cfb32.h" -#else #include "fb.h" -#endif #include "shadowfb.h" @@ -352,21 +338,11 @@ NULL }; -#if CFB -const char *nscCfbSymbols[] = { - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", - NULL -}; -#else const char *nscFbSymbols[] = { "fbScreenInit", "fbPictureInit", NULL }; -#endif const char *nscXaaSymbols[] = { "XAADestroyInfoRec", @@ -442,11 +418,7 @@ * module might refer to. */ LoaderRefSymLists(nscVgahwSymbols, nscVbeSymbols, -#if CFB - nscCfbSymbols, -#else nscFbSymbols, -#endif nscXaaSymbols, nscInt10Symbols, nscRamdacSymbols, nscShadowSymbols, NULL); Index: nsc/nsc_gx1_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx1_driver.c,v retrieving revision 1.2 diff -u -r1.2 nsc_gx1_driver.c --- nsc/nsc_gx1_driver.c 23 Apr 2004 19:40:15 -0000 1.2 +++ nsc/nsc_gx1_driver.c 26 Aug 2004 15:44:20 -0000 @@ -150,7 +150,6 @@ #define DEBUG(x) #define GEODE_TRACE 0 -#define CFB 0 #define HWVGA 0 /* Includes that are used by all drivers */ @@ -170,23 +169,8 @@ #include "xf86cmap.h" /* Frame buffer stuff */ -#if CFB -/* - * If using cfb, cfb.h is required. Select the others for the bpp values - * the driver supports. - */ -#define PSZ 8 /* needed for cfb.h */ -#include "cfb.h" -#undef PSZ -#include "cfb16.h" -#include "cfb24.h" -#include "cfb32.h" - -#else #include "fb.h" -#endif - #include "shadowfb.h" /* Machine independent stuff */ @@ -308,11 +292,7 @@ extern const char *nscVbeSymbols[]; extern const char *nscInt10Symbols[]; -#if CFB -extern const char *nscCfbSymbols[]; -#else extern const char *nscFbSymbols[]; -#endif extern const char *nscXaaSymbols[]; extern const char *nscRamdacSymbols[]; extern const char *nscShadowSymbols[]; @@ -474,11 +454,6 @@ MessageType from; int i = 0; GeodePtr pGeode; -#if CFB - char *mod = NULL; - - char *reqSymbol = NULL; -#endif #if defined(STB_X) GAL_ADAPTERINFO sAdapterInfo; @@ -1020,37 +995,12 @@ xf86SetDpi(pScreenInfo, 0, 0); GeodeDebug(("GX1PreInit(14)!\n")); -#if CFB - /* Load bpp-specific modules */ - mod = NULL; - - /* Load bpp-specific modules */ - switch (pScreenInfo->bitsPerPixel) { - case 8: - mod = "cfb"; - reqSymbol = "cfbScreenInit"; - break; - case 16: - mod = "cfb16"; - reqSymbol = "cfb16ScreenInit"; - break; - default: - return FALSE; - } - if (mod && xf86LoadSubModule(pScreenInfo, mod) == NULL) { - GX1FreeRec(pScreenInfo); - return FALSE; - } - - xf86LoaderReqSymbols(reqSymbol, NULL); -#else if (xf86LoadSubModule(pScreenInfo, "fb") == NULL) { GX1FreeRec(pScreenInfo); return FALSE; } xf86LoaderReqSymLists(nscFbSymbols, NULL); -#endif GeodeDebug(("GX1PreInit(15)!\n")); if (pGeode->NoAccel == FALSE) { if (!xf86LoadSubModule(pScreenInfo, "xaa")) { @@ -2019,26 +1969,12 @@ /* Initialise the framebuffer */ switch (pScreenInfo->bitsPerPixel) { -#if CFB - case 8: - Inited = cfbScreenInit(pScreen, FBStart, width, height, - pScreenInfo->xDpi, pScreenInfo->yDpi, - displayWidth); - break; - case 16: - Inited = cfb16ScreenInit(pScreen, FBStart, width, height, - pScreenInfo->xDpi, pScreenInfo->yDpi, - displayWidth); - break; - -#else case 8: case 16: Inited = fbScreenInit(pScreen, FBStart, width, height, pScreenInfo->xDpi, pScreenInfo->yDpi, displayWidth, pScreenInfo->bitsPerPixel); break; -#endif default: xf86DrvMsg(scrnIndex, X_ERROR, "Internal error: invalid bpp (%d) in ScreenInit\n", @@ -2071,11 +2007,8 @@ } } } -#if CFB -#else /* must be after RGB ordering fixed */ fbPictureInit(pScreen, 0, 0); -#endif GeodeDebug(("GX1ScreenInit(6)!\n")); if (!pGeode->NoAccel) { Index: nsc/nsc_gx2_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/nsc/nsc_gx2_driver.c,v retrieving revision 1.2 diff -u -r1.2 nsc_gx2_driver.c --- nsc/nsc_gx2_driver.c 23 Apr 2004 19:40:15 -0000 1.2 +++ nsc/nsc_gx2_driver.c 26 Aug 2004 15:44:20 -0000 @@ -145,7 +145,6 @@ #define DEBUG(x) #define GEODE_TRACE 0 -#define CFB 0 /* Includes that are used by all drivers */ #include "xf86.h" @@ -168,20 +167,7 @@ #define RC_MAX_DEPTH 24 /* Frame buffer stuff */ -#if CFB -/* - * If using cfb, cfb.h is required. Select the others for the bpp values - * the driver supports. - */ -#define PSZ 8 /* needed for cfb.h */ -#include "cfb.h" -#undef PSZ -#include "cfb16.h" -#include "cfb24.h" -#include "cfb32.h" -#else #include "fb.h" -#endif #include "shadowfb.h" @@ -269,11 +255,7 @@ extern const char *nscVbeSymbols[]; extern const char *nscInt10Symbols[]; -#if CFB -extern const char *nscCfbSymbols[]; -#else extern const char *nscFbSymbols[]; -#endif extern const char *nscXaaSymbols[]; extern const char *nscRamdacSymbols[]; extern const char *nscShadowSymbols[]; @@ -474,10 +456,6 @@ MessageType from; int i = 0; GeodePtr pGeode; -#if CFB - char *mod = NULL; - char *reqSymbol = NULL; -#endif /* CFB */ #if defined(STB_X) GAL_ADAPTERINFO sAdapterInfo; #endif /* STB_X */ @@ -978,45 +956,12 @@ xf86SetDpi(pScreenInfo, 0, 0); GeodeDebug(("GX2PreInit(14)!\n")); -#if CFB - /* Load bpp-specific modules */ - mod = NULL; - - /* Load bpp-specific modules */ - switch (pScreenInfo->bitsPerPixel) { - case 8: - mod = "cfb"; - reqSymbol = "cfbScreenInit"; - break; - case 16: - mod = "cfb16"; - reqSymbol = "cfb16ScreenInit"; - break; - case 24: - mod = "cfb24"; - reqSymbol = "cfb24ScreenInit"; - break; - case 32: - mod = "cfb32"; - reqSymbol = "cfb32ScreenInit"; - break; - default: - return FALSE; - } - if (mod && xf86LoadSubModule(pScreenInfo, mod) == NULL) { - GX2FreeRec(pScreenInfo); - return FALSE; - } - - xf86LoaderReqSymbols(reqSymbol, NULL); -#else if (xf86LoadSubModule(pScreenInfo, "fb") == NULL) { GX2FreeRec(pScreenInfo); return FALSE; } xf86LoaderReqSymLists(nscFbSymbols, NULL); -#endif GeodeDebug(("GX2PreInit(15)!\n")); if (pGeode->NoAccel == FALSE) { if (!xf86LoadSubModule(pScreenInfo, "xaa")) { @@ -1933,24 +1878,6 @@ } switch (pScreenInfo->bitsPerPixel) { -#if CFB - case 8: - Inited = cfbScreenInit(pScreen, FBStart, width, height, - pScreenInfo->xDpi, pScreenInfo->yDpi, - displayWidth); - break; - case 16: - Inited = cfb16ScreenInit(pScreen, FBStart, width, height, - pScreenInfo->xDpi, pScreenInfo->yDpi, - displayWidth); - break; - case 24: - case 32: - Inited = cfb32ScreenInit(pScreen, FBStart, width, height, - pScreenInfo->xDpi, pScreenInfo->yDpi, - displayWidth); - break; -#else case 8: case 16: case 24: @@ -1959,7 +1886,6 @@ pScreenInfo->xDpi, pScreenInfo->yDpi, displayWidth, pScreenInfo->bitsPerPixel); break; -#endif default: xf86DrvMsg(scrnIndex, X_ERROR, "Internal error: invalid bpp (%d) in ScreenInit\n", @@ -1991,11 +1917,8 @@ } } } -#if CFB -#else /* must be after RGB ordering fixed */ fbPictureInit(pScreen, 0, 0); -#endif GeodeDebug(("GX2ScreenInit(6)!\n")); if (!pGeode->NoAccel) { Index: s3/s3.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/s3/s3.h,v retrieving revision 1.2 diff -u -r1.2 s3.h --- s3/s3.h 23 Apr 2004 19:43:14 -0000 1.2 +++ s3/s3.h 26 Aug 2004 15:44:20 -0000 @@ -45,15 +45,6 @@ #include "fourcc.h" -#ifndef S3_USEFB -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb16.h" -#include "cfb24.h" -#include "cfb32.h" -#endif - typedef struct _S3RegRec { unsigned char cr31, cr32, cr33, cr34, cr3a, cr3b, cr3c; unsigned char cr3b2, cr3c2; Index: s3/s3_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/s3/s3_driver.c,v retrieving revision 1.6 diff -u -r1.6 s3_driver.c --- s3/s3_driver.c 16 Aug 2004 09:13:14 -0000 1.6 +++ s3/s3_driver.c 26 Aug 2004 15:44:20 -0000 @@ -176,23 +176,11 @@ { -1 } }; -#define S3_USEFB - -#ifdef S3_USEFB static const char *fbSymbols[] = { "fbPictureInit", "fbScreenInit", NULL }; -#else -static const char *cfbSymbols[] = { - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", - NULL -}; -#endif static const char *vgaHWSymbols[] = { "vgaHWGetHWRec", @@ -278,11 +266,7 @@ xf86AddDriver(&S3, module, 0); LoaderRefSymLists(vgaHWSymbols, vbeSymbols, int10Symbols, ramdacSymbols, -#ifdef S3_USEFB fbSymbols, -#else - cfbSymbols, -#endif xaaSymbols, NULL); return (pointer) 1; @@ -746,31 +730,8 @@ xf86PrintModes(pScrn); xf86SetDpi(pScrn, 0, 0); -#ifdef S3_USEFB xf86LoadSubModule(pScrn, "fb"); xf86LoaderReqSymLists(fbSymbols, NULL); -#else - { - switch (pScrn->bitsPerPixel) { - case 8: - xf86LoadSubModule(pScrn, "cfb"); - xf86LoaderReqSymbols("cfbScreenInit", NULL); - break; - case 16: - xf86LoadSubModule(pScrn, "cfb16"); - xf86LoaderReqSymbols("cfb16ScreenInit", NULL); - break; - case 24: - xf86LoadSubModule(pScrn, "cfb24"); - xf86LoaderReqSymbols("cfb24ScreenInit", NULL); - break; - case 32: - xf86LoadSubModule(pScrn, "cfb32"); - xf86LoaderReqSymbols("cfb32ScreenInit", NULL); - break; - } - } -#endif if (!xf86LoadSubModule(pScrn, "xaa")) return FALSE; @@ -819,45 +780,10 @@ miSetPixmapDepths (); -#ifdef S3_USEFB if (!fbScreenInit(pScreen, pS3->FBBase, pScrn->virtualX, pScrn->virtualY, pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth, pScrn->bitsPerPixel)) return FALSE; -#else - { - int ret; - - switch(pScrn->bitsPerPixel) { - case 8: - ret = cfbScreenInit(pScreen, pS3->FBBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 16: - ret = cfb16ScreenInit(pScreen, pS3->FBBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 24: - ret = cfb24ScreenInit(pScreen, pS3->FBBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - case 32: - ret = cfb32ScreenInit(pScreen, pS3->FBBase, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth); - break; - } - if (!ret) - return FALSE; - } -#endif xf86SetBlackWhitePixels(pScreen); @@ -876,9 +802,7 @@ } } } -#ifdef S3_USEFB fbPictureInit (pScreen, 0, 0); -#endif S3DGAInit(pScreen); miInitializeBackingStore(pScreen); Index: s3virge/s3v_accel.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_accel.c,v retrieving revision 1.2 diff -u -r1.2 s3v_accel.c --- s3virge/s3v_accel.c 30 Jul 2004 20:30:54 -0000 1.2 +++ s3virge/s3v_accel.c 26 Aug 2004 15:44:20 -0000 @@ -965,12 +965,6 @@ #if 0 /* Line funcs are disabled at the moment */ -static void (*LineFuncs[3])() = { - cfbBresS, - cfb16BresS, - cfb24BresS -}; - static void S3VSubsequentSolidBresenhamLine( ScrnInfoPtr pScrn, @@ -1021,27 +1015,6 @@ #endif } - else - { - devPriv = cfbGetGCPrivate(ps3v->CurrentGC); - - /* you could trap for lines you could do here and accelerate them */ - - /* - * void - * cfbBresS(rop, and, xor, addrl, nlwidth, signdx, signdy, axis, - * x1, y1, e, e1, e2, len) - */ - - (*LineFuncs[Bpp - 1]) - (devPriv->rop, devPriv->and, devPriv->xor, - (unsigned long*)ps3v->FBBase, - (pScrn->displayWidth * Bpp) >> LOG2_BYTES_PER_SCANLINE_PAD, - (octant & XDECREASING) ? -1 : 1, - (octant & YDECREASING) ? -1 : 1, - (octant & YMAJOR) ? Y_AXIS : X_AXIS, - x, y, dmin + e, dmin, dmin - dmaj, len); - } /*if(fb)*/ } #endif Index: s3virge/s3v_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/s3virge/s3v_driver.c,v retrieving revision 1.5 diff -u -r1.5 s3v_driver.c --- s3virge/s3v_driver.c 16 Aug 2004 09:13:14 -0000 1.5 +++ s3virge/s3v_driver.c 26 Aug 2004 15:44:20 -0000 @@ -872,17 +872,11 @@ ps3v->hwcursor = FALSE; } + ps3v->UseFB = TRUE; + xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Using fb.\n"); if (xf86IsOptionSet(ps3v->Options, OPTION_FB_DRAW)) - { - if (xf86GetOptValBool(ps3v->Options, OPTION_FB_DRAW ,&ps3v->UseFB)) - xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "Using %s.\n", - ps3v->UseFB ? "fb (not cfb)" : "cfb (not fb)"); - } - else - { - ps3v->UseFB = TRUE; - xf86DrvMsg(pScrn->scrnIndex, X_DEFAULT, "Using fb.\n"); - } + xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, + "UseFB option is deprecated.\n"); if (xf86IsOptionSet(ps3v->Options, OPTION_MX_CR3A_FIX)) { @@ -1512,38 +1506,6 @@ } xf86LoaderReqSymLists(fbSymbols, NULL); } - else - { - switch (pScrn->bitsPerPixel) { - case 8: - mod = "cfb"; - reqSym = "cfbScreenInit"; - break; - case 16: - mod = "cfb16"; - reqSym = "cfb16ScreenInit"; - break; - case 24: - if (pix24bpp == 24) { - mod = "cfb24"; - reqSym = "cfb24ScreenInit"; - } else { - mod = "xf24_32bpp"; - reqSym = "cfb24_32ScreenInit"; - } - break; - case 32: - mod = "cfb32"; - reqSym = "cfb32ScreenInit"; - break; - } - if (mod && xf86LoadSubModule(pScrn, mod) == NULL) { - S3VFreeRec(pScrn); - return FALSE; - } - - xf86LoaderReqSymbols(reqSym, NULL); - } /* Load XAA if needed */ if (!ps3v->NoAccel || ps3v->hwcursor ) { @@ -2742,49 +2704,6 @@ break; } } - else - { - xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Using CFB\n"); - switch (pScrn->bitsPerPixel) { - case 8: - ret = cfbScreenInit(pScreen, FBStart, - width,height, - pScrn->xDpi, pScrn->yDpi, - displayWidth); - break; - case 16: - ret = cfb16ScreenInit(pScreen, FBStart, - width,height, - pScrn->xDpi, pScrn->yDpi, - displayWidth); - break; - case 24: - if (pix24bpp ==24) { - ret = cfb24ScreenInit(pScreen, FBStart, - width,height, - pScrn->xDpi, pScrn->yDpi, - displayWidth); - } else { - ret = cfb24_32ScreenInit(pScreen, FBStart, - width,height, - pScrn->xDpi, pScrn->yDpi, - displayWidth); - } - break; - case 32: - ret = cfb32ScreenInit(pScreen, FBStart, - width,height, - pScrn->xDpi, pScrn->yDpi, - displayWidth); - break; - default: - xf86DrvMsg(scrnIndex, X_ERROR, - "Internal error: invalid bpp (%d) in S3VScreenInit\n", - pScrn->bitsPerPixel); - ret = FALSE; - break; - } /*switch*/ - } /*if(fb)*/ return ret; } Index: siliconmotion/smi.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi.h,v retrieving revision 1.3 diff -u -r1.3 smi.h --- siliconmotion/smi.h 26 May 2004 16:24:09 -0000 1.3 +++ siliconmotion/smi.h 26 Aug 2004 15:44:20 -0000 @@ -31,8 +31,6 @@ #ifndef _SMI_H #define _SMI_H -#define USE_FB - #include "xf86.h" #include "xf86_OSproc.h" #include "xf86_ansic.h" @@ -46,16 +44,7 @@ #include "mipointer.h" #include "micmap.h" -#ifdef USE_FB #include "fb.h" -#else - -#define PSZ 8 -#include "cfb.h" -#undef PSZ -#include "cfb16.h" -#include "cfb24.h" -#endif #include "xaa.h" #include "xf86cmap.h" Index: siliconmotion/smi_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c,v retrieving revision 1.6 diff -u -r1.6 smi_driver.c --- siliconmotion/smi_driver.c 16 Aug 2004 09:13:15 -0000 1.6 +++ siliconmotion/smi_driver.c 26 Aug 2004 15:44:21 -0000 @@ -280,17 +280,8 @@ static const char *fbSymbols[] = { -#ifdef USE_FB "fbPictureInit", "fbScreenInit", -#else - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", - "cfb16BresS", - "cfb24BresS", -#endif NULL }; @@ -504,10 +495,6 @@ int i; double real; ClockRangePtr clockRanges; -#ifndef USE_FB - char *mod = NULL; - const char *reqSym = NULL; -#endif char *s; unsigned char config, m, n, shift; int mclk; @@ -1194,7 +1181,6 @@ /* Set display resolution */ xf86SetDpi(pScrn, 0, 0); -#ifdef USE_FB if ((xf86LoadSubModule(pScrn, "fb") == NULL)) { SMI_FreeRec(pScrn); @@ -1203,35 +1189,6 @@ } xf86LoaderReqSymLists(fbSymbols, NULL); -#else - /* Load bpp-specific modules */ - switch (pScrn->bitsPerPixel) - { - case 8: - mod = "cfb"; - reqSym = "cfbScreenInit"; - break; - - case 16: - mod = "cfb16"; - reqSym = "cfb16ScreenInit"; - break; - - case 24: - mod = "cfb24"; - reqSym = "cfb24ScreenInit"; - break; - } - - if (mod && (xf86LoadSubModule(pScrn, mod) == NULL)) - { - SMI_FreeRec(pScrn); - LEAVE_PROC("SMI_PreInit"); - return(FALSE); - } - - xf86LoaderReqSymbols(reqSym, NULL); -#endif /* Load XAA if needed */ if (!pSmi->NoAccel || pSmi->hwcursor) { @@ -2132,9 +2089,6 @@ * as calling the framebuffer's ScreenInit() function. If not, the visuals * will need to be setup before calling a fb ScreenInit() function and fixed * up after. - * - * For most PC hardware at depths >= 8, the defaults that cfb uses are not - * appropriate. In this driver, we fixup the visuals after. */ /* @@ -2144,35 +2098,14 @@ /* Setup the visuals we support. */ - /* - * For bpp > 8, the default visuals are not acceptable because we only - * support TrueColor and not DirectColor. To deal with this, call - * miSetVisualTypes with the appropriate visual mask. - */ -#ifndef USE_FB - if (pScrn->bitsPerPixel > 8) + if (!miSetVisualTypes(pScrn->depth, + miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, + pScrn->defaultVisual)) { - if (!miSetVisualTypes(pScrn->depth, TrueColorMask, pScrn->rgbBits, - pScrn->defaultVisual)) - { - LEAVE_PROC("SMI_ScreenInit"); - return(FALSE); - } - } - else -#endif - { - if (!miSetVisualTypes(pScrn->depth, - miGetDefaultVisualMask(pScrn->depth), pScrn->rgbBits, - pScrn->defaultVisual)) - { - LEAVE_PROC("SMI_ScreenInit"); - return(FALSE); - } + LEAVE_PROC("SMI_ScreenInit"); + return(FALSE); } -#ifdef USE_FB if (!miSetPixmapDepths ()) return FALSE; -#endif if (!SMI_InternalScreenInit(scrnIndex, pScreen)) { @@ -2201,10 +2134,8 @@ } } -#ifdef USE_FB /* must be after RGB ordering fixed */ fbPictureInit(pScreen, 0, 0); -#endif /* CZ 18.06.2001: moved here from smi_accel.c to have offscreen framebuffer in NoAccel mode */ @@ -2411,29 +2342,12 @@ pSmi->FBBase, width, height, displayWidth)); switch (pScrn->bitsPerPixel) { -#ifdef USE_FB case 8: case 16: case 24: ret = fbScreenInit(pScreen, pSmi->FBBase, width, height, xDpi, yDpi, displayWidth,pScrn->bitsPerPixel); break; -#else - case 8: - ret = cfbScreenInit(pScreen, pSmi->FBBase, width, height, xDpi, - yDpi, displayWidth); - break; - - case 16: - ret = cfb16ScreenInit(pScreen, pSmi->FBBase, width, height, xDpi, - yDpi, displayWidth); - break; - - case 24: - ret = cfb24ScreenInit(pScreen, pSmi->FBBase, width, height, xDpi, - yDpi, displayWidth); - break; -#endif default: xf86DrvMsg(scrnIndex, X_ERROR, "Internal error: invalid bpp (%d) " "in SMI_InternalScreenInit\n", pScrn->bitsPerPixel); Index: via/via_driver.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/via/via_driver.c,v retrieving revision 1.5 diff -u -r1.5 via_driver.c --- via/via_driver.c 16 Aug 2004 09:13:15 -0000 1.5 +++ via/via_driver.c 26 Aug 2004 15:44:22 -0000 @@ -265,24 +265,11 @@ NULL }; -#ifdef USE_FB static const char *fbSymbols[] = { "fbScreenInit", "fbPictureInit", NULL }; -#else -static const char *cfbSymbols[] = { - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb24_32ScreenInit", - "cfb32ScreenInit", - "cfb16BresS", - "cfb24BresS", - NULL -}; -#endif #ifdef XFree86LOADER #ifdef XF86DRI @@ -355,11 +342,7 @@ setupDone = TRUE; xf86AddDriver(&VIA, module, 0); LoaderRefSymLists(vgaHWSymbols, -#ifdef USE_FB fbSymbols, -#else - cfbSymbols, -#endif ramdacSymbols, xaaSymbols, shadowSymbols, @@ -704,10 +687,6 @@ MessageType from = X_DEFAULT; ClockRangePtr clockRanges; char *s = NULL; -#ifndef USE_FB - char *mod = NULL; - const char *reqSym = NULL; -#endif vgaHWPtr hwp; int i, bMemSize = 0, tmp; @@ -1545,7 +1524,6 @@ xf86PrintModes(pScrn); xf86SetDpi(pScrn, 0, 0); -#ifdef USE_FB if (xf86LoadSubModule(pScrn, "fb") == NULL) { VIAFreeRec(pScrn); return FALSE; @@ -1553,31 +1531,6 @@ xf86LoaderReqSymLists(fbSymbols, NULL); -#else - /* load bpp-specific modules */ - switch (pScrn->bitsPerPixel) { - case 8: - mod = "cfb"; - reqSym = "cfbScreenInit"; - break; - case 16: - mod = "cfb16"; - reqSym = "cfb16ScreenInit"; - break; - case 32: - mod = "cfb32"; - reqSym = "cfb32ScreenInit"; - break; - } - - if (mod && xf86LoadSubModule(pScrn, mod) == NULL) { - VIAFreeRec(pScrn); - return FALSE; - } - - xf86LoaderReqSymbols(reqSym, NULL); -#endif - if (!pVia->NoAccel) { if(!xf86LoadSubModule(pScrn, "xaa")) { VIAFreeRec(pScrn); @@ -2364,10 +2317,8 @@ } } -#ifdef USE_FB /* must be after RGB ordering fixed */ fbPictureInit(pScreen, 0, 0); -#endif if (!pVia->NoAccel) { VIAInitAccel(pScreen); @@ -2529,35 +2480,9 @@ FBStart = pVia->FBStart; } -#ifdef USE_FB ret = fbScreenInit(pScreen, FBStart, width, height, pScrn->xDpi, pScrn->yDpi, displayWidth, pScrn->bitsPerPixel); -#else - switch (pScrn->bitsPerPixel) { - case 8: - ret = cfbScreenInit(pScreen, FBStart, width, height, pScrn->xDpi, - pScrn->yDpi, displayWidth); - break; - - case 16: - ret = cfb16ScreenInit(pScreen, FBStart, width, height, pScrn->xDpi, - pScrn->yDpi, displayWidth); - break; - - case 32: - ret = cfb32ScreenInit(pScreen, FBStart, width, height, pScrn->xDpi, - pScrn->yDpi, displayWidth); - break; - - default: - xf86DrvMsg(scrnIndex, X_ERROR, - "Internal error: invalid bpp (%d) in SavageScreenInit\n", - pScrn->bitsPerPixel); - ret = FALSE; - break; - } -#endif return ret; } Index: via/via_driver.h =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/drivers/via/via_driver.h,v retrieving revision 1.2 diff -u -r1.2 via_driver.h --- via/via_driver.h 23 Apr 2004 19:53:54 -0000 1.2 +++ via/via_driver.h 26 Aug 2004 15:44:22 -0000 @@ -45,14 +45,7 @@ #include "mipointer.h" #include "micmap.h" -#define USE_FB -#ifdef USE_FB #include "fb.h" -#else -#include "cfb.h" -#include "cfb16.h" -#include "cfb32.h" -#endif #include "xf86cmap.h" #include "vbe.h"