summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-07-16 19:12:32 +1000
committerDave Airlie <airlied@gmail.com>2012-07-16 19:12:32 +1000
commit079960018061e5ae261ee7f627c6afb859177ef4 (patch)
tree4413dcac374a2ed5fcfdb1094db8d3139ab2d2f1
parent5954960d4bbaee9ee4d2d3a4d1ca9a93d02f6697 (diff)
sunffb: fix XAA-less build.
Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--configure.ac18
-rw-r--r--src/ffb.h4
-rw-r--r--src/ffb_accel.c8
-rw-r--r--src/ffb_dga.c8
4 files changed, 37 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 0fbe15f..2a3b86a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,24 @@ AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
# Checks for libraries.
+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])
+
AM_CONDITIONAL(SPARC, test x$SPARC = xyes)
AC_SUBST([moduledir])
diff --git a/src/ffb.h b/src/ffb.h
index 14edcbe..67a2d87 100644
--- a/src/ffb.h
+++ b/src/ffb.h
@@ -31,7 +31,9 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86RamDac.h"
+#ifdef HAVE_XAA_H
#include "xaa.h"
+#endif
#include <X11/Xmd.h>
#include "gcstruct.h"
#include "windowstr.h"
@@ -174,7 +176,9 @@ typedef struct {
unsigned char has_double_buffer;
/* XAA related info */
+#ifdef HAVE_XAA_H
XAAInfoRecPtr pXAAInfo;
+#endif
unsigned int xaa_fbc;
unsigned int xaa_wid;
unsigned int xaa_planemask;
diff --git a/src/ffb_accel.c b/src/ffb_accel.c
index 7dc1228..86cac94 100644
--- a/src/ffb_accel.c
+++ b/src/ffb_accel.c
@@ -35,7 +35,6 @@
#include "mistruct.h"
#include "miline.h"
#include "fb.h"
-#include "xaa.h"
#include "ffb.h"
#include "ffb_fifo.h"
@@ -43,6 +42,7 @@
#include "ffb_loops.h"
#include "ffb_regs.h"
+#ifdef HAVE_XAA_H
/* VISmoveImage.s */
extern void VISmoveImageRL(unsigned char *src, unsigned char *dst, long w, long h, long skind, long dkind);
extern void VISmoveImageLR(unsigned char *src, unsigned char *dst, long w, long h, long skind, long dkind);
@@ -841,8 +841,11 @@ static void CreatorAlignTabInit(FFBPtr pFfb)
}
}
+#endif
+
Bool FFBAccelInit(ScreenPtr pScreen, FFBPtr pFfb)
{
+#ifdef HAVE_XAA_H
XAAInfoRecPtr infoRec;
ffb_fbcPtr ffb = pFfb->regs;
@@ -1097,4 +1100,7 @@ Bool FFBAccelInit(ScreenPtr pScreen, FFBPtr pFfb)
/* Success */
return TRUE;
+#else
+ return FALSE;
+#endif
}
diff --git a/src/ffb_dga.c b/src/ffb_dga.c
index 84598db..d6f5437 100644
--- a/src/ffb_dga.c
+++ b/src/ffb_dga.c
@@ -43,9 +43,11 @@ static Bool FFB_SetMode(ScrnInfoPtr, DGAModePtr);
static void FFB_SetViewport(ScrnInfoPtr, int, int, int);
static int FFB_GetViewport(ScrnInfoPtr);
static void FFB_Flush(ScrnInfoPtr);
+#ifdef HAVE_XAA_H
static void FFB_FillRect(ScrnInfoPtr, int, int, int, int, unsigned long);
static void FFB_BlitRect(ScrnInfoPtr, int, int, int, int,
int, int);
+#endif
static DGAFunctionRec FFB_DGAFuncs = {
FFB_OpenFramebuffer,
@@ -54,8 +56,12 @@ static DGAFunctionRec FFB_DGAFuncs = {
FFB_SetViewport,
FFB_GetViewport,
FFB_Flush,
+#ifdef HAVE_XAA_H
FFB_FillRect,
FFB_BlitRect,
+#else
+ NULL, NULL,
+#endif
NULL
};
@@ -179,6 +185,7 @@ static void FFB_Flush(ScrnInfoPtr pScrn)
FFBWait(pFfb, ffb);
}
+#ifdef HAVE_XAA_H
extern void FFB_SetupForSolidFill(ScrnInfoPtr, int, int, unsigned int);
extern void FFB_SubsequentSolidFillRect(ScrnInfoPtr, int, int, int, int);
@@ -207,3 +214,4 @@ static void FFB_BlitRect(ScrnInfoPtr pScrn, int srcx, int srcy,
FFB_SubsequentScreenToScreenCopy(pScrn, srcx, srcy, dstx,dsty, w, h);
SET_SYNC_FLAG(pFfb->pXAAInfo);
}
+#endif