diff options
author | Adam Jackson <ajax@nwnk.net> | 2004-09-17 03:04:54 +0000 |
---|---|---|
committer | Adam Jackson <ajax@nwnk.net> | 2004-09-17 03:04:54 +0000 |
commit | c34e24d83a0f84ad90b7cbaba78d54cc779f74d5 (patch) | |
tree | d80416ae5c44620b420dd9e446cbef5258879cac /src/smi_driver.c | |
parent | 61457616aea5d5d7d98e869d3b24e989c2404d6b (diff) |
Bug #1192: Remove cfb support from drivers where its use is an option.xprint_packagertest_20041217_basexprint_packagertest_20041125_baseXORG-6_8_99_3XORG-6_8_99_2XORG-6_8_99_1xprint_packagertest_20041217xprint_packagertest_20041125
Delete xf24_32bpp, as s3virge was the last user. Fix up some comments
to refer to fb rather than cfb.
Diffstat (limited to 'src/smi_driver.c')
-rw-r--r-- | src/smi_driver.c | 96 |
1 files changed, 5 insertions, 91 deletions
diff --git a/src/smi_driver.c b/src/smi_driver.c index 841290e..48784b2 100644 --- a/src/smi_driver.c +++ b/src/smi_driver.c @@ -280,17 +280,8 @@ static const char *vbeSymbols[] = static const char *fbSymbols[] = { -#ifdef USE_FB "fbPictureInit", "fbScreenInit", -#else - "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", - "cfb16BresS", - "cfb24BresS", -#endif NULL }; @@ -504,10 +495,6 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) 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 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) /* Set display resolution */ xf86SetDpi(pScrn, 0, 0); -#ifdef USE_FB if ((xf86LoadSubModule(pScrn, "fb") == NULL)) { SMI_FreeRec(pScrn); @@ -1203,35 +1189,6 @@ SMI_PreInit(ScrnInfoPtr pScrn, int flags) } 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 @@ SMI_ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) * 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 @@ SMI_ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) /* 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 @@ SMI_ScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv) } } -#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 @@ SMI_InternalScreenInit(int scrnIndex, ScreenPtr pScreen) 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); |