summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2008-03-11 10:48:19 +1000
committerDave Airlie <airlied@redhat.com>2008-03-11 10:48:19 +1000
commit5e0510dd0144c8ee85b2bd8bde58ae212f0d8453 (patch)
treee12ead7fbbc0d8e29ad44a624d6c947b0451bec3 /src
parentd1e29902483a82e86b07cd30d41d411e71b776ea (diff)
xf1/4 bpp conversion
Diffstat (limited to 'src')
-rw-r--r--src/apm.h4
-rw-r--r--src/apm_driver.c12
2 files changed, 16 insertions, 0 deletions
diff --git a/src/apm.h b/src/apm.h
index f938257..1f616eb 100644
--- a/src/apm.h
+++ b/src/apm.h
@@ -31,8 +31,12 @@
#include "micmap.h"
/* Needed for the 1 and 4 bpp framebuffers */
+#ifdef HAVE_XF1BPP
#include "xf1bpp.h"
+#endif
+#ifdef HAVE_XF4BPP
#include "xf4bpp.h"
+#endif
#include "fb.h"
diff --git a/src/apm_driver.c b/src/apm_driver.c
index 831a463..b5b5874 100644
--- a/src/apm_driver.c
+++ b/src/apm_driver.c
@@ -206,8 +206,12 @@ static const char *shadowSymbols[] = {
#ifdef XFree86LOADER
static const char *miscfbSymbols[] = {
+#ifdef HAVE_XF1BPP
"xf1bppScreenInit",
+#endif
+#ifdef HAVE_XF4BPP
"xf4bppScreenInit",
+#endif
NULL
};
#endif
@@ -1155,14 +1159,18 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
/* Load bpp-specific modules */
switch (pScrn->bitsPerPixel) {
+#ifdef HAVE_XF1BPP
case 1:
mod = "xf1bpp";
req = "xf1bppScreenInit";
break;
+#endif
+#ifndef HAVE_XF4BPP
case 4:
mod = "xf4bpp";
req = "xf4bppScreenInit";
break;
+#endif
case 8:
case 16:
case 24:
@@ -1987,18 +1995,22 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
miSetPixmapDepths();
switch (pScrn->bitsPerPixel) {
+#ifndef HAVE_XF1BPP
case 1:
ret = xf1bppScreenInit(pScreen, FbBase,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth);
break;
+#endif
+#ifdef HAVE_XF4BPP
case 4:
ret = xf4bppScreenInit(pScreen, FbBase,
pScrn->virtualX, pScrn->virtualY,
pScrn->xDpi, pScrn->yDpi,
pScrn->displayWidth);
break;
+#endif
case 8:
case 16:
case 24: