summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--driver/xf86-video-cirrus/Makefile.in8
-rw-r--r--driver/xf86-video-cirrus/aclocal.m447
-rw-r--r--driver/xf86-video-cirrus/config.guess17
-rw-r--r--driver/xf86-video-cirrus/config.h.in3
-rw-r--r--driver/xf86-video-cirrus/config.sub35
-rw-r--r--driver/xf86-video-cirrus/configure85
-rw-r--r--driver/xf86-video-cirrus/configure.ac40
-rw-r--r--driver/xf86-video-cirrus/depcomp86
-rw-r--r--driver/xf86-video-cirrus/man/Makefile.in2
-rw-r--r--driver/xf86-video-cirrus/src/Makefile.am9
-rw-r--r--driver/xf86-video-cirrus/src/Makefile.in18
-rw-r--r--driver/xf86-video-cirrus/src/alp.h4
-rw-r--r--driver/xf86-video-cirrus/src/alp_driver.c36
-rw-r--r--driver/xf86-video-cirrus/src/alp_exa.c330
-rw-r--r--driver/xf86-video-cirrus/src/cir.h7
15 files changed, 650 insertions, 77 deletions
diff --git a/driver/xf86-video-cirrus/Makefile.in b/driver/xf86-video-cirrus/Makefile.in
index 751804020..1b27dd778 100644
--- a/driver/xf86-video-cirrus/Makefile.in
+++ b/driver/xf86-video-cirrus/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@@ -623,9 +623,9 @@ distcheck: dist
*.zip*) \
unzip $(distdir).zip ;;\
esac
- chmod -R a-w $(distdir); chmod u+w $(distdir)
- mkdir $(distdir)/_build
- mkdir $(distdir)/_inst
+ chmod -R a-w $(distdir)
+ chmod u+w $(distdir)
+ mkdir $(distdir)/_build $(distdir)/_inst
chmod a-w $(distdir)
test -d $(distdir)/_build || exit 0; \
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
diff --git a/driver/xf86-video-cirrus/aclocal.m4 b/driver/xf86-video-cirrus/aclocal.m4
index c01424d69..51495306c 100644
--- a/driver/xf86-video-cirrus/aclocal.m4
+++ b/driver/xf86-video-cirrus/aclocal.m4
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.12.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.12.6 -*- Autoconf -*-
# Copyright (C) 1996-2012 Free Software Foundation, Inc.
@@ -8770,8 +8770,6 @@ fi[]dnl
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 8
-
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -8781,7 +8779,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.12'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.12.2], [],
+m4_if([$1], [1.12.6], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -8797,7 +8795,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.12.2])dnl
+[AM_AUTOMAKE_VERSION([1.12.6])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -8810,8 +8808,6 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to
# '$srcdir', '$srcdir/..', or '$srcdir/../..'.
@@ -8865,8 +8861,6 @@ am_aux_dir=`cd $ac_aux_dir && pwd`
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
-
# AM_CONDITIONAL(NAME, SHELL-CONDITION)
# -------------------------------------
# Define a conditional.
@@ -8898,7 +8892,6 @@ fi])])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 17
# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -9090,7 +9083,6 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
# _AM_OUTPUT_DEPENDENCY_COMMANDS
# ------------------------------
@@ -9167,8 +9159,6 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 19
-
# This macro actually does too much. Some checks are only needed if
# your package does certain things. But this isn't really a big deal.
@@ -9320,8 +9310,6 @@ echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_co
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 8
-
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -9343,8 +9331,6 @@ AC_SUBST([install_sh])])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# Check whether the underlying file-system supports filenames
# with a leading dot. For instance MS-DOS doesn't.
AC_DEFUN([AM_SET_LEADING_DOT],
@@ -9367,8 +9353,6 @@ AC_SUBST([am__leading_dot])])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
-
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
# Control maintainer-specific portions of Makefiles.
@@ -9406,8 +9390,6 @@ AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
-
# AM_MAKE_INCLUDE()
# -----------------
# Check to see how make treats includes.
@@ -9458,8 +9440,6 @@ rm -f confinc confmf
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
-
# AM_MISSING_PROG(NAME, PROGRAM)
# ------------------------------
AC_DEFUN([AM_MISSING_PROG],
@@ -9467,7 +9447,6 @@ AC_DEFUN([AM_MISSING_PROG],
$1=${$1-"${am_missing_run}$2"}
AC_SUBST($1)])
-
# AM_MISSING_HAS_RUN
# ------------------
# Define MISSING if not defined so far and test if it supports --run.
@@ -9500,8 +9479,6 @@ fi
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
-
# _AM_MANGLE_OPTION(NAME)
# -----------------------
AC_DEFUN([_AM_MANGLE_OPTION],
@@ -9533,8 +9510,6 @@ AC_DEFUN([_AM_IF_OPTION],
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 9
-
# AM_SANITY_CHECK
# ---------------
AC_DEFUN([AM_SANITY_CHECK],
@@ -9616,8 +9591,6 @@ rm -f conftest.file
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
-
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
@@ -9678,8 +9651,6 @@ _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
-
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor 'install' (even GNU) is that you can't
@@ -9708,8 +9679,6 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
-
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
@@ -9729,8 +9698,6 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 3
-
# _AM_PROG_TAR(FORMAT)
# --------------------
# Check how to create a tarball in format FORMAT.
@@ -9857,7 +9824,7 @@ dnl DEALINGS IN THE SOFTWARE.
# See the "minimum version" comment for each macro you use to see what
# version you require.
m4_defun([XORG_MACROS_VERSION],[
-m4_define([vers_have], [1.16.2])
+m4_define([vers_have], [1.17])
m4_define([maj_have], m4_substr(vers_have, 0, m4_index(vers_have, [.])))
m4_define([maj_needed], m4_substr([$1], 0, m4_index([$1], [.])))
m4_if(m4_cmp(maj_have, maj_needed), 0,,
@@ -11695,10 +11662,10 @@ dnl other dealings in this Software without prior written authorization
dnl from the copyright holders.
dnl
-# XORG_DRIVER_CHECK_EXT()
+# XORG_DRIVER_CHECK_EXT(MACRO, PROTO)
# --------------------------
-# Checks for the $1 define in xorg-server.h (from the sdk). If it
-# is defined, then add $1 to $REQUIRED_MODULES.
+# Checks for the MACRO define in xorg-server.h (from the sdk). If it
+# is defined, then add the given PROTO to $REQUIRED_MODULES.
AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
AC_REQUIRE([PKG_PROG_PKG_CONFIG])
diff --git a/driver/xf86-video-cirrus/config.guess b/driver/xf86-video-cirrus/config.guess
index c0adba94b..872b96a16 100644
--- a/driver/xf86-video-cirrus/config.guess
+++ b/driver/xf86-video-cirrus/config.guess
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-06-10'
+timestamp='2012-09-25'
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
@@ -200,6 +200,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
echo "${machine}-${os}${release}"
exit ;;
+ *:Bitrig:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE}
+ exit ;;
*:OpenBSD:*:*)
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
@@ -302,7 +306,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
echo arm-acorn-riscix${UNAME_RELEASE}
exit ;;
- arm:riscos:*:*|arm:RISCOS:*:*)
+ arm*:riscos:*:*|arm*:RISCOS:*:*)
echo arm-unknown-riscos
exit ;;
SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
@@ -801,6 +805,9 @@ EOF
i*:CYGWIN*:*)
echo ${UNAME_MACHINE}-pc-cygwin
exit ;;
+ *:MINGW64*:*)
+ echo ${UNAME_MACHINE}-pc-mingw64
+ exit ;;
*:MINGW*:*)
echo ${UNAME_MACHINE}-pc-mingw32
exit ;;
@@ -1201,6 +1208,9 @@ EOF
BePC:Haiku:*:*) # Haiku running on Intel PC compatible.
echo i586-pc-haiku
exit ;;
+ x86_64:Haiku:*:*)
+ echo x86_64-unknown-haiku
+ exit ;;
SX-4:SUPER-UX:*:*)
echo sx4-nec-superux${UNAME_RELEASE}
exit ;;
@@ -1330,9 +1340,6 @@ EOF
exit ;;
esac
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
eval $set_cc_for_build
cat >$dummy.c <<EOF
#ifdef _SEQUENT_
diff --git a/driver/xf86-video-cirrus/config.h.in b/driver/xf86-video-cirrus/config.h.in
index 32686dc65..e36988aee 100644
--- a/driver/xf86-video-cirrus/config.h.in
+++ b/driver/xf86-video-cirrus/config.h.in
@@ -78,5 +78,8 @@
/* Define to 1 if you have the ANSI C header files. */
#undef STDC_HEADERS
+/* Build support for Exa */
+#undef USE_EXA
+
/* Version number of package */
#undef VERSION
diff --git a/driver/xf86-video-cirrus/config.sub b/driver/xf86-video-cirrus/config.sub
index 6205f8423..8df551109 100644
--- a/driver/xf86-video-cirrus/config.sub
+++ b/driver/xf86-video-cirrus/config.sub
@@ -4,7 +4,7 @@
# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
# 2011, 2012 Free Software Foundation, Inc.
-timestamp='2012-04-18'
+timestamp='2012-12-06'
# This file is (in principle) common to ALL GNU software.
# The presence of a machine in this file suggests that SOME GNU software
@@ -123,7 +123,7 @@ esac
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
case $maybe_os in
nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
- linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
+ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
knetbsd*-gnu* | netbsd*-gnu* | \
kopensolaris*-gnu* | \
storm-chaos* | os2-emx* | rtmk-nova*)
@@ -156,7 +156,7 @@ case $os in
-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
- -apple | -axis | -knuth | -cray | -microblaze)
+ -apple | -axis | -knuth | -cray | -microblaze*)
os=
basic_machine=$1
;;
@@ -259,8 +259,10 @@ case $basic_machine in
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
| am33_2.0 \
- | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
- | be32 | be64 \
+ | arc \
+ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \
+ | avr | avr32 \
+ | be32 | be64 \
| bfin \
| c4x | clipper \
| d10v | d30v | dlx | dsp16xx \
@@ -273,7 +275,7 @@ case $basic_machine in
| le32 | le64 \
| lm32 \
| m32c | m32r | m32rle | m68000 | m68k | m88k \
- | maxq | mb | microblaze | mcore | mep | metag \
+ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \
| mips | mipsbe | mipseb | mipsel | mipsle \
| mips16 \
| mips64 | mips64el \
@@ -389,7 +391,8 @@ case $basic_machine in
| lm32-* \
| m32c-* | m32r-* | m32rle-* \
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
- | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
+ | microblaze-* | microblazeel-* \
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
| mips16-* \
| mips64-* | mips64el-* \
@@ -788,9 +791,13 @@ case $basic_machine in
basic_machine=ns32k-utek
os=-sysv
;;
- microblaze)
+ microblaze*)
basic_machine=microblaze-xilinx
;;
+ mingw64)
+ basic_machine=x86_64-pc
+ os=-mingw64
+ ;;
mingw32)
basic_machine=i386-pc
os=-mingw32
@@ -1019,7 +1026,11 @@ case $basic_machine in
basic_machine=i586-unknown
os=-pw32
;;
- rdos)
+ rdos | rdos64)
+ basic_machine=x86_64-pc
+ os=-rdos
+ ;;
+ rdos32)
basic_machine=i386-pc
os=-rdos
;;
@@ -1352,15 +1363,15 @@ case $os in
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
- | -openbsd* | -solidbsd* \
+ | -bitrig* | -openbsd* | -solidbsd* \
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
| -chorusos* | -chorusrdb* | -cegcc* \
| -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
- | -mingw32* | -linux-gnu* | -linux-android* \
- | -linux-newlib* | -linux-uclibc* \
+ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \
+ | -linux-newlib* | -linux-musl* | -linux-uclibc* \
| -uxpv* | -beos* | -mpeix* | -udk* \
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
diff --git a/driver/xf86-video-cirrus/configure b/driver/xf86-video-cirrus/configure
index 00eddcd89..d78c0a990 100644
--- a/driver/xf86-video-cirrus/configure
+++ b/driver/xf86-video-cirrus/configure
@@ -643,6 +643,8 @@ XSERVER_LIBPCIACCESS_FALSE
XSERVER_LIBPCIACCESS_TRUE
PCIACCESS_LIBS
PCIACCESS_CFLAGS
+USE_EXA_FALSE
+USE_EXA_TRUE
XAA_FALSE
XAA_TRUE
XORG_LIBS
@@ -799,6 +801,7 @@ with_sysroot
enable_libtool_lock
with_xorg_module_dir
enable_xaa
+enable_exa
'
ac_precious_vars='build_alias
host_alias
@@ -1455,6 +1458,7 @@ Optional Features:
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-xaa Enable legacy X Acceleration Architecture (XAA)
[default=auto]
+ --disable-exa Disable EXA support [[default=enabled]]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
@@ -17960,6 +17964,83 @@ fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $XAA" >&5
$as_echo "$XAA" >&6; }
+# Check whether --enable-exa was given.
+if test "${enable_exa+set}" = set; then :
+ enableval=$enable_exa; EXA="$enableval"
+else
+ EXA=yes
+fi
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+# Properly handle EXA.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable EXA support" >&5
+$as_echo_n "checking whether to enable EXA support... " >&6; }
+if test "x$EXA" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+ ac_fn_c_check_header_mongrel "$LINENO" "exa.h" "ac_cv_header_exa_h" "$ac_includes_default"
+if test "x$ac_cv_header_exa_h" = xyes; then :
+ have_exa_h="yes"
+else
+ have_exa_h="no"
+fi
+
+
+ CPPFLAGS="$SAVE_CPPFLAGS"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+if test "x$have_exa_h" = xyes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether EXA version is at least 2.0.0" >&5
+$as_echo_n "checking whether EXA version is at least 2.0.0... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include "exa.h"
+#if EXA_VERSION_MAJOR < 2
+#error OLD EXA!
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ USE_EXA=yes
+else
+ USE_EXA=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_EXA" >&5
+$as_echo "$USE_EXA" >&6; }
+
+ if test "x$USE_EXA" = xyes; then
+
+$as_echo "#define USE_EXA 1" >>confdefs.h
+
+ fi
+fi
+ if test "x$USE_EXA" = xyes; then
+ USE_EXA_TRUE=
+ USE_EXA_FALSE='#'
+else
+ USE_EXA_TRUE='#'
+ USE_EXA_FALSE=
+fi
+
+
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
pkg_failed=no
@@ -18211,6 +18292,10 @@ if test -z "${XAA_TRUE}" && test -z "${XAA_FALSE}"; then
as_fn_error $? "conditional \"XAA\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
+if test -z "${USE_EXA_TRUE}" && test -z "${USE_EXA_FALSE}"; then
+ as_fn_error $? "conditional \"USE_EXA\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
if test -z "${XSERVER_LIBPCIACCESS_TRUE}" && test -z "${XSERVER_LIBPCIACCESS_FALSE}"; then
as_fn_error $? "conditional \"XSERVER_LIBPCIACCESS\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
diff --git a/driver/xf86-video-cirrus/configure.ac b/driver/xf86-video-cirrus/configure.ac
index dddf9efa6..89a2e812c 100644
--- a/driver/xf86-video-cirrus/configure.ac
+++ b/driver/xf86-video-cirrus/configure.ac
@@ -90,6 +90,46 @@ AC_MSG_CHECKING([whether to include XAA support])
AM_CONDITIONAL(XAA, test "x$XAA" = xyes)
AC_MSG_RESULT([$XAA])
+AC_ARG_ENABLE(exa, AS_HELP_STRING([--disable-exa],
+ [Disable EXA support [[default=enabled]]]),
+ [EXA="$enableval"],
+ [EXA=yes])
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+# Properly handle EXA.
+AC_MSG_CHECKING([whether to enable EXA support])
+if test "x$EXA" = xyes; then
+ AC_MSG_RESULT(yes)
+
+ SAVE_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+ AC_CHECK_HEADER(exa.h,
+ [have_exa_h="yes"], [have_exa_h="no"])
+ CPPFLAGS="$SAVE_CPPFLAGS"
+else
+ AC_MSG_RESULT(no)
+fi
+
+SAVE_CPPFLAGS="$CPPFLAGS"
+CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
+if test "x$have_exa_h" = xyes; then
+ AC_MSG_CHECKING([whether EXA version is at least 2.0.0])
+ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[
+#include "exa.h"
+#if EXA_VERSION_MAJOR < 2
+#error OLD EXA!
+#endif
+ ]])],
+ [USE_EXA=yes],
+ [USE_EXA=no])
+ AC_MSG_RESULT($USE_EXA)
+
+ if test "x$USE_EXA" = xyes; then
+ AC_DEFINE(USE_EXA, 1, [Build support for Exa])
+ fi
+fi
+AM_CONDITIONAL(USE_EXA, test "x$USE_EXA" = xyes)
+
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
diff --git a/driver/xf86-video-cirrus/depcomp b/driver/xf86-video-cirrus/depcomp
index debb6ffa3..e1f51f482 100644
--- a/driver/xf86-video-cirrus/depcomp
+++ b/driver/xf86-video-cirrus/depcomp
@@ -1,7 +1,7 @@
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2012-03-27.16; # UTC
+scriptversion=2012-07-12.20; # UTC
# Copyright (C) 1999-2012 Free Software Foundation, Inc.
@@ -74,6 +74,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
rm -f "$tmpdepfile"
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
# Some modes work just like other modes, but use different flags. We
# parameterize here, but still list the modes in the big case below,
# to make depend.m4 easier to write. Note that we *cannot* use a case
@@ -108,7 +111,7 @@ if test "$depmode" = msvc7msys; then
fi
if test "$depmode" = xlc; then
- # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+ # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
gccflag=-qmakedep=gcc,-MF
depmode=gcc
fi
@@ -142,13 +145,17 @@ gcc3)
;;
gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
## There are various ways to get dependency output from gcc. Here's
## why we pick this rather obscure method:
## - Don't want to use -MD because we'd like the dependencies to end
## up in a subdir. Having to rename by hand is ugly.
## (We might end up doing this anyway to support other compilers.)
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
-## -MM, not -M (despite what the docs say).
+## -MM, not -M (despite what the docs say). Also, it might not be
+## supported by the other compilers which use the 'gcc' depmode.
## - Using -M directly means running the compiler twice (even worse
## than renaming).
if test -z "$gccflag"; then
@@ -334,6 +341,79 @@ icc)
rm -f "$tmpdepfile"
;;
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file. A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+ # Portland's C compiler understands '-MD'.
+ # Will always output deps to 'file.d' where file is the root name of the
+ # source file under compilation, even if file resides in a subdirectory.
+ # The object file name does not affect the name of the '.d' file.
+ # pgcc 10.2 will output
+ # foo.o: sub/foo.c sub/foo.h
+ # and will wrap long lines using '\' :
+ # foo.o: sub/foo.c ... \
+ # sub/foo.h ... \
+ # ...
+ dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+ test "x$dir" = "x$object" && dir=
+ # Use the source, not the object, to determine the base name, since
+ # that's sadly what pgcc will do too.
+ base=`echo "$source" | sed -e 's|^.*/||' -e 's/\.[-_a-zA-Z0-9]*$//'`
+ tmpdepfile="$base.d"
+
+ # For projects that build the same source file twice into different object
+ # files, the pgcc approach of using the *source* file root name can cause
+ # problems in parallel builds. Use a locking strategy to avoid stomping on
+ # the same $tmpdepfile.
+ lockdir="$base.d-lock"
+ trap "echo '$0: caught signal, cleaning up...' >&2; rm -rf $lockdir" 1 2 13 15
+ numtries=100
+ i=$numtries
+ while test $i -gt 0 ; do
+ # mkdir is a portable test-and-set.
+ if mkdir $lockdir 2>/dev/null; then
+ # This process acquired the lock.
+ "$@" -MD
+ stat=$?
+ # Release the lock.
+ rm -rf $lockdir
+ break
+ else
+ ## the lock is being held by a different process,
+ ## wait until the winning process is done or we timeout
+ while test -d $lockdir && test $i -gt 0; do
+ sleep 1
+ i=`expr $i - 1`
+ done
+ fi
+ i=`expr $i - 1`
+ done
+ trap - 1 2 13 15
+ if test $i -le 0; then
+ echo "$0: failed to acquire lock after $numtries attempts" >&2
+ echo "$0: check lockdir '$lockdir'" >&2
+ exit 1
+ fi
+
+ if test $stat -ne 0; then
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ # Each line is of the form `foo.o: dependent.h',
+ # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+ # Do two passes, one to just change these to
+ # `$object: dependent.h' and one to simply `dependent.h:'.
+ sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+ # Some versions of the HPUX 10.20 sed can't process this invocation
+ # correctly. Breaking it into two sed invocations is a workaround.
+ sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+ sed -e 's/$/ :/' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
hp2)
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
# compilers, which have integrated preprocessors. The correct option
diff --git a/driver/xf86-video-cirrus/man/Makefile.in b/driver/xf86-video-cirrus/man/Makefile.in
index 402025e67..2805dc716 100644
--- a/driver/xf86-video-cirrus/man/Makefile.in
+++ b/driver/xf86-video-cirrus/man/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
diff --git a/driver/xf86-video-cirrus/src/Makefile.am b/driver/xf86-video-cirrus/src/Makefile.am
index c649b3d64..0468be58d 100644
--- a/driver/xf86-video-cirrus/src/Makefile.am
+++ b/driver/xf86-video-cirrus/src/Makefile.am
@@ -37,6 +37,11 @@ cirrus_drv_la_SOURCES = \
cir_pcirename.h \
compat-api.h
+if USE_EXA
+ALPINE_EXA_SRCS = \
+ alp_exa.c
+endif
+
cirrus_alpine_la_LTLIBRARIES = cirrus_alpine.la
cirrus_alpine_la_LDFLAGS = -module -avoid-version
cirrus_alpine_ladir = @moduledir@/drivers
@@ -46,7 +51,9 @@ cirrus_alpine_la_SOURCES = \
alp_hwcurs.c \
alp_i2c.c \
alp_xaa.c \
- alp_xaam.c
+ alp_xaam.c \
+ $(ALPINE_EXA_SRCS)
+
cirrus_laguna_la_LTLIBRARIES = cirrus_laguna.la
cirrus_laguna_la_LDFLAGS = -module -avoid-version
diff --git a/driver/xf86-video-cirrus/src/Makefile.in b/driver/xf86-video-cirrus/src/Makefile.in
index d8ad5061a..609a5c587 100644
--- a/driver/xf86-video-cirrus/src/Makefile.in
+++ b/driver/xf86-video-cirrus/src/Makefile.in
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.12.2 from Makefile.am.
+# Makefile.in generated by automake 1.12.6 from Makefile.am.
# @configure_input@
# Copyright (C) 1994-2012 Free Software Foundation, Inc.
@@ -114,8 +114,11 @@ am__installdirs = "$(DESTDIR)$(cirrus_alpine_ladir)" \
LTLIBRARIES = $(cirrus_alpine_la_LTLIBRARIES) \
$(cirrus_drv_la_LTLIBRARIES) $(cirrus_laguna_la_LTLIBRARIES)
cirrus_alpine_la_LIBADD =
+am__cirrus_alpine_la_SOURCES_DIST = alp_driver.c alp.h alp_hwcurs.c \
+ alp_i2c.c alp_xaa.c alp_xaam.c alp_exa.c
+@USE_EXA_TRUE@am__objects_1 = alp_exa.lo
am_cirrus_alpine_la_OBJECTS = alp_driver.lo alp_hwcurs.lo alp_i2c.lo \
- alp_xaa.lo alp_xaam.lo
+ alp_xaa.lo alp_xaam.lo $(am__objects_1)
cirrus_alpine_la_OBJECTS = $(am_cirrus_alpine_la_OBJECTS)
AM_V_lt = $(am__v_lt_@AM_V@)
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
@@ -176,8 +179,8 @@ am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
SOURCES = $(cirrus_alpine_la_SOURCES) $(cirrus_drv_la_SOURCES) \
$(cirrus_laguna_la_SOURCES)
-DIST_SOURCES = $(cirrus_alpine_la_SOURCES) $(cirrus_drv_la_SOURCES) \
- $(cirrus_laguna_la_SOURCES)
+DIST_SOURCES = $(am__cirrus_alpine_la_SOURCES_DIST) \
+ $(cirrus_drv_la_SOURCES) $(cirrus_laguna_la_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -346,6 +349,9 @@ cirrus_drv_la_SOURCES = \
cir_pcirename.h \
compat-api.h
+@USE_EXA_TRUE@ALPINE_EXA_SRCS = \
+@USE_EXA_TRUE@ alp_exa.c
+
cirrus_alpine_la_LTLIBRARIES = cirrus_alpine.la
cirrus_alpine_la_LDFLAGS = -module -avoid-version
cirrus_alpine_ladir = @moduledir@/drivers
@@ -355,7 +361,8 @@ cirrus_alpine_la_SOURCES = \
alp_hwcurs.c \
alp_i2c.c \
alp_xaa.c \
- alp_xaam.c
+ alp_xaam.c \
+ $(ALPINE_EXA_SRCS)
cirrus_laguna_la_LTLIBRARIES = cirrus_laguna.la
cirrus_laguna_la_LDFLAGS = -module -avoid-version
@@ -519,6 +526,7 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CirrusClk.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alp_driver.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alp_exa.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alp_hwcurs.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alp_i2c.Plo@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alp_xaa.Plo@am__quote@
diff --git a/driver/xf86-video-cirrus/src/alp.h b/driver/xf86-video-cirrus/src/alp.h
index c09e24bff..5f1ad1102 100644
--- a/driver/xf86-video-cirrus/src/alp.h
+++ b/driver/xf86-video-cirrus/src/alp.h
@@ -44,6 +44,10 @@ extern Bool AlpHWCursorInit(ScreenPtr pScreen, int size);
extern Bool AlpXAAInit(ScreenPtr pScreen);
extern Bool AlpXAAInitMMIO(ScreenPtr pScreen);
#endif
+#ifdef USE_EXA
+extern Bool AlpEXAInit(ScreenPtr);
+#endif
+
extern Bool AlpDGAInit(ScreenPtr pScreen);
extern Bool AlpI2CInit(ScrnInfoPtr pScrn);
diff --git a/driver/xf86-video-cirrus/src/alp_driver.c b/driver/xf86-video-cirrus/src/alp_driver.c
index 36f20392a..3d6b27a04 100644
--- a/driver/xf86-video-cirrus/src/alp_driver.c
+++ b/driver/xf86-video-cirrus/src/alp_driver.c
@@ -223,7 +223,6 @@ AlpProbe(int entity)
return pScrn;
}
-
static Bool
AlpGetRec(ScrnInfoPtr pScrn)
{
@@ -237,7 +236,7 @@ AlpGetRec(ScrnInfoPtr pScrn)
((CirPtr)pScrn->driverPrivate)->chip.alp = xnfcalloc(sizeof(AlpRec),1);
#ifdef ALP_DEBUG
- ErrorF("AlpGetRec 0x%x\n", CIRPTR(pScrn));
+ ErrorF("AlpGetRec 0x%lx\n", (intptr_t)CIRPTR(pScrn));
#endif
return TRUE;
}
@@ -1085,10 +1084,22 @@ AlpPreInit(ScrnInfoPtr pScrn, int flags)
/* Load XAA if needed */
if (!pCir->NoAccel) {
+#ifdef USE_EXA
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Loading EXA module...\n");
+ if (xf86LoadSubModule(pScrn, "exa")) {
+ pCir->ExaDriver = exaDriverAlloc();
+ if (!pCir->ExaDriver) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "Could no allocate EXA_DRIVER.\n");
+ pCir->UseEXA = FALSE;
+ }
+ pCir->UseEXA = TRUE;
+ }
+#endif
#ifdef HAVE_XAA_H
if (!xf86LoadSubModule(pScrn, "xaa"))
#else
- if (1)
+ if (!pCir->UseEXA)
#endif
{
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
@@ -1468,10 +1479,9 @@ AlpScreenInit(SCREEN_INIT_ARGS_DECL)
#ifdef ALP_DEBUG
ErrorF("AlpScreenInit\n");
#endif
-
hwp = VGAHWPTR(pScrn);
pCir = CIRPTR(pScrn);
-
+
/* Map the VGA memory when the primary video */
if (!vgaHWMapMem(pScrn))
return FALSE;
@@ -1657,6 +1667,20 @@ AlpScreenInit(SCREEN_INIT_ARGS_DECL)
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Could not initialize XAA\n");
#endif
+#ifdef USE_EXA
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Filling in EXA memory info\n");
+ pCir->ExaDriver->offScreenBase = pCir->offscreen_offset;
+ pCir->ExaDriver->memorySize = pCir->FbMapSize;
+ if (AlpEXAInit(pScreen))
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "EXA Acceleration enabled\n");
+ else {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "EXA Acceleration Init failed\n");
+ pCir->NoAccel = TRUE;
+ }
+#endif
}
#if 1
@@ -1764,7 +1788,7 @@ AlpAdjustFrame(ADJUST_FRAME_ARGS_DECL)
Base *= (pScrn->bitsPerPixel/4);
#ifdef ALP_DEBUG
- ErrorF("AlpAdjustFrame %d %d 0x%x %d %x\n", x, y, flags, Base, Base);
+ ErrorF("AlpAdjustFrame %d %d %d %x\n", x, y, Base, Base);
#endif
if ((Base & ~0x000FFFFF) != 0) {
diff --git a/driver/xf86-video-cirrus/src/alp_exa.c b/driver/xf86-video-cirrus/src/alp_exa.c
new file mode 100644
index 000000000..c31a0ea09
--- /dev/null
+++ b/driver/xf86-video-cirrus/src/alp_exa.c
@@ -0,0 +1,330 @@
+/*
+ * Copyright (c) 2013 Matthieu Herrb
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE * SOFTWARE.
+ */
+
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include "xf86.h"
+#include "xf86_OSproc.h"
+#include "compiler.h"
+
+#include "xf86Pci.h"
+#include "vgaHW.h"
+
+#include "cir.h"
+#define _ALP_PRIVATE_
+#include "alp.h"
+
+#include "exa.h"
+
+#define WAIT outb(pCir->PIOReg, 0x31); \
+ while(inb(pCir->PIOReg + 1) & pCir->chip.alp->waitMsk){};
+#define WAIT_1 outb(pCir->PIOReg, 0x31); \
+ while(inb(pCir->PIOReg + 1) & 0x1){};
+#define SetupForRop(rop) outw(pCir->PIOReg, translated_rop[rop])
+
+static Bool AlpPrepareSolid(PixmapPtr, int, Pixel, Pixel);
+static void AlpSolid(PixmapPtr, int, int, int, int);
+static Bool AlpPrepareCopy(PixmapPtr, PixmapPtr, int, int, int, Pixel);
+static void AlpCopy(PixmapPtr, int, int, int, int, int, int);
+static void AlpDone(PixmapPtr);
+static void AlpSync(ScreenPtr, int);
+
+static const CARD16 translated_rop[] =
+{
+ /* GXclear */ 0x0032U,
+ /* GXand */ 0x0532U,
+ /* GXandreverse */ 0x0932U,
+ /* GXcopy */ 0x0D32U,
+ /* GXandinversted */ 0x5032U,
+ /* GXnoop */ 0x0632U,
+ /* GXxor */ 0x5932U,
+ /* GXor */ 0x6D32U,
+ /* GXnor */ 0x9032U,
+ /* GXequiv */ 0x9532U,
+ /* GXinvert */ 0x0B32U,
+ /* GXorReverse */ 0xAD32U,
+ /* GXcopyInverted */ 0xD032U,
+ /* GXorInverted */ 0xD632U,
+ /* GXnand */ 0xDA32U,
+ /* GXset */ 0x0E32U
+};
+
+
+static Bool
+AlpPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+ AlpPtr pAlp = ALPPTR(pCir);
+ int pitch = pCir->pitch;
+
+#ifdef ALP_DEBUG
+ ErrorF("AlpSetupForSolidFill color=%x alu=%x planemask=%x\n",
+ fg, alu, planemask);
+#endif
+ WAIT;
+
+ SetupForRop(alu);
+
+ switch (pCir -> Chipset) {
+ case PCI_CHIP_GD7548:
+ /* The GD7548 does not (apparently) support solid filling
+ directly, it always need an actual source.
+ We therefore use it as a pattern fill with a solid
+ pattern */
+ {
+ int source = pAlp->monoPattern8x8;
+ /* source = 8x8 solid mono pattern */
+ outw(pCir->PIOReg, ((source << 8) & 0xff00) | 0x2C);
+ outw(pCir->PIOReg, ((source) & 0xff00) | 0x2D);
+ outw(pCir->PIOReg, ((source >> 8) & 0x3f00) | 0x2E);
+ /* memset() may not be the fastest */
+ memset((char *)pCir->FbBase + pAlp->monoPattern8x8, 0xFF, 8);
+ write_mem_barrier();
+ break;
+ }
+ default:
+ /* GR33 = 0x04 => does not exist on GD7548 */
+ outw(pCir->PIOReg, 0x0433);
+ }
+
+ /* GR30 = color expansion, pattern copy */
+ /* Choses 8bpp / 16bpp color expansion */
+ outw(pCir->PIOReg, 0xC030 |((pScrn->bitsPerPixel - 8) << 9));
+
+ outw(pCir->PIOReg, ((fg << 8) & 0xff00) | 0x01);
+ outw(pCir->PIOReg, ((fg) & 0xff00) | 0x11);
+ outw(pCir->PIOReg, ((fg >> 8) & 0xff00) | 0x13);
+ outw(pCir->PIOReg, 0x15);
+
+ /* Set dest pitch */
+ outw(pCir->PIOReg, ((pitch << 8) & 0xff00) | 0x24);
+ outw(pCir->PIOReg, ((pitch) & 0x1f00) | 0x25);
+
+ return TRUE;
+}
+
+static void
+AlpSolid(PixmapPtr pPixmap, int x1, int y1, int x2, int y2)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+ int dest;
+ int hh, ww;
+ int pitch = pCir->pitch;
+
+ ww = ((x2 - x1) * pScrn->bitsPerPixel / 8) - 1;
+ hh = (y2 - y1) - 1;
+ dest = y1 * pitch + x1 * pScrn->bitsPerPixel / 8;
+
+ WAIT;
+
+ /* Width */
+ outw(pCir->PIOReg, ((ww << 8) & 0xff00) | 0x20);
+ outw(pCir->PIOReg, ((ww) & 0x1f00) | 0x21);
+ /* Height */
+ outw(pCir->PIOReg, ((hh << 8) & 0xff00) | 0x22);
+ outw(pCir->PIOReg, ((hh) & 0x0700) | 0x23);
+
+ /* dest */
+ outw(pCir->PIOReg, ((dest << 8) & 0xff00) | 0x28);
+ outw(pCir->PIOReg, ((dest) & 0xff00) | 0x29);
+ outw(pCir->PIOReg, ((dest >> 8) & 0x3f00) | 0x2A);
+ if (!pCir->chip.alp->autoStart)
+ outw(pCir->PIOReg, 0x0231);
+
+#ifdef ALP_DEBUG
+ ErrorF("AlpSubsequentSolidFillRect x=%d y=%d w=%d h=%d\n",
+ x1, y1, x2 - x1, y2 - y1);
+#endif
+}
+
+static Bool
+AlpPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap,
+ int xdir, int ydir, int alu, Pixel planemask)
+{
+ ScreenPtr pScreen = pSrcPixmap->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+ int pitch = pCir->pitch;
+
+#ifdef ALP_DEBUG
+ ErrorF("AlpPrepareCopy xdir=%d ydir=%d alu=%x planemask=%x\n",
+ xdir, ydir, alu, planemask);
+#endif
+ WAIT;
+ SetupForRop(alu);
+ /* Set dest pitch */
+ outw(pCir->PIOReg, ((pitch << 8) & 0xff00) | 0x24);
+ outw(pCir->PIOReg, ((pitch) & 0x1f00) | 0x25);
+ /* Set source pitch */
+ outw(pCir->PIOReg, ((pitch << 8) & 0xff00) | 0x26);
+ outw(pCir->PIOReg, ((pitch) & 0x1f00) | 0x27);
+ return TRUE;
+}
+
+static void
+AlpCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY,
+ int width, int height)
+{
+ ScreenPtr pScreen = pDstPixmap->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+ int source, dest;
+ int hh, ww;
+ int decrement = 0;
+ int pitch = pCir->pitch;
+
+ ww = (width * pScrn->bitsPerPixel / 8) - 1;
+ hh = height - 1;
+ dest = dstY * pitch + dstX * pScrn->bitsPerPixel / 8;
+ source = srcY * pitch + srcX * pScrn->bitsPerPixel / 8;
+ if (dest > source) {
+ decrement = 1 << 8;
+ dest += hh * pitch + ww;
+ source += hh * pitch + ww;
+ }
+
+ WAIT;
+
+ outw(pCir->PIOReg, decrement | 0x30);
+
+ /* Width */
+ outw(pCir->PIOReg, ((ww << 8) & 0xff00) | 0x20);
+ outw(pCir->PIOReg, ((ww) & 0x1f00) | 0x21);
+ /* Height */
+ outw(pCir->PIOReg, ((hh << 8) & 0xff00) | 0x22);
+ outw(pCir->PIOReg, ((hh) & 0x0700) | 0x23);
+
+
+ /* source */
+ outw(pCir->PIOReg, ((source << 8) & 0xff00) | 0x2C);
+ outw(pCir->PIOReg, ((source) & 0xff00) | 0x2D);
+ outw(pCir->PIOReg, ((source >> 8) & 0x3f00)| 0x2E);
+
+ /* dest */
+ outw(pCir->PIOReg, ((dest << 8) & 0xff00) | 0x28);
+ outw(pCir->PIOReg, ((dest) & 0xff00) | 0x29);
+ outw(pCir->PIOReg, ((dest >> 8) & 0x3f00) | 0x2A);
+ if (!pCir->chip.alp->autoStart)
+ outw(pCir->PIOReg, 0x0231);
+
+#ifdef ALP_DEBUG
+ ErrorF("AlpCopy x1=%d y1=%d x2=%d y2=%d w=%d h=%d\n",
+ srcX, srcY, dstX, dstY, width, height);
+ ErrorF("AlpSCopy s=%d d=%d ww=%d hh=%d\n",
+ source, dest, ww, hh);
+#endif
+}
+
+static void
+AlpDone(PixmapPtr pPixmap)
+{
+ ScreenPtr pScreen = pPixmap->drawable.pScreen;
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+#ifdef ALP_DEBUG
+ ErrorF("AlpDone\n");
+#endif
+}
+
+static void
+AlpSync(ScreenPtr pScreen, int marker)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+
+#ifdef ALP_DEBUG
+ ErrorF("AlpSync\n");
+#endif
+ WAIT_1;
+ return;
+}
+
+
+static void
+AlpAccelEngineInit(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+
+ outw(pCir->PIOReg, 0x200E); /* enable writes to gr33 */
+ /* Setup things for autostart */
+ if (pCir->properties & ACCEL_AUTOSTART) {
+ outw(pCir->PIOReg, 0x8031); /* enable autostart */
+ pCir->chip.alp->waitMsk = 0x10;
+ pCir->chip.alp->autoStart = TRUE;
+ } else {
+ pCir->chip.alp->waitMsk = 0x1;
+ pCir->chip.alp->autoStart = FALSE;
+ }
+}
+
+Bool
+AlpEXAInit(ScreenPtr pScreen)
+{
+ ScrnInfoPtr pScrn = xf86ScreenToScrn(pScreen);
+ CirPtr pCir = CIRPTR(pScrn);
+
+ AlpAccelEngineInit(pScreen);
+
+ pCir->ExaDriver->exa_major = EXA_VERSION_MAJOR;
+ pCir->ExaDriver->exa_minor = EXA_VERSION_MINOR;
+
+ pCir->ExaDriver->memoryBase = (char *)pCir->FbBase + pScrn->fbOffset;
+ pCir->ExaDriver->flags = EXA_OFFSCREEN_PIXMAPS | EXA_OFFSCREEN_ALIGN_POT;
+
+#if EXA_VERSION_MAJOR > 2 || (EXA_VERSION_MAJOR == 2 && EXA_VERSION_MINOR >= 3)
+ pCir->ExaDriver->maxPitchBytes = 16320;
+#endif
+ /* Pitch alignment is in sets of 8 pixels, and we need to cover 32bpp, so it's 32 bytes */
+ pCir->ExaDriver->pixmapPitchAlign = 32;
+ pCir->ExaDriver->pixmapOffsetAlign = 32;
+ pCir->ExaDriver->maxX = 2048;
+ pCir->ExaDriver->maxY = 2048;
+
+ pCir->ExaDriver->PrepareSolid = AlpPrepareSolid;
+ pCir->ExaDriver->Solid = AlpSolid;
+ pCir->ExaDriver->DoneSolid =AlpDone;
+
+ pCir->ExaDriver->PrepareCopy = AlpPrepareCopy;
+ pCir->ExaDriver->Copy = AlpCopy;
+ pCir->ExaDriver->DoneCopy = AlpDone;
+
+ pCir->ExaDriver->WaitMarker = AlpSync;
+
+ xf86DrvMsg(pScrn->scrnIndex, X_INFO,
+ "Initializing EXA driver...\n");
+ if (!exaDriverInit(pScreen, pCir->ExaDriver)) {
+ free(pCir->ExaDriver);
+ return FALSE;
+ }
+ return TRUE;
+}
+
+
diff --git a/driver/xf86-video-cirrus/src/cir.h b/driver/xf86-video-cirrus/src/cir.h
index 0a5d403bd..78c1301cb 100644
--- a/driver/xf86-video-cirrus/src/cir.h
+++ b/driver/xf86-video-cirrus/src/cir.h
@@ -7,6 +7,9 @@
#ifdef HAVE_XAA_H
#include "xaa.h"
#endif
+#ifdef USE_EXA
+#include "exa.h"
+#endif
#include "xf86i2c.h"
#include <string.h>
#include <stdlib.h>
@@ -46,9 +49,13 @@ typedef struct {
Bool NoAccel;
Bool HWCursor;
Bool UseMMIO;
+ Bool UseEXA;
#ifdef HAVE_XAA_H
XAAInfoRecPtr AccelInfoRec;
#endif
+#ifdef USE_EXA
+ ExaDriverPtr ExaDriver;
+#endif
xf86CursorInfoPtr CursorInfoRec;
int DGAnumModes;
DGAModePtr DGAModes;