diff options
author | Dave Airlie <airlied@redhat.com> | 2008-01-08 15:48:00 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2008-01-08 15:49:07 +1000 |
commit | 8a33d2b5a820789309688855c81a4b11f8283500 (patch) | |
tree | 8512916ecc677efacf38ef2d42385190ebc6d48f | |
parent | 46e982ec0208bf7a32d47cd7cf7b1895e7bbfe1d (diff) |
test for 1/4 bpp in case server is configured with them off
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/alp_driver.c | 13 |
2 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 6f67117..c08e1e2 100644 --- a/configure.ac +++ b/configure.ac @@ -63,6 +63,8 @@ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS" AC_CHECK_DECL(XSERVER_LIBPCIACCESS, [XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no], [#include "xorg-server.h"]) +AC_CHECK_HEADER(xf1bpp.h,[AC_DEFINE(HAVE_XF1BPP, 1, [Have 1bpp support])],[]) +AC_CHECK_HEADER(xf4bpp.h,[AC_DEFINE(HAVE_XF4BPP, 1, [Have 4bpp support])],[]) CPPFLAGS="$SAVE_CPPFLAGS" if test "x$XSERVER_LIBPCIACCESS" = xyes; then 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: |