--- xf86-video-ati-6.6.3/src/r128_driver.c 2007-06-11 22:50:29.000000000 +0200 +++ xf86-video-ati-6.6.3/src/r128_driver.c 2007-06-28 22:23:55.000000000 +0200 @@ -79,7 +79,7 @@ #include "r128_sarea.h" #endif -#define USE_FB /* not until overlays */ +#define USE_FB /* don't disable it: CFB code is broken */ #ifdef USE_FB #include "fb.h" #else @@ -89,9 +89,7 @@ #include "cfb.h" #undef PSZ #include "cfb16.h" -#include "cfb24.h" #include "cfb32.h" -#include "cfb24_32.h" #endif /* colormap initialization */ @@ -294,10 +292,6 @@ #else static const char *cfbSymbols[] = { "cfbScreenInit", - "cfb16ScreenInit", - "cfb24ScreenInit", - "cfb32ScreenInit", - "cfb24_32ScreenInit", NULL }; #endif @@ -1919,17 +1913,10 @@ #ifdef USE_FB mod = "fb"; #else - switch (pScrn->bitsPerPixel) { - case 8: mod = "cfb"; Sym = "cfbScreenInit"; break; - case 16: mod = "cfb16"; Sym = "cfb16ScreenInit"; break; - case 24: - if (info->pix24bpp == 24) { - mod = "cfb24"; Sym = "cfb24ScreenInit"; - } else { - mod = "xf24_32bpp"; Sym = "cfb24_32ScreenInit"; - } - break; - case 32: mod = "cfb32"; Sym = "cfb32ScreenInit"; break; + if (pScrn->bitsPerPixel == 32) { + mod = "cfb32"; Sym = "cfbScreenInit"; + } else { + mod = "cfb"; Sym = "cfbScreenInit"; } #endif if (mod && !xf86LoadSubModule(pScrn, mod)) return FALSE; @@ -2587,45 +2574,10 @@ pScrn->bitsPerPixel)) return FALSE; #else - switch (pScrn->bitsPerPixel) { - case 8: - if (!cfbScreenInit(pScreen, info->FB, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) - return FALSE; - break; - case 16: - if (!cfb16ScreenInit(pScreen, info->FB, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) - return FALSE; - break; - case 24: - if (info->pix24bpp == 24) { - if (!cfb24ScreenInit(pScreen, info->FB, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth)) - return FALSE; - } else { - if (!cfb24_32ScreenInit(pScreen, info->FB, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, - pScrn->displayWidth)) - return FALSE; - } - break; - case 32: - if (!cfb32ScreenInit(pScreen, info->FB, - pScrn->virtualX, pScrn->virtualY, - pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) - return FALSE; - break; - default: - xf86DrvMsg(scrnIndex, X_ERROR, - "Invalid bpp (%d)\n", pScrn->bitsPerPixel); + if (!cfbScreenInit(pScreen, info->FB, + pScrn->virtualX, pScrn->virtualY, + pScrn->xDpi, pScrn->yDpi, pScrn->displayWidth)) return FALSE; - } #endif xf86SetBlackWhitePixels(pScreen);