summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2006-03-15 00:46:33 +0000
committerLuc Verhaegen <libv@skynet.be>2006-03-15 00:46:33 +0000
commit50923b6a9325592edc8b02b17646f96b9b8c4a01 (patch)
tree4327c18885545b34bf76b5b4bd92062e6ffea0c0
parent74f4ed4275866475b3c182fae962df2fc0946b85 (diff)
Add some autoconf to keep this driver from building EXA when a slightly
older server with older exa is installed. The way in which this problem was treated by the actually related developers explains a lot about this driver.
-rw-r--r--ChangeLog14
-rw-r--r--configure.ac36
-rw-r--r--src/Makefile.am6
-rw-r--r--src/radeon_driver.c4
4 files changed, 57 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 5fe4540..9a56d35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2006-03-15 Luc Verhaegen <libv@skynet.be>
+
+ * configure.ac:
+ * src/Makefile.am:
+ * src/radeon_cursor.c: (RADEONUseHWCursor):
+ * src/radeon_dga.c: (RADEON_BlitRect):
+ * src/radeon_driver.c: (RADEONPreInitAccel), (RADEONScreenInit):
+
+ Add some autoconf to keep this driver from building EXA when a
+ slightly older server with older exa is installed.
+
+ The way in which this problem was treated by the actually related
+ developers explains a lot about this driver.
+
2006-03-13 Benjamin Herrenschmidt <benh@kernel.crashing.org>
* src/radeon_video.c: (RADEONSetTransform):
diff --git a/configure.ac b/configure.ac
index dbd4ec5..9d96446 100644
--- a/configure.ac
+++ b/configure.ac
@@ -52,6 +52,11 @@ AC_ARG_ENABLE(dri, AC_HELP_STRING([--disable-dri],
[DRI="$enableval"],
[DRI=auto])
+AC_ARG_ENABLE(exa,
+ AC_HELP_STRING([--disable-exa],
+ [Disable EXA support [[default enabled]]]),
+ [EXA="$enableval"],
+ [EXA=yes])
# Checks for extensions
XORG_DRIVER_CHECK_EXT(XINERAMA, xineramaproto)
@@ -167,7 +172,36 @@ if test "x$ATIMISC_TV_OUT" = xyes; then
fi
AC_DEFINE(USE_XAA, 1, [Build support for XAA])
-AC_DEFINE(USE_EXA, 1, [Build support for Exa])
+
+# Properly handle EXA.
+AC_MSG_CHECKING([whether to enable EXA support])
+if test "x$EXA" = xyes; then
+ echo "yes"
+ AC_CHECK_FILE([${sdkdir}/exa.h],
+ [have_exa_h="yes"], [have_exa_h="no"])
+else
+ echo "no"
+fi
+
+if test "x$have_exa_h" = xyes; then
+ AC_MSG_CHECKING([wether EXA version is at least 2.0.0])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include "${sdkdir}/exa.h"
+#if EXA_VERSION_MAJOR < 2
+#error OLD EXA!
+#endif
+ ]])],
+ [USE_EXA=yes],
+ [USE_EXA=no])
+ if test "x$USE_EXA" = xyes; then
+ echo "yes."
+ AC_DEFINE(USE_EXA, 1, [Build support for Exa])
+ else
+ echo "no."
+ fi
+fi
+
+AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
AC_SUBST([XORG_CFLAGS])
AC_SUBST([DRI_CFLAGS])
diff --git a/src/Makefile.am b/src/Makefile.am
index d9622f9..67fff56 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -41,6 +41,10 @@ if ATIMISC_DGA
ATIMISC_DGA_SOURCES = atidga.c
endif
+if USE_EXA
+RADEON_EXA_SOURCES = radeon_exa.c
+endif
+
AM_CFLAGS = @XORG_CFLAGS@ @DRI_CFLAGS@
ati_drv_la_LTLIBRARIES = ati_drv.la
@@ -76,7 +80,7 @@ radeon_drv_ladir = @moduledir@/drivers
radeon_drv_la_SOURCES = \
radeon_accel.c radeon_mergedfb.c radeon_cursor.c radeon_dga.c \
radeon_driver.c radeon_video.c radeon_bios.c radeon_mm_i2c.c \
- radeon_vip.c radeon_misc.c radeon_exa.c $(RADEON_DRI_SRCS)
+ radeon_vip.c radeon_misc.c $(RADEON_DRI_SRCS) $(RADEON_EXA_SOURCES)
theatre_detect_drv_la_LTLIBRARIES = theatre_detect_drv.la
theatre_detect_drv_la_LDFLAGS = -module -avoid-version
diff --git a/src/radeon_driver.c b/src/radeon_driver.c
index 34d3c10..cb86fb8 100644
--- a/src/radeon_driver.c
+++ b/src/radeon_driver.c
@@ -1,5 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/drivers/ati/radeon_driver.c,v 1.117 2004/02/19 22:38:12 tsi Exp $ */
-/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.98 2006/03/12 06:53:27 benh Exp $ */
+/* $XdotOrg: driver/xf86-video-ati/src/radeon_driver.c,v 1.99 2006/03/13 00:09:44 benh Exp $ */
/*
* Copyright 2000 ATI Technologies Inc., Markham, Ontario, and
* VA Linux Systems Inc., Fremont, California.
@@ -4381,6 +4381,8 @@ static Bool RADEONPreInitAccel(ScrnInfoPtr pScrn)
char *optstr;
#endif
+ info->useEXA = FALSE;
+
if (!xf86ReturnOptValBool(info->Options, OPTION_NOACCEL, FALSE)) {
int errmaj = 0, errmin = 0;