diff options
author | Dave Airlie <airlied@gmail.com> | 2012-07-16 19:20:38 +1000 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-07-16 19:20:38 +1000 |
commit | 6562444ed998b2c33be690dd9b1d729b3a4ecedd (patch) | |
tree | 5d121b4e09ed9d306ece95282e2c9c8eae381f58 | |
parent | f526b428847bf03abcc74a2e4b0ea08d3f1e167c (diff) |
xgixp: fix build against XAA-less server.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | src/xg47_accel.c | 11 | ||||
-rw-r--r-- | src/xg47_video.c | 4 | ||||
-rw-r--r-- | src/xgi.h | 6 | ||||
-rw-r--r-- | src/xgi_dga.c | 12 | ||||
-rw-r--r-- | src/xgi_driver.c | 5 | ||||
-rw-r--r-- | src/xgi_hwmc.c | 2 |
7 files changed, 50 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index 35817fa..12fee96 100644 --- a/configure.ac +++ b/configure.ac @@ -88,6 +88,24 @@ 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]) + AC_SUBST([moduledir]) DRIVER_NAME=xgixp diff --git a/src/xg47_accel.c b/src/xg47_accel.c index 0dcb490..09268ac 100644 --- a/src/xg47_accel.c +++ b/src/xg47_accel.c @@ -38,8 +38,9 @@ #include "miline.h" #include "xaarop.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" - +#endif #include "xgi.h" #include "xgi_regs.h" #include "xg47_regs.h" @@ -219,6 +220,7 @@ static void XGIRestoreAccelState(ScrnInfoPtr pScrn); Bool XG47AccelInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr pXaaInfo; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); @@ -336,9 +338,12 @@ Bool XG47AccelInit(ScreenPtr pScreen) XGIDebug(DBG_FUNCTION, "[DBG] Jong 06142006-Before XAAInit()\n"); return(XAAInit(pScreen, pXaaInfo)); +#else + return FALSE; +#endif } - +#ifdef HAVE_XAA_H /* Function: 1. Wait for GE @@ -935,6 +940,8 @@ static Bool XG47InitCmdList(ScrnInfoPtr pScrn) return (pXGI->cmdList != NULL); } +#endif + void XG47AccelExit(ScreenPtr pScreen) { ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); diff --git a/src/xg47_video.c b/src/xg47_video.c index 2beb388..ddc3f7e 100644 --- a/src/xg47_video.c +++ b/src/xg47_video.c @@ -499,7 +499,9 @@ static int XG47SetPortAttribute(ScrnInfoPtr pScrn, XGIPortPtr pXGIPort = (XGIPortPtr)pData; XGIPtr pXGI = XGIPTR(pScrn); +#ifdef HAVE_XAA_H if (!pXGI->noAccel) pXGI->pXaaInfo->Sync(pScrn); +#endif if(attribute == xvColorKey) { @@ -563,7 +565,9 @@ static int XG47GetPortAttribute(ScrnInfoPtr pScrn, XGIPortPtr pXGIPort = (XGIPortPtr)pData; XGIPtr pXGI = XGIPTR(pScrn); +#ifdef HAVE_XAA_H if (!pXGI->noAccel) pXGI->pXaaInfo->Sync(pScrn); +#endif if(attribute == xvColorKey) { @@ -42,7 +42,10 @@ #else #include "xf86Pci.h" /* PCI config space */ #endif +#ifdef HAVE_XAA_H #include "xaa.h" /* XAA and Cursor Support */ +#endif +#include "xf86fbman.h" #include "xf86Cursor.h" #include "xf86DDC.h" /* DDC support */ #include "xf86xv.h" /* Xv support */ @@ -562,8 +565,9 @@ typedef struct { vbeInfoPtr pVbe; XGIHeadID headID; +#ifdef HAVE_XAA_H XAAInfoRecPtr pXaaInfo; - +#endif struct xg47_CmdList *cmdList; #ifdef XvExtension diff --git a/src/xgi_dga.c b/src/xgi_dga.c index 96ce4a9..f8b7f2f 100644 --- a/src/xgi_dga.c +++ b/src/xgi_dga.c @@ -29,18 +29,22 @@ #include "config.h" #endif +#ifdef HAVE_XAA_H #include "xaalocal.h" -#include "dgaproc.h" +#endif #include "xgi.h" #include "xgi_regs.h" #include "xgi_driver.h" +#include "dgaproc.h" + static Bool XGIDGAOpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, int *, int *, int *); static Bool XGIDGASetMode(ScrnInfoPtr, DGAModePtr); static void XGIDGASetViewport(ScrnInfoPtr, int, int, int); static int XGIDGAGetViewport(ScrnInfoPtr); +#ifdef HAVE_XAA_H static void XGIDGASync(ScrnInfoPtr); static void XGIDGAFillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void XGIDGABlitRect(ScrnInfoPtr, int, int, int, int, int, int); @@ -48,6 +52,7 @@ static void XGIDGABlitRect(ScrnInfoPtr, int, int, int, int, int, int); static void XGIDGABlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); #endif +#endif static DGAFunctionRec XGIDGAFuncs = { XGIDGAOpenFramebuffer, @@ -55,9 +60,11 @@ static DGAFunctionRec XGIDGAFuncs = { XGIDGASetMode, XGIDGASetViewport, XGIDGAGetViewport, +#ifdef HAVE_XAA_H XGIDGASync, XGIDGAFillRect, XGIDGABlitRect, +#endif }; Bool XGIDGAInit(ScreenPtr pScreen) @@ -207,6 +214,7 @@ static void XGIDGASetViewport(ScrnInfoPtr pScrn, pXGI->dgaViewportStatus = 0; /* TRIDENTAdjustFrame loops until finished */ } +#ifdef HAVE_XAA_H static void XGIDGAFillRect(ScrnInfoPtr pScrn, int x, int y, int w, int h, @@ -262,7 +270,7 @@ XGIDGABlitTransRect(ScrnInfoPtr pScrn, { } #endif - +#endif static Bool XGIDGAOpenFramebuffer(ScrnInfoPtr pScrn, char **name, diff --git a/src/xgi_driver.c b/src/xgi_driver.c index dc94a55..580a03a 100644 --- a/src/xgi_driver.c +++ b/src/xgi_driver.c @@ -198,7 +198,7 @@ static const char *fbSymbols[] = { static const char *xaaSymbols[] = { "XAACreateInfoRec", - "XAADestroyInfoRec", + "XAAestroyInfoRec", "XAAFillSolidRects", "XAAGetCopyROP", "XAAGetPatternROP", @@ -2392,12 +2392,15 @@ static Bool XGICloseScreen(CLOSE_SCREEN_ARGS_DECL) /* Do only one time; otherwise will cause system hang */ if ((g_DualViewMode == 0 ) || (pScreen->myNum == 1)) { +#ifdef HAVE_XAA_H if (pXGI->pXaaInfo) { XG47AccelExit(pScreen); XAADestroyInfoRec(pXGI->pXaaInfo); pXGI->pXaaInfo = NULL; } +#endif + } /* Restore the saved video state and unmap the memory regions. */ diff --git a/src/xgi_hwmc.c b/src/xgi_hwmc.c index 104c0f6..942a31b 100644 --- a/src/xgi_hwmc.c +++ b/src/xgi_hwmc.c @@ -41,8 +41,6 @@ #include "xf86xvmc.h" #include <X11/extensions/Xv.h> #include <X11/extensions/XvMC.h> -#include "xaa.h" -#include "xaalocal.h" #include "dixstruct.h" #include "fourcc.h" |