summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-07-16 18:23:39 +1000
committerDave Airlie <airlied@gmail.com>2012-07-16 18:23:39 +1000
commitc829ff70025e927bdec58e270e80c7097537a567 (patch)
tree94dddf036cd6c3e3563940a4366acb6b5a9ff8a9
parent659390ecdb36bb5e65b41a867257f3b9583e45de (diff)
i128: build against xaa-less server.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--configure.ac19
-rw-r--r--src/i128.h4
-rw-r--r--src/i128_driver.c3
-rw-r--r--src/i128accel.c15
-rw-r--r--src/i128dga.c11
5 files changed, 45 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac
index 76571d4..7abd698 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,6 +78,25 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+
+AC_ARG_ENABLE(xaa,
+ AS_HELP_STRING([--enable-xaa],
+ [Enable legacy X Acceleration Architecture (XAA) [default=auto]]),
+ [XAA="$enableval"],
+ [XAA=auto])
+if test "x$XAA" != xno; then
+ save_CFLAGS=$CFLAGS
+ save_CPPFLAGS=$CPPFLAGS
+ CFLAGS=$XORG_CFLAGS
+ CPPFLAGS="$XORG_CFLAGS"
+ AC_CHECK_HEADERS([xaa.h], XAA=yes, XAA=no)
+ CFLAGS=$save_CFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+fi
+AC_MSG_CHECKING([whether to include XAA support])
+AM_CONDITIONAL(XAA, test "x$XAA" = xyes)
+AC_MSG_RESULT([$XAA])
+
# Required by exa.h
AC_DEFINE(EXA_DRIVER_KNOWN_MAJOR, 3, [Major version of EXA we can handle])
diff --git a/src/i128.h b/src/i128.h
index 40f75d6..73739e5 100644
--- a/src/i128.h
+++ b/src/i128.h
@@ -14,7 +14,9 @@
#include "i128pcirename.h"
#include "compiler.h"
+#ifdef HAVE_XAA_H
#include "xaa.h"
+#endif
#include "exa.h"
#include "xf86Cursor.h"
#include "vgaHW.h"
@@ -115,7 +117,9 @@ typedef struct {
int minClock;
CloseScreenProcPtr CloseScreen;
+#ifdef HAVE_XAA_H
XAAInfoRecPtr XaaInfoRec;
+#endif
ExaDriverPtr ExaDriver;
xf86CursorInfoPtr CursorInfoRec;
I2CBusPtr I2C;
diff --git a/src/i128_driver.c b/src/i128_driver.c
index e416101..66fdee0 100644
--- a/src/i128_driver.c
+++ b/src/i128_driver.c
@@ -57,7 +57,6 @@
#include "xf86DDC.h"
#include "vbe.h"
-#include "xaa.h"
#include "xf86cmap.h"
#include "fb.h"
@@ -1704,8 +1703,10 @@ I128CloseScreen(CLOSE_SCREEN_ARGS_DECL)
I128Restore(pScrn);
I128UnmapMem(pScrn);
}
+#ifdef HAVE_XAA_H
if (pI128->XaaInfoRec)
XAADestroyInfoRec(pI128->XaaInfoRec);
+#endif
if (pI128->ExaDriver) {
exaDriverFini(pScreen);
free(pI128->ExaDriver);
diff --git a/src/i128accel.c b/src/i128accel.c
index ddeecb3..fd65c97 100644
--- a/src/i128accel.c
+++ b/src/i128accel.c
@@ -26,8 +26,7 @@
#include "config.h"
#endif
-#include "xaa.h"
-#include "xaalocal.h"
+
#include "xf86fbman.h"
#include "miline.h"
#include "servermd.h"
@@ -40,6 +39,9 @@
#include "i128.h"
#include "i128reg.h"
+#ifdef HAVE_XAA_H
+#include "xaalocal.h"
+
static void I128BitBlit(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2,
int w, int h);
static void I128SetupForScreenToScreenCopy(ScrnInfoPtr pScrn, int xdir,
@@ -62,6 +64,7 @@ static void I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox,
unsigned planemask);
#endif
+#endif
#define ENG_PIPELINE_READY() { while (pI128->mem.rbase_a[BUSY] & BUSY_BUSY) ; }
#define ENG_DONE() { while (pI128->mem.rbase_a[FLOW] & (FLOW_DEB | FLOW_MCB | FLOW_PRV)) ;}
@@ -100,7 +103,7 @@ I128EngineDone(ScrnInfoPtr pScrn)
ENG_DONE();
}
-
+#ifdef HAVE_XAA_H
static void
I128BitBlit(ScrnInfoPtr pScrn, int x1, int y1, int x2, int y2, int w, int h)
{
@@ -412,9 +415,12 @@ I128ScreenToScreenBitBlt(ScrnInfoPtr pScrn, int nbox, DDXPointPtr pptSrc,
}
#endif
+#endif
+
Bool
I128XaaInit(ScreenPtr pScreen)
{
+#ifdef HAVE_XAA_H
XAAInfoRecPtr infoPtr;
ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
I128Ptr pI128 = I128PTR(pScrn);
@@ -519,4 +525,7 @@ I128XaaInit(ScreenPtr pScreen)
}
return(XAAInit(pScreen, infoPtr));
+#else
+ return FALSE;
+#endif
}
diff --git a/src/i128dga.c b/src/i128dga.c
index 11a150f..d9453bf 100644
--- a/src/i128dga.c
+++ b/src/i128dga.c
@@ -7,8 +7,6 @@
#include "xf86_OSproc.h"
#include "xf86Pci.h"
#include "xf86PciInfo.h"
-#include "xaa.h"
-#include "xaalocal.h"
#include "i128.h"
#include "dgaproc.h"
@@ -18,12 +16,14 @@ static Bool I128_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
static Bool I128_SetMode(ScrnInfoPtr, DGAModePtr);
static int I128_GetViewport(ScrnInfoPtr);
static void I128_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef HAVE_XAA_H
static void I128_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void I128_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
#if 0
static void I128_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int,
unsigned long);
#endif
+#endif
static
DGAFunctionRec I128_DGAFuncs = {
@@ -33,6 +33,7 @@ DGAFunctionRec I128_DGAFuncs = {
I128_SetViewport,
I128_GetViewport,
I128EngineDone,
+#ifdef HAVE_XAA_H
I128_FillRect,
I128_BlitRect,
#if 0
@@ -40,6 +41,9 @@ DGAFunctionRec I128_DGAFuncs = {
#else
NULL
#endif
+#else
+ NULL, NULL, NULL
+#endif
};
@@ -194,6 +198,7 @@ I128_SetViewport(
pI128->DGAViewportStatus = 0; /* I128AdjustFrame loops until finished */
}
+#ifdef HAVE_XAA_H
static void
I128_FillRect (
ScrnInfoPtr pScrn,
@@ -253,7 +258,7 @@ I128_BlitTransRect(
}
}
#endif
-
+#endif
static Bool
I128_OpenFramebuffer(
ScrnInfoPtr pScrn,