diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/geode.h | 14 | ||||
-rw-r--r-- | src/gx_accel.c | 9 | ||||
-rw-r--r-- | src/gx_driver.c | 4 | ||||
-rw-r--r-- | src/gx_rotate.c | 3 | ||||
-rw-r--r-- | src/gx_video.c | 2 |
5 files changed, 29 insertions, 3 deletions
diff --git a/src/geode.h b/src/geode.h index 4a86b38..0165c81 100644 --- a/src/geode.h +++ b/src/geode.h @@ -30,7 +30,9 @@ #include "geode_pcirename.h" #include "config.h" +#ifdef HAVE_XAA_H #include "xaa.h" +#endif #include "exa.h" #include "xf86Cursor.h" @@ -51,6 +53,12 @@ #undef XF86EXA #endif +#ifdef HAVE_XAA_H +#define XF86XAA 1 +#else +#undef XF86XAA +#endif + #define CFB 0 #define INT10_SUPPORT 1 @@ -71,7 +79,7 @@ #define GFX_CPU_GEODELX 4 -#ifdef HAVE_GX +#if defined(HAVE_GX) && XF86XAA #define GX_FILL_RECT_SUPPORT 1 #define GX_BRES_LINE_SUPPORT 1 #define GX_DASH_LINE_SUPPORT 0 /* does not do dashed lines */ @@ -84,10 +92,10 @@ #define GX_USE_OFFSCRN_MEM 0 #define GX_ONE_LINE_AT_A_TIME 1 #define GX_WRITE_PIXMAP_SUPPORT 1 +#endif #define GFX(func) gfx_##func #define GFX2(func) gfx2_##func -#endif #define GEODEPTR(p) ((GeodeRec *)((p)->driverPrivate)) @@ -299,7 +307,9 @@ typedef struct _geodeRec { int NoOfImgBuffers; unsigned char **AccelColorExpandBuffers; int NoOfColorExpandLines; +#if XF86XAA XAAInfoRecPtr AccelInfoRec; +#endif /* Save state */ unsigned long FBCompressionOffset; diff --git a/src/gx_accel.c b/src/gx_accel.c index 58aa833..c368649 100644 --- a/src/gx_accel.c +++ b/src/gx_accel.c @@ -39,7 +39,9 @@ #include "vgaHW.h" #include "xf86.h" +#ifdef HAVE_XAA_H #include "xaalocal.h" +#endif #include "xf86fbman.h" #include "miline.h" #include "xaarop.h" @@ -128,7 +130,9 @@ static GDashLine gdln; static unsigned int gu2_xshift, gu2_yshift; static unsigned int gu2_pitch; +#if XF86XAA static XAAInfoRecPtr localRecPtr; +#endif /* pat 0xF0 */ /* src 0xCC */ @@ -1964,6 +1968,8 @@ GXAccelInit(ScreenPtr pScrn) } #endif +#if XF86XAA + /* Getting the pointer for acceleration Inforecord */ pGeode->AccelInfoRec = localRecPtr = XAACreateInfoRec(); if (!pGeode->AccelInfoRec) @@ -2076,6 +2082,9 @@ GXAccelInit(ScreenPtr pScrn) #endif return (XAAInit(pScrn, localRecPtr)); +#else /* XF86XAA */ + return FALSE; +#endif } /* END OF FILE */ diff --git a/src/gx_driver.c b/src/gx_driver.c index f6ac4c6..96b3dc3 100644 --- a/src/gx_driver.c +++ b/src/gx_driver.c @@ -258,6 +258,7 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) if (!pGeode->useEXA) { +#if XF86XAA if (!xf86FBManagerRunning(pScrn)) { unsigned int offset = fboffset; @@ -296,6 +297,7 @@ GXAllocateMemory(ScreenPtr pScrn, ScrnInfoPtr pScrni, int rotate) else xf86DrvMsg(pScrni->scrnIndex, X_INFO, "XAA offscreen memory has already been allocated.\n"); +#endif } } return ret; @@ -972,8 +974,10 @@ GXCloseScreen(int scrnIndex, ScreenPtr pScrn) if (pScrni->vtSema) GXLeaveGraphics(pScrni); +#ifdef XF86XAA if (pGeode->AccelInfoRec) XAADestroyInfoRec(pGeode->AccelInfoRec); +#endif if (pGeode->AccelImageWriteBuffers) { free(pGeode->AccelImageWriteBuffers[0]); diff --git a/src/gx_rotate.c b/src/gx_rotate.c index 9eb39e7..2a86b30 100644 --- a/src/gx_rotate.c +++ b/src/gx_rotate.c @@ -158,7 +158,7 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) pScrni->fbOffset)); /* Don't use XAA pixmap cache or offscreen pixmaps when rotated */ - +#if XF86XAA if (pGeode->AccelInfoRec) { if (pGeode->rotation == RR_Rotate_0) { pGeode->AccelInfoRec->Flags = @@ -174,6 +174,7 @@ GXRotate(ScrnInfoPtr pScrni, DisplayModePtr mode) pGeode->AccelInfoRec->maxOffPixHeight = 1; } } +#endif return TRUE; diff --git a/src/gx_video.c b/src/gx_video.c index fef7764..b687b11 100644 --- a/src/gx_video.c +++ b/src/gx_video.c @@ -54,8 +54,10 @@ #include "geode.h" #include "xf86xv.h" #include <X11/extensions/Xv.h> +#ifdef HAVE_XAA_H #include "xaa.h" #include "xaalocal.h" +#endif #include "dixstruct.h" #include "fourcc.h" #include "geode_fourcc.h" |