summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-01-08 15:48:00 +1000
committerDave Airlie <airlied@redhat.com>2008-01-08 15:49:07 +1000
commit8a33d2b5a820789309688855c81a4b11f8283500 (patch)
tree8512916ecc677efacf38ef2d42385190ebc6d48f /src
parent46e982ec0208bf7a32d47cd7cf7b1895e7bbfe1d (diff)
test for 1/4 bpp in case server is configured with them off
Diffstat (limited to 'src')
-rw-r--r--src/alp_driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/alp_driver.c b/src/alp_driver.c
index 9f09b36..dd06845 100644
--- a/src/alp_driver.c
+++ b/src/alp_driver.c
@@ -56,8 +56,13 @@
/* Framebuffer memory manager */
#include "xf86fbman.h"
+#if HAVE_XF4BPP
#include "xf4bpp.h"
+#endif
+#if HAVE_XF1BPP
#include "xf1bpp.h"
+#endif
+
#include "fb.h"
@@ -1083,6 +1088,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
/* Load bpp-specific modules */
switch (pScrn->bitsPerPixel) {
+#ifdef HAVE_XF1BPP
case 1:
if (xf86LoadSubModule(pScrn, "xf1bpp") == NULL) {
AlpFreeRec(pScrn);
@@ -1090,6 +1096,8 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
}
xf86LoaderReqSymbols("xf1bppScreenInit",NULL);
break;
+#endif
+#ifdef HAVE_XF4BPP
case 4:
if (xf86LoadSubModule(pScrn, "xf4bpp") == NULL) {
AlpFreeRec(pScrn);
@@ -1097,6 +1105,7 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
}
xf86LoaderReqSymbols("xf4bppScreenInit",NULL);
break;
+#endif
case 8:
case 16:
case 24:
@@ -1576,18 +1585,22 @@ AlpScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
*/
switch (pScrn->bitsPerPixel) {
+#ifdef HAVE_XF1BPP
case 1:
ret = xf1bppScreenInit(pScreen, FbBase,
width, height,
pScrn->xDpi, pScrn->yDpi,
displayWidth);
break;
+#endif
+#ifdef HAVE_XF4BPP
case 4:
ret = xf4bppScreenInit(pScreen, FbBase,
width, height,
pScrn->xDpi, pScrn->yDpi,
displayWidth);
break;
+#endif
case 8:
case 16:
case 24: