diff options
-rw-r--r-- | configure.ac | 18 | ||||
-rw-r--r-- | src/savage_dga.c | 15 | ||||
-rw-r--r-- | src/savage_dri.c | 6 | ||||
-rw-r--r-- | src/savage_driver.c | 2 | ||||
-rw-r--r-- | src/savage_driver.h | 5 | ||||
-rw-r--r-- | src/savage_hwmc.c | 3 | ||||
-rw-r--r-- | src/savage_xaa.c | 15 |
7 files changed, 56 insertions, 8 deletions
diff --git a/configure.ac b/configure.ac index ca60e76..5e4fbe2 100644 --- a/configure.ac +++ b/configure.ac @@ -103,6 +103,24 @@ if test "$DRI" = yes; then AC_DEFINE(SAVAGEDRI_DEVEL,1,[Enable developmental DRI driver support]) fi +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]) + save_CFLAGS="$CFLAGS" CFLAGS="$XORG_CFLAGS" AC_CHECK_DECL(XSERVER_LIBPCIACCESS, diff --git a/src/savage_dga.c b/src/savage_dga.c index cb541d3..413e0e7 100644 --- a/src/savage_dga.c +++ b/src/savage_dga.c @@ -34,8 +34,9 @@ in this Software without prior written authorization from the XFree86 Project. * */ - +#ifdef HAVE_XAA_H #include "xaalocal.h" +#endif #include "savage_driver.h" #include "dgaproc.h" @@ -46,9 +47,10 @@ static Bool Savage_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, static Bool Savage_SetMode(ScrnInfoPtr, DGAModePtr); static int Savage_GetViewport(ScrnInfoPtr); static void Savage_SetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H static void Savage_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void Savage_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); - +#endif static DGAFunctionRec Savage_DGAFuncs = { @@ -58,8 +60,12 @@ DGAFunctionRec Savage_DGAFuncs = { Savage_SetViewport, Savage_GetViewport, SavageAccelSync, +#ifdef HAVE_XAA_H Savage_FillRect, Savage_BlitRect, +#else + NULL, NULL, +#endif NULL /* BlitTransRect */ }; @@ -127,8 +133,10 @@ SECOND_PASS: mode->mode = pMode; mode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE; +#ifdef HAVE_XAA_H if(!psav->NoAccel) mode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT; +#endif if(pMode->Flags & V_DBLSCAN) mode->flags |= DGA_DOUBLESCAN; if(pMode->Flags & V_INTERLACE) @@ -341,6 +349,7 @@ Savage_SetViewport( psav->DGAViewportStatus = 0; /* MGAAdjustFrame loops until finished */ } +#ifdef HAVE_XAA_H static void Savage_FillRect ( ScrnInfoPtr pScrn, @@ -376,7 +385,7 @@ Savage_BlitRect( SET_SYNC_FLAG(psav->AccelInfoRec); } } - +#endif static Bool Savage_OpenFramebuffer( diff --git a/src/savage_dri.c b/src/savage_dri.c index 7b5d2b1..bdb78e4 100644 --- a/src/savage_dri.c +++ b/src/savage_dri.c @@ -31,8 +31,10 @@ #include "xf86.h" #include "xf86_OSproc.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" #include "xaarop.h" +#endif #include "xf86Pci.h" #include "xf86fbman.h" @@ -287,8 +289,10 @@ static void SAVAGEWakeupHandler(WAKEUPHANDLER_ARGS_DECL) } if (psav->useEXA) exaMarkSync(pScreen); +#ifdef HAVE_XAA_H else psav->AccelInfoRec->NeedToSync = TRUE; +#endif /* FK: this flag doesn't seem to be used. */ } @@ -1535,8 +1539,10 @@ SAVAGEDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg, BCI_SEND(0xc0020000); /* wait for 2D idle */ if (psav->useEXA) exaMarkSync(pScreen); +#ifdef HAVE_XAA_H else psav->AccelInfoRec->NeedToSync = TRUE; +#endif } /* Definition in savage_accel.c */ diff --git a/src/savage_driver.c b/src/savage_driver.c index 1083d65..026bf5c 100644 --- a/src/savage_driver.c +++ b/src/savage_driver.c @@ -3987,10 +3987,12 @@ static Bool SavageCloseScreen(CLOSE_SCREEN_ARGS_DECL) psav->EXADriverPtr = NULL; } +#ifdef HAVE_XAA_H if( psav->AccelInfoRec ) { XAADestroyInfoRec( psav->AccelInfoRec ); psav->AccelInfoRec = NULL; } +#endif if( psav->DGAModes ) { free( psav->DGAModes ); diff --git a/src/savage_driver.h b/src/savage_driver.h index d51b2a1..b604292 100644 --- a/src/savage_driver.h +++ b/src/savage_driver.h @@ -63,7 +63,10 @@ #include "fboverlay.h" #include "xf86cmap.h" #include "vbe.h" +#ifdef HAVE_XAA_H #include "xaa.h" +#endif +#include "xf86fbman.h" #include "exa.h" #include "xf86xv.h" @@ -421,7 +424,9 @@ typedef struct _Savage { unsigned long sbd_high; /* Support for XAA acceleration */ +#ifdef HAVE_XAA_H XAAInfoRecPtr AccelInfoRec; +#endif xRectangle Rect; unsigned int SavedBciCmd; unsigned int SavedFgColor; diff --git a/src/savage_hwmc.c b/src/savage_hwmc.c index 2dea4df..d1e5553 100644 --- a/src/savage_hwmc.c +++ b/src/savage_hwmc.c @@ -40,8 +40,9 @@ #include "xf86xvmc.h" #include <X11/extensions/Xv.h> #include <X11/extensions/XvMC.h> -#include "xaa.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" +#endif #include "dixstruct.h" #include "fourcc.h" diff --git a/src/savage_xaa.c b/src/savage_xaa.c index e4d661b..858cb97 100644 --- a/src/savage_xaa.c +++ b/src/savage_xaa.c @@ -14,10 +14,13 @@ #endif #include <X11/Xarch.h> +#include "savage_driver.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" #include "xaarop.h" + #include "miline.h" -#include "savage_driver.h" + #include "savage_bci.h" extern int gSavageEntityIndex; @@ -146,11 +149,12 @@ void SavageRestoreAccelState(ScrnInfoPtr pScrn) return; } - +#endif Bool SavageXAAInit(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); SavagePtr psav = SAVPTR(pScrn); XAAInfoRecPtr xaaptr; @@ -344,7 +348,9 @@ SavageXAAInit(ScreenPtr pScreen) return XAAInit(pScreen, xaaptr); - +#else + return FALSE; +#endif } /* The sync function for the GE */ @@ -355,7 +361,7 @@ SavageAccelSync(ScrnInfoPtr pScrn) psav->WaitIdleEmpty(psav); } - +#ifdef HAVE_XAA_H /* * The XAA ROP helper routines all assume that a solid color is a * "pattern". The Savage chips, however, apply a non-stippled solid @@ -1020,3 +1026,4 @@ void SavageSubsequentImageWriteRect BCI_SEND(BCI_W_H(w, h)); } +#endif |