summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/s3v.h5
-rw-r--r--src/s3v_accel.c11
-rw-r--r--src/s3v_dga.c13
-rw-r--r--src/s3v_driver.c2
4 files changed, 25 insertions, 6 deletions
diff --git a/src/s3v.h b/src/s3v.h
index 0a5c7a9..5c8d6e6 100644
--- a/src/s3v.h
+++ b/src/s3v.h
@@ -60,8 +60,11 @@ in this Software without prior written authorization from the XFree86 Project.
#include "fb.h"
/* Drivers using the XAA interface ... */
+#ifdef HAVE_XAA_H
#include "xaa.h"
#include "xaalocal.h"
+#endif
+#include "xf86fbman.h"
#include "xf86cmap.h"
#include "xf86i2c.h"
@@ -275,8 +278,10 @@ typedef struct tagS3VRec {
/* Pointer used to save wrapped */
/* CloseScreen function. */
CloseScreenProcPtr CloseScreen;
+#ifdef HAVE_XAA_H
/* XAA info Rec */
XAAInfoRecPtr AccelInfoRec;
+#endif
/* PCI info vars. */
pciVideoPtr PciInfo;
#ifndef XSERVER_LIBPCIACCESS
diff --git a/src/s3v_accel.c b/src/s3v_accel.c
index 7837e4a..cf9a4e2 100644
--- a/src/s3v_accel.c
+++ b/src/s3v_accel.c
@@ -34,11 +34,11 @@ in this Software without prior written authorization from the XFree86 Project.
#include "miline.h"
/* fb includes are in s3v.h */
-#include "xaalocal.h"
#include "xaarop.h"
#include "servermd.h" /* LOG2_BYTES_PER_SCANLINE_PAD */
+#ifdef HAVE_XAA_H
static void S3VWriteMask(CARD32*, int);
static void S3VEngineReset(ScrnInfoPtr pScrn);
@@ -75,11 +75,12 @@ static void S3VPolylinesThinSolidWrapper(DrawablePtr, GCPtr, int, int,
static void S3VPolySegmentThinSolidWrapper(DrawablePtr, GCPtr, int, xSegment*);
#endif
static void S3VNopAllCmdSets(ScrnInfoPtr pScrn);
-
+#endif
Bool
S3VAccelInit(ScreenPtr pScreen)
{
+#ifdef HAVE_XAA_H
XAAInfoRecPtr infoPtr;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
S3VPtr ps3v = S3VPTR(pScrn);
@@ -232,9 +233,11 @@ S3VAccelInit(ScreenPtr pScreen)
infoPtr->maxOffPixHeight = 2048;
return (XAAInit(pScreen, infoPtr));
+#else
+ return FALSE;
+#endif
}
-
Bool
S3VAccelInit32(ScreenPtr pScreen)
{
@@ -537,6 +540,7 @@ S3VWriteMask(
return;
}
+#ifdef HAVE_XAA_H
/************************\
| Solid Filled Rects |
@@ -967,6 +971,7 @@ S3VSubsequentSolidHorVertLinePlaneMask(
S3VWriteMask((CARD32*)ps3v->MapBaseDense, dwords);
}
+#endif
void
S3VWaitFifoGX2(S3VPtr ps3v, int slots )
diff --git a/src/s3v_dga.c b/src/s3v_dga.c
index ecf8571..f7587b8 100644
--- a/src/s3v_dga.c
+++ b/src/s3v_dga.c
@@ -62,8 +62,6 @@ in this Software without prior written authorization from the XFree86 Project.
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Pci.h"
-#include "xaa.h"
-#include "xaalocal.h"
#include "s3v.h"
#include "dgaproc.h"
@@ -74,8 +72,10 @@ static Bool S3V_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
static Bool S3V_SetMode(ScrnInfoPtr, DGAModePtr);
static int S3V_GetViewport(ScrnInfoPtr);
static void S3V_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef HAVE_XAA_H
static void S3V_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void S3V_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
+#endif
/* dummy... */
@@ -87,8 +87,12 @@ DGAFunctionRec S3V_DGAFuncs = {
S3V_SetViewport,
S3V_GetViewport,
S3VAccelSync,
+#ifdef HAVE_XAA_H
S3V_FillRect,
S3V_BlitRect,
+#else
+ NULL, NULL,
+#endif
NULL
/* dummy... MGA_BlitTransRect */
};
@@ -135,8 +139,10 @@ SECOND_PASS:
currentMode->mode = pMode;
currentMode->flags = DGA_CONCURRENT_ACCESS | DGA_PIXMAP_AVAILABLE;
+#ifdef HAVE_XAA_H
if(!ps3v->NoAccel)
currentMode->flags |= DGA_FILL_RECT | DGA_BLIT_RECT;
+#endif
if(pMode->Flags & V_DBLSCAN)
currentMode->flags |= DGA_DOUBLESCAN;
if(pMode->Flags & V_INTERLACE)
@@ -280,6 +286,7 @@ S3V_SetViewport(
ps3v->DGAViewportStatus = 0; /* MGAAdjustFrame loops until finished */
}
+#ifdef HAVE_XAA_H
static void
S3V_FillRect (
ScrnInfoPtr pScrn,
@@ -315,7 +322,7 @@ S3V_BlitRect(
SET_SYNC_FLAG(ps3v->AccelInfoRec);
}
}
-
+#endif
static Bool
diff --git a/src/s3v_driver.c b/src/s3v_driver.c
index 7064b1e..05f82cc 100644
--- a/src/s3v_driver.c
+++ b/src/s3v_driver.c
@@ -3308,8 +3308,10 @@ S3VCloseScreen(int scrnIndex, ScreenPtr pScreen)
S3VUnmapMem(pScrn);
}
+#ifdef HAVE_XAA_H
if (ps3v->AccelInfoRec)
XAADestroyInfoRec(ps3v->AccelInfoRec);
+#endif
if (ps3v->DGAModes)
free(ps3v->DGAModes);