summaryrefslogtreecommitdiff
path: root/src/cir_dga.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-07-13 14:47:40 +1000
committerDave Airlie <airlied@gmail.com>2012-07-13 14:47:40 +1000
commite443ede15981549ff5f6b01f42c3cb8dc909d778 (patch)
tree0d9bca6a6f8e4a0250c65b71a4724788ef71a630 /src/cir_dga.c
parent46a9e962c6f33509e89d664115a9a2db51c9b67d (diff)
cirrus: handle server with no XAA
this fixes cirrus to work with a server with no XAA module. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/cir_dga.c')
-rw-r--r--src/cir_dga.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/cir_dga.c b/src/cir_dga.c
index b841be3..bf3a9dd 100644
--- a/src/cir_dga.c
+++ b/src/cir_dga.c
@@ -30,8 +30,10 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Pci.h"
+#ifdef HAVE_XAA_H
#include "xaa.h"
#include "xaalocal.h"
+#endif
#include "vgaHW.h"
#include "cir.h"
#include "dgaproc.h"
@@ -39,15 +41,17 @@
static Bool Cir_OpenFramebuffer(ScrnInfoPtr, char **, unsigned char **,
int *, int *, int *);
static Bool Cir_SetMode(ScrnInfoPtr, DGAModePtr);
-static void Cir_Sync(ScrnInfoPtr);
static int Cir_GetViewport(ScrnInfoPtr);
static void Cir_SetViewport(ScrnInfoPtr, int, int, int);
+#ifdef HAVE_XAA_H
+static void Cir_Sync(ScrnInfoPtr);
static void Cir_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void Cir_BlitRect(ScrnInfoPtr, int, int, int, int, int, int);
/*
static void Cir_BlitTransRect(ScrnInfoPtr, int, int, int, int, int, int,
unsigned long);
*/
+#endif
static
DGAFunctionRec CirDGAFuncs = {
@@ -56,9 +60,13 @@ DGAFunctionRec CirDGAFuncs = {
Cir_SetMode,
Cir_SetViewport,
Cir_GetViewport,
+#ifdef HAVE_XAA_H
Cir_Sync,
Cir_FillRect,
Cir_BlitRect,
+#else
+ NULL, NULL, NULL,
+#endif
NULL /* Cir_BlitTransRect */
};
@@ -207,14 +215,12 @@ Cir_GetViewport(
return pCir->DGAViewportStatus;
}
-
-
+#ifdef HAVE_XAA_H
static void
Cir_Sync(
ScrnInfoPtr pScrn
){
CirPtr pCir = CIRPTR(pScrn);
-
if(pCir->AccelInfoRec) {
(*pCir->AccelInfoRec->Sync)(pScrn);
}
@@ -255,3 +261,4 @@ Cir_BlitRect(
SET_SYNC_FLAG(pCir->AccelInfoRec);
}
}
+#endif