diff options
author | Dave Airlie <airlied@redhat.com> | 2012-07-16 04:39:40 +0100 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2012-07-16 04:39:40 +0100 |
commit | b3a693335779ac80d98734b0f4e5e229f878079f (patch) | |
tree | 8a1bb2190a4788f7ad5dc5993f49ede76b544284 | |
parent | a912214b4739f9c85919178a060ac37563490179 (diff) |
chips: build without XAA support at all.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r-- | configure.ac | 17 | ||||
-rw-r--r-- | src/ct_accel.c | 15 | ||||
-rw-r--r-- | src/ct_dga.c | 21 | ||||
-rw-r--r-- | src/ct_driver.c | 3 | ||||
-rw-r--r-- | src/ct_driver.h | 6 | ||||
-rw-r--r-- | src/ct_video.c | 2 |
6 files changed, 57 insertions, 7 deletions
diff --git a/configure.ac b/configure.ac index c0ed508..2a8207a 100644 --- a/configure.ac +++ b/configure.ac @@ -77,6 +77,23 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS" 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]) save_CFLAGS="$CFLAGS" CFLAGS="$XORG_CFLAGS" diff --git a/src/ct_accel.c b/src/ct_accel.c index e349baf..a829ee3 100644 --- a/src/ct_accel.c +++ b/src/ct_accel.c @@ -71,6 +71,8 @@ #define CTNAME(subname) CATNAME(CHIPS,subname) #endif +#ifdef HAVE_XAA_H + #ifdef DEBUG # define DEBUG_P(x) ErrorF(x"\n"); #elif defined X_DEBUG @@ -166,10 +168,11 @@ static void CTNAME(ReadPixmap)(ScrnInfoPtr pScrn, int x, int y, int w, int h, # define BE_SWAPON(pScrn,cPtr) # define BE_SWAPOFF(pScrn,cPtr) #endif - +#endif Bool CTNAME(AccelInit)(ScreenPtr pScreen) { +#ifdef HAVE_XAA_H XAAInfoRecPtr infoPtr; ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen); CHIPSPtr cPtr = CHIPSPTR(pScrn); @@ -426,8 +429,12 @@ chips_imagewrite: #endif return(XAAInit(pScreen, infoPtr)); +#else + return FALSE; +#endif } +#ifdef HAVE_XAA_H #ifdef CHIPS_HIQV void CTNAME(DepthChange)(ScrnInfoPtr pScrn, int depth) @@ -459,15 +466,19 @@ CTNAME(DepthChange)(ScrnInfoPtr pScrn, int depth) } #endif +#endif void CTNAME(Sync)(ScrnInfoPtr pScrn) { +#ifdef HAVE_XAA_H CHIPSPtr cPtr = CHIPSPTR(pScrn); DEBUG_P("sync"); ctBLTWAIT; BE_SWAPON(pScrn,cPtr); +#endif } +#ifdef HAVE_XAA_H static void CTNAME(8SetupForSolidFill)(ScrnInfoPtr pScrn, int color, int rop, unsigned int planemask) @@ -1735,3 +1746,5 @@ CTNAME(ReadPixmap)(ScrnInfoPtr pScrn, int x, int y, int w, int h, #endif /* ReadPixmap */ #endif + +#endif diff --git a/src/ct_dga.c b/src/ct_dga.c index b2f8ded..1e1d7b8 100644 --- a/src/ct_dga.c +++ b/src/ct_dga.c @@ -6,8 +6,6 @@ #include "xf86.h" #include "xf86_OSproc.h" #include "xf86Pci.h" -#include "xaa.h" -#include "xaalocal.h" #include "ct_driver.h" #include "dgaproc.h" @@ -17,12 +15,14 @@ static Bool CHIPS_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **, static Bool CHIPS_SetMode(ScrnInfoPtr, DGAModePtr); static int CHIPS_GetViewport(ScrnInfoPtr); static void CHIPS_SetViewport(ScrnInfoPtr, int, int, int); +#ifdef HAVE_XAA_H static void CHIPS_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long); static void CHIPS_BlitRect(ScrnInfoPtr, int, int, int, int, int, int); #if 0 static void CHIPS_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int, unsigned long); #endif +#endif static DGAFunctionRec CHIPS_DGAFuncs = { @@ -31,6 +31,7 @@ DGAFunctionRec CHIPS_DGAFuncs = { CHIPS_SetMode, CHIPS_SetViewport, CHIPS_GetViewport, +#ifdef HAVE_XAA_H CHIPSSync, CHIPS_FillRect, CHIPS_BlitRect, @@ -39,6 +40,9 @@ DGAFunctionRec CHIPS_DGAFuncs = { #else NULL #endif +#else + NULL, NULL, NULL, NULL +#endif }; static @@ -48,6 +52,7 @@ DGAFunctionRec CHIPS_MMIODGAFuncs = { CHIPS_SetMode, CHIPS_SetViewport, CHIPS_GetViewport, +#ifdef HAVE_XAA_H CHIPSMMIOSync, CHIPS_FillRect, CHIPS_BlitRect, @@ -56,6 +61,9 @@ DGAFunctionRec CHIPS_MMIODGAFuncs = { #else NULL #endif +#else + NULL, NULL, NULL, NULL +#endif }; static @@ -65,6 +73,7 @@ DGAFunctionRec CHIPS_HiQVDGAFuncs = { CHIPS_SetMode, CHIPS_SetViewport, CHIPS_GetViewport, +#ifdef HAVE_XAA_H CHIPSHiQVSync, CHIPS_FillRect, CHIPS_BlitRect, @@ -73,6 +82,9 @@ DGAFunctionRec CHIPS_HiQVDGAFuncs = { #else NULL #endif +#else + NULL, NULL, NULL, NULL +#endif }; @@ -114,9 +126,11 @@ SECOND_PASS: currentMode->mode = pMode; currentMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE; +#ifdef HAVE_XAA_H if(cPtr->Flags & ChipsAccelSupport) currentMode->flags |= (cPtr->Flags & ChipsAccelSupport) ? (DGA_FILL_RECT | DGA_BLIT_RECT) : 0; +#endif if(pMode->Flags & V_DBLSCAN) currentMode->flags |= DGA_DOUBLESCAN; if(pMode->Flags & V_INTERLACE) @@ -246,6 +260,7 @@ CHIPS_SetViewport( cPtr->DGAViewportStatus = 0; /* CHIPSAdjustFrame loops until finished */ } +#ifdef HAVE_XAA_H static void CHIPS_FillRect ( ScrnInfoPtr pScrn, @@ -295,7 +310,7 @@ CHIPS_BlitTransRect( prohibit usage of ~0 as the key */ } #endif - +#endif static Bool CHIPS_OpenFramebuffer( ScrnInfoPtr pScrn, diff --git a/src/ct_driver.c b/src/ct_driver.c index 01cff63..6f3a5d4 100644 --- a/src/ct_driver.c +++ b/src/ct_driver.c @@ -130,6 +130,7 @@ #include "dixstruct.h" +#include "xf86fbman.h" /* Driver specific headers */ #include "ct_driver.h" @@ -4515,8 +4516,10 @@ CHIPSCloseScreen(CLOSE_SCREEN_ARGS_DECL) cPtrEnt = pPriv->ptr; cPtrEnt->refCount--; } +#ifdef HAVE_XAA_H if (cPtr->AccelInfoRec) XAADestroyInfoRec(cPtr->AccelInfoRec); +#endif if (cPtr->CursorInfoRec) xf86DestroyCursorInfoRec(cPtr->CursorInfoRec); free(cPtr->ShadowPtr); diff --git a/src/ct_driver.h b/src/ct_driver.h index cbb7da3..d90a67f 100644 --- a/src/ct_driver.h +++ b/src/ct_driver.h @@ -27,9 +27,11 @@ #define _CT_DRIVER_H_ #include "ct_pcirename.h" +#ifdef HAVE_XAA_H #include "xaa.h" -#include "vbe.h" #include "xaalocal.h" /* XAA internals as we replace some of XAA */ +#endif +#include "vbe.h" #include "xf86Cursor.h" #include "xf86i2c.h" #include "xf86DDC.h" @@ -324,7 +326,9 @@ typedef struct _CHIPSRec { unsigned int * Regs32; unsigned int Flags; CARD32 Bus; +#ifdef HAVE_XAA_H XAAInfoRecPtr AccelInfoRec; +#endif xf86CursorInfoPtr CursorInfoRec; CHIPSACLRec Accel; unsigned int HWCursorContents; diff --git a/src/ct_video.c b/src/ct_video.c index 248d2cf..35dad9f 100644 --- a/src/ct_video.c +++ b/src/ct_video.c @@ -12,8 +12,6 @@ #include "ct_driver.h" #include <X11/extensions/Xv.h> -#include "xaa.h" -#include "xaalocal.h" #include "dixstruct.h" #include "fourcc.h" |