Commit 891ea023 authored by Dave Airlie's avatar Dave Airlie
Browse files

smi: fix build against XAA-less server

parent e4660be7
......@@ -84,6 +84,23 @@ AM_CONDITIONAL(XMODES, test "x$XMODES" = xyes)
if test "x$XMODES" = xyes; then
AC_DEFINE(HAVE_XMODES, 1, [X server has new mode code])
fi
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])
AC_SUBST([moduledir])
......
......@@ -49,7 +49,10 @@ authorization from the XFree86 Project and Silicon Motion.
#include "fb.h"
#ifdef HAVE_XAA_H
#include "xaa.h"
#endif
#include "xf86fbman.h"
#include "exa.h"
#include "xf86cmap.h"
#include "xf86i2c.h"
......@@ -239,7 +242,9 @@ typedef struct
printed using a counter */
Bool useBIOS; /* Use BIOS for mode sets */
#ifdef HAVE_XAA_H
XAAInfoRecPtr XAAInfoRec; /* XAA info Rec */
#endif
/* EXA */
ExaDriverPtr EXADriverPtr;
......
......@@ -1847,9 +1847,11 @@ SMI_CloseScreen(int scrnIndex, ScreenPtr pScreen)
/* Restore console mode and unmap framebuffer */
SMI_LeaveVT(scrnIndex, 0);
#ifdef HAVE_XAA_H
if (pSmi->XAAInfoRec != NULL) {
XAADestroyInfoRec(pSmi->XAAInfoRec);
}
#endif
if (pSmi->EXADriverPtr) {
exaDriverFini(pScreen);
pSmi->EXADriverPtr = NULL;
......
......@@ -32,6 +32,8 @@ authorization from the XFree86 Project and silicon Motion.
#include "smi.h"
#include "smi_501.h"
#ifdef HAVE_XAA_H
#include "miline.h"
#include "xaalocal.h"
#include "xaarop.h"
......@@ -62,9 +64,11 @@ static void SMI_SetupForImageWrite(ScrnInfoPtr, int, unsigned int, int, int,
static void SMI_SubsequentImageWriteRect(ScrnInfoPtr, int, int, int, int, int);
#endif
#endif
Bool
SMI_XAAInit(ScreenPtr pScreen)
{
#ifdef HAVE_XAA_H
XAAInfoRecPtr infoPtr;
ScrnInfoPtr pScrn = xf86Screens[pScreen->myNum];
SMIPtr pSmi = SMIPTR(pScrn);
......@@ -187,8 +191,13 @@ SMI_XAAInit(ScreenPtr pScreen)
ret = XAAInit(pScreen, infoPtr);
LEAVE(ret);
#else
return FALSE;
#endif
}
#ifdef HAVE_XAA_H
/******************************************************************************/
/* Screen to Screen Copies */
/******************************************************************************/
......@@ -720,3 +729,4 @@ SMI_SubsequentImageWriteRect(ScrnInfoPtr pScrn, int x, int y, int w, int h,
LEAVE();
}
#endif
#endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment