mirror of
https://github.com/X11Libre/xf86-video-geode.git
synced 2026-03-24 01:24:52 +00:00
Allow building on Xservers without XAA
This commit is contained in:
committed by
Mart Raudsepp
parent
cb0e67bbc0
commit
68646c3119
18
configure.ac
18
configure.ac
@@ -78,6 +78,24 @@ AC_ARG_ENABLE(ztv,
|
||||
[ztv=$enableval],
|
||||
[ztv=auto])
|
||||
|
||||
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])
|
||||
|
||||
# Check for Video4Linux Version 2 (V4L2) availability
|
||||
AC_CHECK_HEADERS([linux/videodev2.h],[v4l2=yes],[v4l2=no])
|
||||
if test "x$ztv" != "xno" ; then
|
||||
|
||||
14
src/geode.h
14
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;
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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]);
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user