[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-savage: Changes to 'debian-unstable'



 Makefile.in                                       |    2 
 configure                                         |  256 ----------
 debian/changelog                                  |    7 
 debian/patches/02_temporary_revert_pciaccess.diff |  558 ++++++++--------------
 debian/patches/series                             |    2 
 man/Makefile.in                                   |    2 
 src/Makefile.in                                   |    2 
 7 files changed, 261 insertions(+), 568 deletions(-)

New commits:
commit dfe96e5d364fc08cddf3a453d16323ce22513af8
Author: Brice Goglin <bgoglin@debian.org>
Date:   Fri Sep 5 19:39:54 2008 +0200

    Reenable 02_temporary_revert_pciaccess.diff and append all pci-rework changes

diff --git a/Makefile.in b/Makefile.in
index 86587c6..c01a4f7 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -157,8 +157,6 @@ PACKAGE_STRING = @PACKAGE_STRING@
 PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
-PCIACCESS_CFLAGS = @PCIACCESS_CFLAGS@
-PCIACCESS_LIBS = @PCIACCESS_LIBS@
 PKG_CONFIG = @PKG_CONFIG@
 RANLIB = @RANLIB@
 SED = @SED@
diff --git a/configure b/configure
index 9d43b77..b24977f 100755
--- a/configure
+++ b/configure
@@ -883,10 +883,6 @@ DRI_TRUE
 DRI_FALSE
 DRI_CFLAGS
 DRI_LIBS
-PCIACCESS_CFLAGS
-PCIACCESS_LIBS
-XSERVER_LIBPCIACCESS_TRUE
-XSERVER_LIBPCIACCESS_FALSE
 moduledir
 DRIVER_NAME
 APP_MAN_SUFFIX
@@ -923,9 +919,7 @@ PKG_CONFIG
 XORG_CFLAGS
 XORG_LIBS
 DRI_CFLAGS
-DRI_LIBS
-PCIACCESS_CFLAGS
-PCIACCESS_LIBS'
+DRI_LIBS'
 
 
 # Initialize some variables set by options.
@@ -1548,10 +1542,6 @@ Some influential environment variables:
   XORG_LIBS   linker flags for XORG, overriding pkg-config
   DRI_CFLAGS  C compiler flags for DRI, overriding pkg-config
   DRI_LIBS    linker flags for DRI, overriding pkg-config
-  PCIACCESS_CFLAGS
-              C compiler flags for PCIACCESS, overriding pkg-config
-  PCIACCESS_LIBS
-              linker flags for PCIACCESS, overriding pkg-config
 
 Use these variables to override the choices made by `configure' or to help
 it to find libraries and programs with nonstandard names/locations.
@@ -4395,7 +4385,7 @@ ia64-*-hpux*)
   ;;
 *-*-irix6*)
   # Find out which ABI we are using.
-  echo '#line 4398 "configure"' > conftest.$ac_ext
+  echo '#line 4388 "configure"' > conftest.$ac_ext
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
   (eval $ac_compile) 2>&5
   ac_status=$?
@@ -7452,11 +7442,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7455: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7445: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7459: \$? = $ac_status" >&5
+   echo "$as_me:7449: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7742,11 +7732,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7745: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7735: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:7749: \$? = $ac_status" >&5
+   echo "$as_me:7739: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -7846,11 +7836,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:7849: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:7839: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:7853: \$? = $ac_status" >&5
+   echo "$as_me:7843: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -10223,7 +10213,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10226 "configure"
+#line 10216 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -10323,7 +10313,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<EOF
-#line 10326 "configure"
+#line 10316 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12724,11 +12714,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12727: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12717: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:12731: \$? = $ac_status" >&5
+   echo "$as_me:12721: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -12828,11 +12818,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:12831: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:12821: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:12835: \$? = $ac_status" >&5
+   echo "$as_me:12825: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -14426,11 +14416,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14429: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14419: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:14433: \$? = $ac_status" >&5
+   echo "$as_me:14423: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -14530,11 +14520,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:14533: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:14523: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:14537: \$? = $ac_status" >&5
+   echo "$as_me:14527: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -16750,11 +16740,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:16753: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:16743: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:16757: \$? = $ac_status" >&5
+   echo "$as_me:16747: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17040,11 +17030,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17043: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17033: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>conftest.err)
    ac_status=$?
    cat conftest.err >&5
-   echo "$as_me:17047: \$? = $ac_status" >&5
+   echo "$as_me:17037: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s "$ac_outfile"; then
      # The compiler can only warn and ignore the option if not recognized
      # So say no if there are warnings other than the usual output.
@@ -17144,11 +17134,11 @@ else
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
    -e 's:$: $lt_compiler_flag:'`
-   (eval echo "\"\$as_me:17147: $lt_compile\"" >&5)
+   (eval echo "\"\$as_me:17137: $lt_compile\"" >&5)
    (eval "$lt_compile" 2>out/conftest.err)
    ac_status=$?
    cat out/conftest.err >&5
-   echo "$as_me:17151: \$? = $ac_status" >&5
+   echo "$as_me:17141: \$? = $ac_status" >&5
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
    then
      # The compiler can only warn and ignore the option if not recognized
@@ -21509,191 +21499,6 @@ _ACEOF
 
 fi
 
-save_CFLAGS="$CFLAGS"
-CFLAGS="$XORG_CFLAGS"
-{ echo "$as_me:$LINENO: checking whether XSERVER_LIBPCIACCESS is declared" >&5
-echo $ECHO_N "checking whether XSERVER_LIBPCIACCESS is declared... $ECHO_C" >&6; }
-if test "${ac_cv_have_decl_XSERVER_LIBPCIACCESS+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-  cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
-#include "xorg-server.h"
-
-int
-main ()
-{
-#ifndef XSERVER_LIBPCIACCESS
-  (void) XSERVER_LIBPCIACCESS;
-#endif
-
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (ac_try="$ac_compile"
-case "(($ac_try" in
-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
-  *) ac_try_echo=$ac_try;;
-esac
-eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
-  (eval "$ac_compile") 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } && {
-	 test -z "$ac_c_werror_flag" ||
-	 test ! -s conftest.err
-       } && test -s conftest.$ac_objext; then
-  ac_cv_have_decl_XSERVER_LIBPCIACCESS=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-	ac_cv_have_decl_XSERVER_LIBPCIACCESS=no
-fi
-
-rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-fi
-{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_XSERVER_LIBPCIACCESS" >&5
-echo "${ECHO_T}$ac_cv_have_decl_XSERVER_LIBPCIACCESS" >&6; }
-if test $ac_cv_have_decl_XSERVER_LIBPCIACCESS = yes; then
-  XSERVER_LIBPCIACCESS=yes
-else
-  XSERVER_LIBPCIACCESS=no
-fi
-
-CFLAGS="$save_CFLAGS"
-
-if test "x$XSERVER_LIBPCIACCESS" = xyes; then
-
-pkg_failed=no
-{ echo "$as_me:$LINENO: checking for PCIACCESS" >&5
-echo $ECHO_N "checking for PCIACCESS... $ECHO_C" >&6; }
-
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PCIACCESS_CFLAGS"; then
-        pkg_cv_PCIACCESS_CFLAGS="$PCIACCESS_CFLAGS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.10\"") >&5
-  ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.10") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_PCIACCESS_CFLAGS=`$PKG_CONFIG --cflags "pciaccess >= 0.10" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-	pkg_failed=untried
-fi
-if test -n "$PKG_CONFIG"; then
-    if test -n "$PCIACCESS_LIBS"; then
-        pkg_cv_PCIACCESS_LIBS="$PCIACCESS_LIBS"
-    else
-        if test -n "$PKG_CONFIG" && \
-    { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"pciaccess >= 0.10\"") >&5
-  ($PKG_CONFIG --exists --print-errors "pciaccess >= 0.10") 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; then
-  pkg_cv_PCIACCESS_LIBS=`$PKG_CONFIG --libs "pciaccess >= 0.10" 2>/dev/null`
-else
-  pkg_failed=yes
-fi
-    fi
-else
-	pkg_failed=untried
-fi
-
-
-
-if test $pkg_failed = yes; then
-
-if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
-        _pkg_short_errors_supported=yes
-else
-        _pkg_short_errors_supported=no
-fi
-        if test $_pkg_short_errors_supported = yes; then
-	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "pciaccess >= 0.10"`
-        else
-	        PCIACCESS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "pciaccess >= 0.10"`
-        fi
-	# Put the nasty error message in config.log where it belongs
-	echo "$PCIACCESS_PKG_ERRORS" >&5
-
-	{ { echo "$as_me:$LINENO: error: Package requirements (pciaccess >= 0.10) were not met:
-
-$PCIACCESS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables PCIACCESS_CFLAGS
-and PCIACCESS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&5
-echo "$as_me: error: Package requirements (pciaccess >= 0.10) were not met:
-
-$PCIACCESS_PKG_ERRORS
-
-Consider adjusting the PKG_CONFIG_PATH environment variable if you
-installed software in a non-standard prefix.
-
-Alternatively, you may set the environment variables PCIACCESS_CFLAGS
-and PCIACCESS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-" >&2;}
-   { (exit 1); exit 1; }; }
-elif test $pkg_failed = untried; then
-	{ { echo "$as_me:$LINENO: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables PCIACCESS_CFLAGS
-and PCIACCESS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&5
-echo "$as_me: error: The pkg-config script could not be found or is too old.  Make sure it
-is in your PATH or set the PKG_CONFIG environment variable to the full
-path to pkg-config.
-
-Alternatively, you may set the environment variables PCIACCESS_CFLAGS
-and PCIACCESS_LIBS to avoid the need to call pkg-config.
-See the pkg-config man page for more details.
-
-To get pkg-config, see <http://pkg-config.freedesktop.org/>.
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
-else
-	PCIACCESS_CFLAGS=$pkg_cv_PCIACCESS_CFLAGS
-	PCIACCESS_LIBS=$pkg_cv_PCIACCESS_LIBS
-        { echo "$as_me:$LINENO: result: yes" >&5
-echo "${ECHO_T}yes" >&6; }
-	:
-fi
-fi
- if test "x$XSERVER_LIBPCIACCESS" = xyes; then
-  XSERVER_LIBPCIACCESS_TRUE=
-  XSERVER_LIBPCIACCESS_FALSE='#'
-else
-  XSERVER_LIBPCIACCESS_TRUE='#'
-  XSERVER_LIBPCIACCESS_FALSE=
-fi
-
-
 
 
 
@@ -21952,13 +21757,6 @@ echo "$as_me: error: conditional \"DRI\" was never defined.
 Usually this means the macro was only invoked conditionally." >&2;}
    { (exit 1); exit 1; }; }
 fi
-if test -z "${XSERVER_LIBPCIACCESS_TRUE}" && test -z "${XSERVER_LIBPCIACCESS_FALSE}"; then
-  { { echo "$as_me:$LINENO: error: conditional \"XSERVER_LIBPCIACCESS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&5
-echo "$as_me: error: conditional \"XSERVER_LIBPCIACCESS\" was never defined.
-Usually this means the macro was only invoked conditionally." >&2;}
-   { (exit 1); exit 1; }; }
-fi
 
 : ${CONFIG_STATUS=./config.status}
 ac_clean_files_save=$ac_clean_files
@@ -22648,10 +22446,6 @@ DRI_TRUE!$DRI_TRUE$ac_delim
 DRI_FALSE!$DRI_FALSE$ac_delim
 DRI_CFLAGS!$DRI_CFLAGS$ac_delim
 DRI_LIBS!$DRI_LIBS$ac_delim
-PCIACCESS_CFLAGS!$PCIACCESS_CFLAGS$ac_delim
-PCIACCESS_LIBS!$PCIACCESS_LIBS$ac_delim
-XSERVER_LIBPCIACCESS_TRUE!$XSERVER_LIBPCIACCESS_TRUE$ac_delim
-XSERVER_LIBPCIACCESS_FALSE!$XSERVER_LIBPCIACCESS_FALSE$ac_delim
 moduledir!$moduledir$ac_delim
 DRIVER_NAME!$DRIVER_NAME$ac_delim
 APP_MAN_SUFFIX!$APP_MAN_SUFFIX$ac_delim
@@ -22670,7 +22464,7 @@ LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 33; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
diff --git a/debian/changelog b/debian/changelog
index 4c00117..7be7c31 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+xserver-xorg-video-savage (1:2.2.1-2) unstable; urgency=low
+
+  * Reenable 02_temporary_revert_pciaccess.diff and append all recent
+    pci-rework changes, closes: #483989.
+
+ -- Brice Goglin <bgoglin@debian.org>  Fri, 05 Sep 2008 19:37:51 +0200
+
 xserver-xorg-video-savage (1:2.2.1-1) unstable; urgency=low
 
   [ David Nusinow ]
diff --git a/debian/patches/02_temporary_revert_pciaccess.diff b/debian/patches/02_temporary_revert_pciaccess.diff
index 23cfc93..ab0b9b1 100644
--- a/debian/patches/02_temporary_revert_pciaccess.diff
+++ b/debian/patches/02_temporary_revert_pciaccess.diff
@@ -1,4 +1,95 @@
---- b/src/savage_driver.c
+diff --git a/configure.ac b/configure.ac
+index b6d64e4..d88819c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -95,18 +95,6 @@ if test "$DRI" = yes; then
+         AC_DEFINE(XF86DRI_DEVEL,1,[Enable developmental DRI driver support])
+ fi
+ 
+-save_CFLAGS="$CFLAGS"
+-CFLAGS="$XORG_CFLAGS"
+-AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
+-              [XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
+-              [#include "xorg-server.h"])
+-CFLAGS="$save_CFLAGS"
+-
+-if test "x$XSERVER_LIBPCIACCESS" = xyes; then
+-    PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10])
+-fi
+-AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
+-
+ AC_SUBST([DRI_CFLAGS])
+ AC_SUBST([XORG_CFLAGS])
+ AC_SUBST([moduledir])
+diff --git a/src/savage_dga.c b/src/savage_dga.c
+index eb1c5d2..42f4262 100644
+--- a/src/savage_dga.c
++++ b/src/savage_dga.c
+@@ -390,7 +390,7 @@ Savage_OpenFramebuffer(
+     SavagePtr psav = SAVPTR(pScrn);
+ 
+     *name = NULL;	 /* no special device */
+-    *mem = (unsigned char*)psav->FbRegion.base;
++    *mem = (unsigned char*)psav->FrameBufferBase;
+     *size = psav->videoRambytes;
+     *offset = 0;
+     *flags = DGA_NEED_ROOT;
+diff --git a/src/savage_dri.c b/src/savage_dri.c
+index 0d40222..2879f2a 100644
+--- a/src/savage_dri.c
++++ b/src/savage_dri.c
+@@ -467,8 +467,8 @@ static Bool SAVAGEDRIAgpInit(ScreenPtr pScreen)
+    xf86DrvMsg( pScreen->myNum, X_INFO,
+ 	       "[agp] Mode 0x%08lx [AGP 0x%04x/0x%04x; Card 0x%04x/0x%04x]\n",
+ 	       mode, vendor, device,
+-	       VENDOR_ID(psav->PciInfo),
+-	       DEVICE_ID(psav->PciInfo));
++	       psav->PciInfo->vendor,
++	       psav->PciInfo->chipType );
+ 
+    if ( drmAgpEnable( psav->drmFD, mode ) < 0 ) {
+       xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] AGP not enabled\n" );
+@@ -624,7 +624,7 @@ static Bool SAVAGEDRIMapInit( ScreenPtr pScreen )
+    pSAVAGEDRIServer->registers.size = SAVAGEIOMAPSIZE;
+ 
+    if ( drmAddMap( psav->drmFD,
+-		   (drm_handle_t)psav->MmioRegion.base,
++		   (drm_handle_t)psav->MmioBase,
+ 		   pSAVAGEDRIServer->registers.size,
+ 		   DRM_REGISTERS,0,
+ 		   &pSAVAGEDRIServer->registers.handle ) < 0 ) {
+@@ -636,7 +636,7 @@ static Bool SAVAGEDRIMapInit( ScreenPtr pScreen )
+    pSAVAGEDRIServer->aperture.size = 5 * 0x01000000;
+    
+    if ( drmAddMap( psav->drmFD,
+-		   (drm_handle_t)(psav->ApertureRegion.base),
++		   (drm_handle_t)(psav->ApertureBase),
+ 		   pSAVAGEDRIServer->aperture.size,
+ 		   DRM_FRAME_BUFFER,0,
+ 		   &pSAVAGEDRIServer->aperture.handle ) < 0 ) {
+@@ -882,18 +882,14 @@ Bool SAVAGEDRIScreenInit( ScreenPtr pScreen )
+       sprintf(pDRIInfo->busIdString,
+               "PCI:%d:%d:%d",
+               psav->PciInfo->bus,
+-#ifdef XSERVER_LIBPCIACCESS
+-              psav->PciInfo->dev,
+-#else
+               psav->PciInfo->device,
+-#endif
+               psav->PciInfo->func);
+    }
+    pDRIInfo->ddxDriverMajorVersion = SAVAGE_VERSION_MAJOR;
+    pDRIInfo->ddxDriverMinorVersion = SAVAGE_VERSION_MINOR;
+    pDRIInfo->ddxDriverPatchVersion = SAVAGE_PATCHLEVEL;
+ 
+-   pDRIInfo->frameBufferPhysicalAddress = (pointer) psav->FbRegion.base;
++   pDRIInfo->frameBufferPhysicalAddress = (pointer) psav->FrameBufferBase;
+    pDRIInfo->frameBufferSize = psav->videoRambytes;
+    pDRIInfo->frameBufferStride = pScrn->displayWidth*(pScrn->bitsPerPixel/8);
+    pDRIInfo->ddxDrawableTableEntry = SAVAGE_MAX_DRAWABLES;
+diff --git a/src/savage_driver.c b/src/savage_driver.c
+index 919bd1a..725d1fa 100644
+--- a/src/savage_driver.c
 +++ b/src/savage_driver.c
 @@ -40,7 +40,6 @@
  #endif
@@ -8,7 +99,7 @@
  
  #include "xf86RAC.h"
  #include "shadowfb.h"
-@@ -73,13 +72,7 @@
+@@ -73,13 +72,7 @@ static void SavageDisableMMIO(ScrnInfoPtr pScrn);
  
  static const OptionInfoRec * SavageAvailableOptions(int chipid, int busid);
  static void SavageIdentify(int flags);
@@ -22,21 +113,10 @@
  static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags);
  
  static Bool SavageEnterVT(int scrnIndex, int flags);
-@@ -139,38 +132,18 @@
+@@ -139,38 +132,18 @@ extern ScrnInfoPtr gpScrn;
  
  int gSavageEntityIndex = -1;
  
-+_X_EXPORT DriverRec SAVAGE =
-+{
-+    SAVAGE_VERSION,
-+    SAVAGE_DRIVER_NAME,
-+    SavageIdentify,
-+    SavageProbe,
-+    SavageAvailableOptions,
-+    NULL,
-+    0,
-+    NULL
-+};
 -#ifdef XSERVER_LIBPCIACCESS
 -#define SAVAGE_DEVICE_MATCH(d, i) \
 -    { 0x5333, (d), PCI_MATCH_ANY, PCI_MATCH_ANY, 0, 0, (i) }
@@ -65,14 +145,25 @@
 -    SAVAGE_DEVICE_MATCH(PCI_CHIP_SUPSAV_IXCDDR,   S3_SUPERSAVAGE),
 -    SAVAGE_DEVICE_MATCH(PCI_CHIP_PROSAVAGE_DDR,   S3_PROSAVAGEDDR),
 -    SAVAGE_DEVICE_MATCH(PCI_CHIP_PROSAVAGE_DDRK,  S3_PROSAVAGEDDR),
- 
+-
 -    { 0, 0, 0 },
--};
++_X_EXPORT DriverRec SAVAGE =
++{
++    SAVAGE_VERSION,
++    SAVAGE_DRIVER_NAME,
++    SavageIdentify,
++    SavageProbe,
++    SavageAvailableOptions,
++    NULL,
++    0,
++    NULL
+ };
 -#endif
++
  
  /* Supported chipsets */
  
-@@ -213,7 +186,6 @@
+@@ -213,7 +186,6 @@ static SymTabRec SavageChipsets[] = {
      { -1,		NULL }
  };
  
@@ -80,7 +171,7 @@
  /* This table maps a PCI device ID to a chipset family identifier. */
  
  static PciChipsets SavagePciChipsets[] = {
-@@ -242,7 +214,6 @@
+@@ -242,7 +214,6 @@ static PciChipsets SavagePciChipsets[] = {
      { S3_SUPERSAVAGE,	PCI_CHIP_SUPSAV_IXCDDR,	RES_SHARED_VGA },
      { -1,		-1,			RES_UNDEFINED }
  };
@@ -88,7 +179,7 @@
  
  typedef enum {
       OPTION_PCI_BURST
-@@ -314,28 +285,6 @@
+@@ -316,28 +287,6 @@ static const OptionInfoRec SavageOptions[] =
      { -1,		NULL,		OPTV_NONE,    {0}, FALSE }
  };
  
@@ -117,7 +208,7 @@
  
  static const char *vgaHWSymbols[] = {
      "vgaHWBlankScreen",
-@@ -839,82 +788,6 @@
+@@ -841,82 +790,6 @@ static void SavageIdentify(int flags)
  }
  
  
@@ -200,7 +291,7 @@
  static Bool SavageProbe(DriverPtr drv, int flags)
  {
      int i;
-@@ -953,8 +826,6 @@
+@@ -955,8 +828,6 @@ static Bool SavageProbe(DriverPtr drv, int flags)
  						    NULL, NULL, NULL, NULL);
  
              if (pScrn != NULL) {
@@ -209,7 +300,7 @@
   	        pScrn->driverVersion = SAVAGE_VERSION;
  	        pScrn->driverName = SAVAGE_DRIVER_NAME;
  	        pScrn->name = "SAVAGE";
-@@ -968,23 +839,6 @@
+@@ -970,23 +841,6 @@ static Bool SavageProbe(DriverPtr drv, int flags)
  	        pScrn->FreeScreen = NULL;
  	        pScrn->ValidMode = SavageValidMode;
  	        foundScreen = TRUE;
@@ -233,7 +324,7 @@
  	    }
  
              pEnt = xf86GetEntityInfo(usedChips[i]);
-@@ -1038,7 +892,6 @@
+@@ -1040,7 +894,6 @@ static int LookupChipID( PciChipsets* pset, int ChipID )
  
      return -1;
  }
@@ -241,7 +332,7 @@
  
  static void SavageDoDDC(ScrnInfoPtr pScrn)
  {
-@@ -1553,6 +1406,7 @@
+@@ -1581,6 +1434,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
  	psav->pVbe = VBEInit(NULL, pEnt->index);
      }
  
@@ -249,7 +340,7 @@
      xf86RegisterResources(pEnt->index, NULL, ResNone);
      xf86SetOperatingState(resVgaIo, pEnt->index, ResUnusedOpr);
      xf86SetOperatingState(resVgaMem, pEnt->index, ResDisableOpr);
-@@ -1561,9 +1415,11 @@
+@@ -1589,9 +1443,11 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
      if (pEnt->device->chipset && *pEnt->device->chipset) {
  	pScrn->chipset = pEnt->device->chipset;
  	psav->ChipId = pEnt->device->chipID;
@@ -261,26 +352,26 @@
  	pScrn->chipset = (char *)xf86TokenToString(SavageChipsets,
  						   psav->Chipset);
  	from = X_CONFIG;
-@@ -1571,7 +1427,8 @@
+@@ -1599,7 +1455,8 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
  		   pEnt->device->chipID);
      } else {
  	from = X_PROBED;
+-	psav->ChipId = DEVICE_ID(psav->PciInfo);
 +	psav->ChipId = psav->PciInfo->chipType;
 +	psav->Chipset = LookupChipID(SavagePciChipsets, psav->ChipId);
--	psav->ChipId = DEVICE_ID(psav->PciInfo);
  	pScrn->chipset = (char *)xf86TokenToString(SavageChipsets,
  						   psav->Chipset);
      }
-@@ -1584,7 +1441,7 @@
+@@ -1612,7 +1469,7 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
  	xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "ChipRev override: %d\n",
  		   psav->ChipRev);
      } else
-+	psav->ChipRev = psav->PciInfo->chipRev;
 -	psav->ChipRev = CHIP_REVISION(psav->PciInfo);
++	psav->ChipRev = psav->PciInfo->chipRev;
  
      xf86DrvMsg(pScrn->scrnIndex, from, "Engine: \"%s\"\n", pScrn->chipset);
  
-@@ -1593,22 +1450,13 @@
+@@ -1621,22 +1478,13 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
  
      xfree(pEnt);
  
@@ -303,7 +394,7 @@
  				/* AGP/PCI (FK: copied from radeon_driver.c) */
      /* Proper autodetection of an AGP capable device requires examining
       * PCI config registers to determine if the device implements extended
-@@ -1667,7 +1515,6 @@
+@@ -1695,7 +1543,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
  	    cap_ptr = (cap_id >> 8) & SAVAGE_CAP_PTR_MASK;
  	}
      }
@@ -311,24 +402,17 @@
  
      xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "%s card detected\n",
  	       (psav->IsPCI) ? "PCI" : "AGP");
-@@ -3061,132 +2908,97 @@
+@@ -3089,136 +2936,97 @@ static void SavageWriteMode(ScrnInfoPtr pScrn, vgaRegPtr vgaSavePtr,
  static Bool SavageMapMem(ScrnInfoPtr pScrn)
  {
      SavagePtr psav = SAVPTR(pScrn);
+-    int err;
 +    int mode;
 +    unsigned i;
--    int err;
  
      TRACE(("SavageMapMem()\n"));
  
      if( S3_SAVAGE3D_SERIES(psav->Chipset) ) {
-+	psav->MmioRegion.bar = 0;
-+	psav->MmioRegion.offset = SAVAGE_NEWMMIO_REGBASE_S3;
-+
-+	psav->FbRegion.bar = 0;
-+	psav->FbRegion.offset = 0;
-+
-+	psav->last_bar = 0;
 -#ifdef XSERVER_LIBPCIACCESS
 -        psav->MmioRegion.base = SAVAGE_NEWMMIO_REGBASE_S3
 -            + psav->PciInfo->regions[0].base_addr;
@@ -338,14 +422,14 @@
 -            + psav->PciInfo->memBase[0];
 -        psav->FbRegion.base = psav->PciInfo->memBase[0];
 -#endif
-     } else {
 +	psav->MmioRegion.bar = 0;
-+	psav->MmioRegion.offset = SAVAGE_NEWMMIO_REGBASE_S4;
++	psav->MmioRegion.offset = SAVAGE_NEWMMIO_REGBASE_S3;
 +
-+	psav->FbRegion.bar = 1;
++	psav->FbRegion.bar = 0;
 +	psav->FbRegion.offset = 0;
 +
-+	psav->last_bar = 1;
++	psav->last_bar = 0;
+     } else {
 -#ifdef XSERVER_LIBPCIACCESS
 -        psav->MmioRegion.base = SAVAGE_NEWMMIO_REGBASE_S4
 -            + psav->PciInfo->regions[0].base_addr;
@@ -355,64 +439,49 @@
 -            + psav->PciInfo->memBase[0];
 -        psav->FbRegion.base = psav->PciInfo->memBase[1];
 -#endif
-     }
+-    }
++	psav->MmioRegion.bar = 0;
++	psav->MmioRegion.offset = SAVAGE_NEWMMIO_REGBASE_S4;
  
 -    psav->MmioRegion.size = SAVAGE_NEWMMIO_REGSIZE;
 -    psav->FbRegion.size = psav->videoRambytes;
--
++	psav->FbRegion.bar = 1;
++	psav->FbRegion.offset = 0;
++
++	psav->last_bar = 1;
++    }
+ 
      /* On Paramount and Savage 2000, aperture 0 is PCI base 2.  On other
       * chipsets it's in the same BAR as the framebuffer.
       */
+-
+-    psav->ApertureRegion.size = (psav->IsPrimary || psav->IsSecondary)
+-        ? (0x01000000 * 2) : (0x01000000 * 5);
+-
      if ((psav->Chipset == S3_SUPERSAVAGE) 
-+	|| (psav->Chipset == S3_SAVAGE2000)) {
-+	psav->ApertureRegion.bar = 2;
-+	psav->ApertureRegion.offset = 0;
-+
-+	psav->last_bar = 2;
 -        || (psav->Chipset == S3_SAVAGE2000)) {
 -#ifdef XSERVER_LIBPCIACCESS
 -        psav->ApertureRegion.base = psav->PciInfo->regions[2].base_addr;
+-        if (psav->ApertureRegion.size > psav->PciInfo->regions[2].size)
+-            psav->ApertureRegion.size = psav->PciInfo->regions[2].size;
 -#else
 -        psav->ApertureRegion.base = psav->PciInfo->memBase[2];
 -#endif
++	|| (psav->Chipset == S3_SAVAGE2000)) {
++	psav->ApertureRegion.bar = 2;
++	psav->ApertureRegion.offset = 0;
++
++	psav->last_bar = 2;
      } else {
+-        psav->ApertureRegion.base = psav->FbRegion.base + 0x02000000;
 +	psav->ApertureRegion.bar = psav->FbRegion.bar;
 +	psav->ApertureRegion.offset = 0x02000000;
--        psav->ApertureRegion.base = psav->FbRegion.base + 0x02000000;
      }
  
--    psav->ApertureRegion.size = (psav->IsPrimary || psav->IsSecondary)
--        ? (0x01000000 * 2) : (0x01000000 * 5);
  
 +    psav->MmioBase = psav->PciInfo->memBase[ psav->MmioRegion.bar ]
 +      + psav->MmioRegion.offset;
-+
-+    psav->FrameBufferBase = psav->PciInfo->memBase[ psav->FbRegion.bar ]
-+      + psav->FbRegion.offset;
  
-+    psav->ApertureBase = psav->PciInfo->memBase[ psav->FbRegion.bar ]
-+      + psav->ApertureRegion.offset;
-+
-+
-+    /* FIXME: This seems fine even on Savage3D where the same BAR contains the
-+     * FIXME: MMIO space and the framebuffer.  Write-combining gets fixed up
-+     * FIXME: later.  Someone should investigate this, though.  And kick S3
-+     * FIXME: for doing something so silly.
-+     */
-+    mode = VIDMEM_MMIO;
-+    for (i = 0; i <= psav->last_bar; i++) {
-+	psav->bar_mappings[i] = xf86MapPciMem(pScrn->scrnIndex, mode,
-+					      psav->PciTag,
-+					      psav->PciInfo->memBase[i],
-+					      (1U << psav->PciInfo->size[i]));
-+	if (!psav->bar_mappings[i]) {
-+	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
-+		       "Internal error: cound not map PCI region %u, last BAR = %u\n",
-+		       i, psav->last_bar);
-+	    return FALSE;
-+	}
-+
-+	mode = VIDMEM_FRAMEBUFFER;
 -    if (psav->FbRegion.size != 0) {
 -#ifdef XSERVER_LIBPCIACCESS
 -        err = pci_device_map_range(psav->PciInfo, psav->FbRegion.base,
@@ -429,25 +498,20 @@
 -#endif
 -        if (err) {
 -            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
--                       "Internal error: cound not map framebuffer range (%d, %s).\n",
+-                       "Internal error: could not map framebuffer range (%d, %s).\n",
 -                       err, strerror(err));
 -            return FALSE;
 -        }
--
++    psav->FrameBufferBase = psav->PciInfo->memBase[ psav->FbRegion.bar ]
++      + psav->FbRegion.offset;
+ 
 -        psav->FBBase = psav->FbRegion.memory;
 -        psav->FBStart = (psav->IsSecondary)
 -            ? psav->FBBase + 0x1000000 : psav->FBBase;
-     }
+-    }
++    psav->ApertureBase = psav->PciInfo->memBase[ psav->FbRegion.bar ]
++      + psav->ApertureRegion.offset;
  
-+    psav->MapBase = psav->bar_mappings[ psav->MmioRegion.bar ]
-+      + psav->MmioRegion.offset;
-+
-+    psav->BciMem = psav->MapBase + 0x10000;
-+
-+    SavageEnableMMIO(pScrn);
-+
-+    psav->FBBase = psav->bar_mappings[ psav->FbRegion.bar ]
-+      + psav->FbRegion.offset;
 -    if (psav->ApertureRegion.memory == NULL) {
 -#ifdef XSERVER_LIBPCIACCESS
 -        err = pci_device_map_range(psav->PciInfo, psav->ApertureRegion.base,
@@ -464,18 +528,35 @@
 -#endif
 -        if (err) {
 -            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
--                       "Internal error: cound not map aperture range (%d, %s).\n",
+-                       "Internal error: could not map aperture range (%d, %s).\n",
 -                       err, strerror(err));
 -            return FALSE;
 -        }
--
+ 
 -        psav->ApertureMap = (psav->IsSecondary)
--            ? psav->ApertureRegion.memory
--            : psav->ApertureRegion.memory + 0x1000000;
--    }
+-            ? psav->ApertureRegion.memory + 0x1000000
+-            : psav->ApertureRegion.memory;
++    /* FIXME: This seems fine even on Savage3D where the same BAR contains the
++     * FIXME: MMIO space and the framebuffer.  Write-combining gets fixed up
++     * FIXME: later.  Someone should investigate this, though.  And kick S3
++     * FIXME: for doing something so silly.
++     */
++    mode = VIDMEM_MMIO;
++    for (i = 0; i <= psav->last_bar; i++) {
++	psav->bar_mappings[i] = xf86MapPciMem(pScrn->scrnIndex, mode,
++					      psav->PciTag,
++					      psav->PciInfo->memBase[i],
++					      (1U << psav->PciInfo->size[i]));
++	if (!psav->bar_mappings[i]) {
++	    xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
++		       "Internal error: cound not map PCI region %u, last BAR = %u\n",
++		       i, psav->last_bar);
++	    return FALSE;
++	}
++
++	mode = VIDMEM_FRAMEBUFFER;
+     }
  
-+    psav->FBStart = (psav->IsSecondary)
-+      ? psav->FBBase + 0x1000000 : psav->FBBase;
 -    if (psav->MmioRegion.memory == NULL) {
 -#ifdef XSERVER_LIBPCIACCESS
 -        err = pci_device_map_range(psav->PciInfo, psav->MmioRegion.base,
@@ -484,35 +565,47 @@
 -                                   & psav->MmioRegion.memory);
 -#else
 -        psav->MmioRegion.memory = 
--            xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
+-            xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
 -                          psav->PciTag, psav->MmioRegion.base,
 -                          psav->MmioRegion.size);
 -        err = (psav->MmioRegion.memory == NULL) ? errno : 0;
 -#endif
 -        if (err) {
 -            xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
--                       "Internal error: cound not map MMIO range (%d, %s).\n",
+-                       "Internal error: could not map MMIO range (%d, %s).\n",
 -                       err, strerror(err));
 -            return FALSE;
 -        }
++    psav->MapBase = psav->bar_mappings[ psav->MmioRegion.bar ]
++      + psav->MmioRegion.offset;
++
++    psav->BciMem = psav->MapBase + 0x10000;
++
++    SavageEnableMMIO(pScrn);
++
++    psav->FBBase = psav->bar_mappings[ psav->FbRegion.bar ]
++      + psav->FbRegion.offset;
  
-+    psav->ApertureMap = psav->bar_mappings[ psav->ApertureRegion.bar ]
-+      + psav->ApertureRegion.offset;
 -        psav->MapBase = psav->MmioRegion.memory;
 -        psav->BciMem = psav->MapBase + 0x10000;
++    psav->FBStart = (psav->IsSecondary)
++      ? psav->FBBase + 0x1000000 : psav->FBBase;
  
+-        SavageEnableMMIO(pScrn);
++    psav->ApertureMap = psav->bar_mappings[ psav->ApertureRegion.bar ]
++      + psav->ApertureRegion.offset;
++
 +    if (psav->IsSecondary) {
 +	psav->ApertureMap += 0x1000000;
--        SavageEnableMMIO(pScrn);
      }
  


Reply to: