Update to xf86-video-savage 2.3.1

This commit is contained in:
matthieu 2009-11-22 17:48:10 +00:00
parent 180745e43a
commit 4122cf8c50
17 changed files with 5905 additions and 4677 deletions

View File

@ -55,7 +55,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(srcdir)/config.h.in \
$(top_srcdir)/configure COPYING ChangeLog config.guess \
config.sub depcomp install-sh ltmain.sh missing
@ -134,6 +134,9 @@ F77 = @F77@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
HAVE_XEXTPROTO_71_FALSE = @HAVE_XEXTPROTO_71_FALSE@
HAVE_XEXTPROTO_71_TRUE = @HAVE_XEXTPROTO_71_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -170,19 +173,15 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@
XEXT_LIBS = @XEXT_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -199,24 +198,31 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@ -0,0 +1,20 @@
xf86-video-savage - S3 Savage video driver for the Xorg X server
Please submit bugs & patches to the Xorg bugzilla:
https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
All questions regarding this software should be directed at the
Xorg mailing list:
http://lists.freedesktop.org/mailman/listinfo/xorg
The master development code repository can be found at:
git://anongit.freedesktop.org/git/xorg/driver/xf86-video-savage
http://cgit.freedesktop.org/xorg/driver/xf86-video-savage
For more information on the git code manager, see:
http://wiki.x.org/wiki/GitPage

View File

@ -7631,6 +7631,7 @@ AC_SUBST([am__tar])
AC_SUBST([am__untar])
]) # _AM_PROG_TAR
dnl xorg-macros.m4. Generated from xorg-macros.m4.in xorgversion.m4 by configure.
dnl
dnl Copyright 2005-2006 Sun Microsystems, Inc. All rights reserved.
dnl
@ -7667,27 +7668,24 @@ dnl of the copyright holder.
# your configure.ac with the minimum required version, such as:
# XORG_MACROS_VERSION(1.1)
#
# To force at least a version with this macro defined, also add:
# m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.1 or later before running autoconf/autogen])])
# To ensure that this macro is defined, also add:
# m4_ifndef([XORG_MACROS_VERSION],
# [m4_fatal([must install xorg-macros 1.1 or later before running autoconf/autogen])])
#
#
# See the "minimum version" comment for each macro you use to see what
# version you require.
AC_DEFUN([XORG_MACROS_VERSION],[
[XORG_MACROS_needed_version=$1
XORG_MACROS_needed_major=`echo $XORG_MACROS_needed_version | sed 's/\..*$//'`
XORG_MACROS_needed_minor=`echo $XORG_MACROS_needed_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
AC_MSG_CHECKING([if xorg-macros used to generate configure is at least ${XORG_MACROS_needed_major}.${XORG_MACROS_needed_minor}])
[XORG_MACROS_version=1.1.6
XORG_MACROS_major=`echo $XORG_MACROS_version | sed 's/\..*$//'`
XORG_MACROS_minor=`echo $XORG_MACROS_version | sed -e 's/^[0-9]*\.//' -e 's/\..*$//'`]
if test $XORG_MACROS_major -ne $XORG_MACROS_needed_major ; then
AC_MSG_ERROR([configure built with incompatible version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.x])
fi
if test $XORG_MACROS_minor -lt $XORG_MACROS_needed_minor ; then
AC_MSG_ERROR([configure built with too old of a version of xorg-macros.m4 - requires version ${XORG_MACROS_major}.${XORG_MACROS_minor}.0 or newer])
fi
AC_MSG_RESULT([yes, $XORG_MACROS_version])
m4_defun([XORG_MACROS_VERSION],[
m4_define([vers_have], [1.3.0])
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,,
[m4_fatal([xorg-macros major version ]maj_needed[ is required but ]vers_have[ found])])
m4_if(m4_version_compare(vers_have, [$1]), -1,
[m4_fatal([xorg-macros version $1 or higher is required but ]vers_have[ found])])
m4_undefine([vers_have])
m4_undefine([maj_have])
m4_undefine([maj_needed])
]) # XORG_MACROS_VERSION
# XORG_PROG_RAWCPP()
@ -7712,6 +7710,10 @@ else
if test `${RAWCPP} -undef < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS=-undef
AC_MSG_RESULT([yes])
# under Cygwin unix is still defined even with -undef
elif test `${RAWCPP} -undef -ansi < conftest.$ac_ext | grep -c 'unix'` -eq 1 ; then
RAWCPPFLAGS="-undef -ansi"
AC_MSG_RESULT([yes, with -ansi])
else
AC_MSG_ERROR([${RAWCPP} defines unix with or without -undef. I don't know what to do.])
fi
@ -7824,7 +7826,9 @@ AC_SUBST([ADMIN_MAN_DIR])
# Whether or not the necessary tools and files are found can be checked
# with the AM_CONDITIONAL "BUILD_LINUXDOC"
AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml
if test x$XORG_SGML_PATH = x ; then
XORG_SGML_PATH=$prefix/share/sgml
fi
HAVE_DEFS_ENT=
if test x"$cross_compiling" = x"yes" ; then
@ -7880,7 +7884,9 @@ AC_SUBST(MAKE_HTML)
# indicates whether the necessary tools and files are found and, if set,
# $(MAKE_XXX) blah.sgml will produce blah.xxx.
AC_DEFUN([XORG_CHECK_DOCBOOK],[
XORG_SGML_PATH=$prefix/share/sgml
if test x$XORG_SGML_PATH = x ; then
XORG_SGML_PATH=$prefix/share/sgml
fi
HAVE_DEFS_ENT=
BUILDTXTDOC=no
BUILDPDFDOC=no
@ -7946,7 +7952,7 @@ AC_SUBST(MAKE_HTML)
# their AM_CFLAGS (or other appropriate *_CFLAGS) to use them.
AC_DEFUN([XORG_CHECK_MALLOC_ZERO],[
AC_ARG_ENABLE(malloc0returnsnull,
AC_HELP_STRING([--enable-malloc0returnsnull],
AS_HELP_STRING([--enable-malloc0returnsnull],
[malloc(0) returns NULL (default: auto)]),
[MALLOC_ZERO_RETURNS_NULL=$enableval],
[MALLOC_ZERO_RETURNS_NULL=auto])
@ -7998,7 +8004,7 @@ AC_SUBST([XTMALLOC_ZERO_CFLAGS])
AC_DEFUN([XORG_WITH_LINT],[
# Allow checking code with lint, sparse, etc.
AC_ARG_WITH(lint, [AC_HELP_STRING([--with-lint],
AC_ARG_WITH(lint, [AS_HELP_STRING([--with-lint],
[Use a lint-style source code checker (default: disabled)])],
[use_lint=$withval], [use_lint=no])
if test "x$use_lint" = "xyes" ; then
@ -8039,7 +8045,7 @@ AM_CONDITIONAL(LINT, [test x$LINT != xno])
AC_DEFUN([XORG_LINT_LIBRARY],[
AC_REQUIRE([XORG_WITH_LINT])
# Build lint "library" for more indepth checks of programs calling this library
AC_ARG_ENABLE(lint-library, [AC_HELP_STRING([--enable-lint-library],
AC_ARG_ENABLE(lint-library, [AS_HELP_STRING([--enable-lint-library],
[Create lint library (default: disabled)])],
[make_lint_lib=$enableval], [make_lint_lib=no])
if test "x$make_lint_lib" != "xno" ; then
@ -8057,6 +8063,154 @@ AM_CONDITIONAL(MAKE_LINT_LIB, [test x$make_lint_lib != xno])
]) # XORG_LINT_LIBRARY
# XORG_CWARNFLAGS
# ---------------
# Minimum version: 1.2.0
#
# Defines CWARNFLAGS to enable C compiler warnings.
#
AC_DEFUN([XORG_CWARNFLAGS], [
AC_REQUIRE([AC_PROG_CC])
if test "x$GCC" = xyes ; then
CWARNFLAGS="-Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes \
-Wmissing-declarations -Wnested-externs -fno-strict-aliasing \
-Wbad-function-cast"
case `$CC -dumpversion` in
3.4.* | 4.*)
CWARNFLAGS="$CWARNFLAGS -Wold-style-definition -Wdeclaration-after-statement"
;;
esac
else
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
if test "x$SUNCC" = "xyes"; then
CWARNFLAGS="-v"
fi
fi
AC_SUBST(CWARNFLAGS)
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
]) # XORG_CWARNFLAGS
# XORG_STRICT_OPTION
# -----------------------
# Minimum version: 1.3.0
#
# Add configure option to enable strict compilation
AC_DEFUN([XORG_STRICT_OPTION], [
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_PROG_CC_C99])
AC_REQUIRE([XORG_CWARNFLAGS])
AC_ARG_ENABLE(strict-compilation,
AS_HELP_STRING([--enable-strict-compilation],
[Enable all warnings from compiler and make them errors (default: disabled)]),
[STRICT_COMPILE=$enableval], [STRICT_COMPILE=no])
if test "x$STRICT_COMPILE" = "xyes"; then
AC_CHECK_DECL([__SUNPRO_C], [SUNCC="yes"], [SUNCC="no"])
AC_CHECK_DECL([__INTEL_COMPILER], [INTELCC="yes"], [INTELCC="no"])
if test "x$GCC" = xyes ; then
STRICT_CFLAGS="-pedantic -Werror"
elif test "x$SUNCC" = "xyes"; then
STRICT_CFLAGS="-errwarn"
elif test "x$INTELCC" = "xyes"; then
STRICT_CFLAGS="-Werror"
fi
fi
CWARNFLAGS="$CWARNFLAGS $STRICT_CFLAGS"
AC_SUBST([CWARNFLAGS])
]) # XORG_STRICT_OPTION
# XORG_DEFAULT_OPTIONS
# --------------------
# Minimum version: 1.3.0
#
# Defines default options for X.Org modules.
#
AC_DEFUN([XORG_DEFAULT_OPTIONS], [
XORG_CWARNFLAGS
XORG_STRICT_OPTION
XORG_RELEASE_VERSION
XORG_CHANGELOG
XORG_MANPAGE_SECTIONS
]) # XORG_DEFAULT_OPTIONS
dnl Copyright 2005 Red Hat, Inc
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
dnl copyright notice and this permission notice appear in supporting
dnl documentation.
dnl
dnl The above copyright notice and this permission notice shall be included
dnl in all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
dnl OTHER DEALINGS IN THE SOFTWARE.
dnl
dnl Except as contained in this notice, the name of the copyright holders shall
dnl not be used in advertising or otherwise to promote the sale, use or
dnl other dealings in this Software without prior written authorization
dnl from the copyright holders.
dnl
# XORG_RELEASE_VERSION
# --------------------
# Adds --with/without-release-string and changes the PACKAGE and
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
AC_ARG_WITH(release-version,
AS_HELP_STRING([--with-release-version=STRING],
[Use release version string in package name]),
[RELEASE_VERSION="$withval"],
[RELEASE_VERSION=""])
if test "x$RELEASE_VERSION" != "x"; then
PACKAGE="$PACKAGE-$RELEASE_VERSION"
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM],
[Minor version of this package])
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
[$PVP],
[Patch version of this package])
])
# XORG_CHANGELOG()
# ----------------
# Minimum version: 1.2.0
#
# Defines the variable CHANGELOG_CMD as the command to generate
# ChangeLog from git.
#
# Arrange that distcleancheck ignores ChangeLog left over by distclean.
#
AC_DEFUN([XORG_CHANGELOG], [
CHANGELOG_CMD="(GIT_DIR=\$(top_srcdir)/.git git log > .changelog.tmp && \
mv .changelog.tmp ChangeLog) || (rm -f .changelog.tmp; touch ChangeLog; \
echo 'git directory not found: installing possibly empty changelog.' >&2)"
AC_SUBST([CHANGELOG_CMD])
AC_SUBST([distcleancheck_listfiles], ['find . -type f ! -name ChangeLog -print'])
]) # XORG_CHANGELOG
dnl Copyright 2005 Red Hat, Inc
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
@ -8106,65 +8260,3 @@ AC_DEFUN([XORG_DRIVER_CHECK_EXT],[
fi
])
dnl Copyright 2005 Red Hat, Inc
dnl
dnl Permission to use, copy, modify, distribute, and sell this software and its
dnl documentation for any purpose is hereby granted without fee, provided that
dnl the above copyright notice appear in all copies and that both that
dnl copyright notice and this permission notice appear in supporting
dnl documentation.
dnl
dnl The above copyright notice and this permission notice shall be included
dnl in all copies or substantial portions of the Software.
dnl
dnl THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
dnl OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
dnl MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
dnl IN NO EVENT SHALL THE OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR
dnl OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
dnl ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
dnl OTHER DEALINGS IN THE SOFTWARE.
dnl
dnl Except as contained in this notice, the name of the copyright holders shall
dnl not be used in advertising or otherwise to promote the sale, use or
dnl other dealings in this Software without prior written authorization
dnl from the copyright holders.
dnl
# XORG_RELEASE_VERSION
# --------------------
# Adds --with/without-release-string and changes the PACKAGE and
# PACKAGE_TARNAME to use "$PACKAGE{_TARNAME}-$RELEASE_VERSION". If
# no option is given, PACKAGE and PACKAGE_TARNAME are unchanged. Also
# defines PACKAGE_VERSION_{MAJOR,MINOR,PATCHLEVEL} for modules to use.
AC_DEFUN([XORG_RELEASE_VERSION],[
AC_ARG_WITH(release-version,
AC_HELP_STRING([--with-release-version=STRING],
[Use release version string in package name]),
[RELEASE_VERSION="$withval"],
[RELEASE_VERSION=""])
if test "x$RELEASE_VERSION" != "x"; then
PACKAGE="$PACKAGE-$RELEASE_VERSION"
PACKAGE_TARNAME="$PACKAGE_TARNAME-$RELEASE_VERSION"
AC_MSG_NOTICE([Building with package name set to $PACKAGE])
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MAJOR],
[`echo $PACKAGE_VERSION | cut -d . -f 1`],
[Major version of this package])
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_MINOR],
[$PVM],
[Minor version of this package])
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
AC_DEFINE_UNQUOTED([PACKAGE_VERSION_PATCHLEVEL],
[$PVP],
[Patch version of this package])
])

View File

@ -32,6 +32,12 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* xextproto 7.1 available */
#undef HAVE_XEXTPROTO_71
/* Have xf86XVFillKeyHelperDrawable prototype */
#undef HAVE_XV_DRAWABLE_HELPER
/* Name of package */
#undef PACKAGE

File diff suppressed because it is too large Load Diff

View File

@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-savage],
2.2.1,
2.3.1,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-savage)
@ -60,6 +60,10 @@ XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto)
# Checks for pkg-config packages
PKG_CHECK_MODULES(XORG, [xorg-server >= 1.1.0 xproto fontsproto $REQUIRED_MODULES])
PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
HAVE_XEXTPROTO_71="no")
AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ])
sdkdir=$(pkg-config --variable=sdkdir xorg-server)
# Checks for libraries.
@ -100,6 +104,10 @@ CFLAGS="$XORG_CFLAGS"
AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
[XSERVER_LIBPCIACCESS=yes], [XSERVER_LIBPCIACCESS=no],
[#include "xorg-server.h"])
AC_CHECK_DECL(xf86XVFillKeyHelperDrawable,
[AC_DEFINE(HAVE_XV_DRAWABLE_HELPER, 1, [Have xf86XVFillKeyHelperDrawable prototype])],
[],
[#include "xf86xv.h"])
CFLAGS="$save_CFLAGS"
if test "x$XSERVER_LIBPCIACCESS" = xyes; then

View File

@ -2127,17 +2127,6 @@ EOF
;;
esac
for pass in $passes; do
# The preopen pass in lib mode reverses $deplibs; put it back here
# so that -L comes before libs that need it for instance...
if test "$linkmode,$pass" = "lib,link"; then
## FIXME: Find the place where the list is rebuilt in the wrong
## order, and fix it there properly
tmp_deplibs=
for deplib in $deplibs; do
tmp_deplibs="$deplib $tmp_deplibs"
done
deplibs="$tmp_deplibs"
fi
if test "$linkmode,$pass" = "lib,link" ||
test "$linkmode,$pass" = "prog,scan"; then
libs="$deplibs"

View File

@ -126,6 +126,9 @@ F77 = @F77@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
HAVE_XEXTPROTO_71_FALSE = @HAVE_XEXTPROTO_71_FALSE@
HAVE_XEXTPROTO_71_TRUE = @HAVE_XEXTPROTO_71_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -162,19 +165,15 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@
XEXT_LIBS = @XEXT_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -191,24 +190,31 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@ -139,6 +139,13 @@ driver use your mode line timing exactly, turn off the UseBios option.
Use of the BIOS is required for dualhead operation.
Default: on (use the BIOS).
.TP
.BI "Option \*qIgnoreEDID\*q \*q" boolean \*q
Do not use EDID data for mode validation, but DDC is still used
for monitor detection. This is different from NoDDC option.
.br
The default value is
.B off.
.TP
.BI "Option \*qShadowStatus\*q \*q" boolean \*q
Enables the use of a shadow status register. There is a chip bug in the
Savage graphics engine that can cause a bus lock when reading the engine
@ -162,8 +169,30 @@ applies to Savage4 and newer chips. Default: \*qoff\*q (use COB).
.BI "Option \*qBCIforXv\*q \*q" boolean \*q
Use the BCI to copy and reformat Xv pixel data. Using the BCI for Xv causes
graphics artifacts on some chips. This option only applies to Savage4 and
prosavage/twister chips. Default: on for prosavage and twister (use BCI for Xv);
off for savage4 (do not use the BCI for Xv).
prosavage/twister chips. On some combinations of chipsets and video players,
BCI formatting might actually be slower than software formatting (\*qAGPforXv\*q
might help in this case). BCI formatting can only be used on video data with
a width that is a multiple of 16 pixels (which is the vast majority of videos).
Other widths are handled through software formatting. Default: on for prosavage
and twister (use BCI for Xv); off for savage4 (do not use the BCI for Xv).
.TP
.BI "Option \*qAGPforXv\*q \*q" boolean \*q
Instructs the BCI Xv pixel formatter to use AGP memory as a scratch buffer.
Ordinarily the BCI formatter uses a an area in framebuffer memory to hold
YV12 planar data to be converted for display. This requires a somewhat expensive
upload of YV12 data to framebuffer memory. The \*qAGPforXv\*q option causes the BCI
formatter to place the YV12 data in AGP memory instead, which can be uploaded
faster than the framebuffer. Use of this option cuts upload overhead by 25%
according to benchmarks. This option also smooths out most of the shearing
present when using BCI for pixel conversion. Currently this option is
.B experimental
and is disabled by default. Video width restrictions that apply to \*qBCIforXv\*q
also apply here. Only valid when \*qDRI\*q and \*qBCIforXv\*q are both active,
and only on AGP chipsets. Default: \*qoff\*q.
.br
If \*qAccelMethod\*q is set to \*qEXA\*q and \*qAGPforXv\*q is enabled, then the
driver will also attempt to reuse the AGP scratch buffer for UploadToScreen
acceleration.
.TP
.BI "Option \*qAGPMode\*q \*q" integer \*q
Set AGP data transfer rate.
@ -228,7 +257,7 @@ Default: \*qon\*q (enable DRI).
.SH FILES
savage_drv.o
.SH "SEE ALSO"
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), xorgconfig(__appmansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
__xservername__(__appmansuffix__), __xconfigfile__(__filemansuffix__), Xserver(__appmansuffix__), X(__miscmansuffix__)
.SH AUTHORS
Authors include Tim Roberts (timr@probo.com) and Ani Joshi (ajoshi@unixbox.com)
for this version, and Tim Roberts and S. Marineau for the original driver from

View File

@ -153,6 +153,9 @@ F77 = @F77@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@
HAVE_XEXTPROTO_71_FALSE = @HAVE_XEXTPROTO_71_FALSE@
HAVE_XEXTPROTO_71_TRUE = @HAVE_XEXTPROTO_71_TRUE@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
@ -189,19 +192,15 @@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@
STRIP = @STRIP@
VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@
XEXT_LIBS = @XEXT_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@
XSERVER_LIBPCIACCESS_FALSE = @XSERVER_LIBPCIACCESS_FALSE@
XSERVER_LIBPCIACCESS_TRUE = @XSERVER_LIBPCIACCESS_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_DSYMUTIL = @ac_ct_DSYMUTIL@
ac_ct_F77 = @ac_ct_F77@
ac_ct_NMEDIT = @ac_ct_NMEDIT@
ac_ct_RANLIB = @ac_ct_RANLIB@
ac_ct_STRIP = @ac_ct_STRIP@
ac_pt_PKG_CONFIG = @ac_pt_PKG_CONFIG@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@ -218,24 +217,31 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = @docdir@
dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
moduledir = @moduledir@
oldincludedir = @oldincludedir@
pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@

View File

@ -1537,6 +1537,32 @@ SavageInitAccel(ScreenPtr pScreen)
return SavageXAAInit(pScreen);
}
int SavageGetCopyROP(int rop) {
int ALUCopyROP[16] =
{
0x00, /*ROP_0 GXclear */
0x88, /*ROP_DSa GXand */
0x44, /*ROP_SDna GXandReverse */
0xCC, /*ROP_S GXcopy */
0x22, /*ROP_DSna GXandInverted */
0xAA, /*ROP_D GXnoop */
0x66, /*ROP_DSx GXxor */
0xEE, /*ROP_DSo GXor */
0x11, /*ROP_DSon GXnor */
0x99, /*ROP_DSxn GXequiv */
0x55, /*ROP_Dn GXinvert*/
0xDD, /*ROP_SDno GXorReverse */
0x33, /*ROP_Sn GXcopyInverted */
0xBB, /*ROP_DSno GXorInverted */
0x77, /*ROP_DSan GXnand */
0xFF, /*ROP_1 GXset */
};
return (ALUCopyROP[rop]);
}
/* Routines for debugging. */

View File

@ -520,6 +520,15 @@ static Bool SAVAGEDRIAgpInit(ScreenPtr pScreen)
}
}
if (psav->AGPforXv) {
pSAVAGEDRIServer->agpXVideo.offset = offset;
pSAVAGEDRIServer->agpXVideo.size = 2 * 1024 * 1024; /* Max XV image is 1024x1024x16bpp */
offset += pSAVAGEDRIServer->agpXVideo.size;
} else {
pSAVAGEDRIServer->agpXVideo.offset = 0;
pSAVAGEDRIServer->agpXVideo.size = 0;
}
pSAVAGEDRIServer->agpTextures.offset = offset;
pSAVAGEDRIServer->agpTextures.size = (pSAVAGEDRIServer->agp.size - offset);
@ -581,6 +590,25 @@ static Bool SAVAGEDRIAgpInit(ScreenPtr pScreen)
}
}
/* XVideo buffer
*/
if (pSAVAGEDRIServer->agpXVideo.size != 0) {
if ( drmAddMap( psav->drmFD,
pSAVAGEDRIServer->agpXVideo.offset,
pSAVAGEDRIServer->agpXVideo.size,
DRM_AGP, 0,
&pSAVAGEDRIServer->agpXVideo.handle ) < 0 ) {
xf86DrvMsg( pScreen->myNum, X_ERROR,
"[agp] Could not add agpXVideo, will use framebuffer upload (slower) \n" );
pSAVAGEDRIServer->agpXVideo.size = 0;
pSAVAGEDRIServer->agpXVideo.handle = 0;
} else {
xf86DrvMsg( pScreen->myNum, X_INFO,
"[agp] agpXVideo handle = 0x%08lx\n",
pSAVAGEDRIServer->agpXVideo.handle );
}
}
/* AGP textures
*/
if ( drmAddMap( psav->drmFD,
@ -1278,6 +1306,12 @@ void SAVAGEDRICloseScreen( ScreenPtr pScreen )
pSAVAGEDRIServer->aperture.map = NULL;
}
if ( pSAVAGEDRIServer->agpXVideo.map ) {
drmUnmap( pSAVAGEDRIServer->agpXVideo.map,
pSAVAGEDRIServer->agpXVideo.size );
pSAVAGEDRIServer->agpXVideo.map = NULL;
}
if ( pSAVAGEDRIServer->agpTextures.map ) {
drmUnmap( pSAVAGEDRIServer->agpTextures.map,
pSAVAGEDRIServer->agpTextures.size );
@ -1293,6 +1327,9 @@ void SAVAGEDRICloseScreen( ScreenPtr pScreen )
if (pSAVAGEDRIServer->aperture.handle)
drmRmMap(psav->drmFD,pSAVAGEDRIServer->registers.handle);
if (pSAVAGEDRIServer->agpXVideo.handle)
drmRmMap(psav->drmFD,pSAVAGEDRIServer->agpXVideo.handle);
if (pSAVAGEDRIServer->agpTextures.handle)
drmRmMap(psav->drmFD,pSAVAGEDRIServer->agpTextures.handle);
@ -1541,6 +1578,9 @@ SAVAGEDRIMoveBuffers(WindowPtr pParent, DDXPointRec ptOldOrg,
psav->AccelInfoRec->NeedToSync = TRUE;
}
/* Definition in savage_accel.c */
int SavageGetCopyROP(int rop);
static void
SAVAGEDRISetupForScreenToScreenCopy(
ScrnInfoPtr pScrn,
@ -1554,7 +1594,7 @@ SAVAGEDRISetupForScreenToScreenCopy(
int cmd =0;
cmd = BCI_CMD_RECT | BCI_CMD_DEST_PBD | BCI_CMD_SRC_PBD_COLOR;
BCI_CMD_SET_ROP( cmd, XAAGetCopyROP(rop) );
BCI_CMD_SET_ROP( cmd, SavageGetCopyROP(rop) );
if (transparency_color != -1)
cmd |= BCI_CMD_SEND_COLOR | BCI_CMD_SRC_TRANSPARENT;

View File

@ -42,12 +42,16 @@
#include <unistd.h>
#include <errno.h>
#include "xf86RAC.h"
#include "shadowfb.h"
#include "globals.h"
#ifdef HAVE_XEXTPROTO_71
#include <X11/extensions/dpmsconst.h>
#else
#define DPMS_SERVER
#include <X11/extensions/dpms.h>
#endif
#include "xf86xv.h"
@ -56,6 +60,10 @@
#include "savage_bci.h"
#include "savage_streams.h"
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
#include "xf86RAC.h"
#endif
#define TRANSPARENCY_KEY 0xff;
#ifdef XF86DRI
@ -278,6 +286,7 @@ typedef enum {
,OPTION_AGP_SIZE
,OPTION_DRI
,OPTION_IGNORE_EDID
,OPTION_AGP_FOR_XV
} SavageOpts;
@ -312,6 +321,7 @@ static const OptionInfoRec SavageOptions[] =
{ OPTION_AGP_MODE, "AGPMode", OPTV_INTEGER, {0}, FALSE },
{ OPTION_AGP_SIZE, "AGPSize", OPTV_INTEGER, {0}, FALSE },
{ OPTION_DRI, "DRI", OPTV_BOOLEAN, {0}, TRUE },
{ OPTION_AGP_FOR_XV, "AGPforXv", OPTV_BOOLEAN, {0}, FALSE },
#endif
{ -1, NULL, OPTV_NONE, {0}, FALSE }
};
@ -337,178 +347,6 @@ _X_EXPORT DriverRec SAVAGE =
#endif
};
static const char *vgaHWSymbols[] = {
"vgaHWBlankScreen",
"vgaHWCopyReg",
"vgaHWGetHWRec",
"vgaHWGetIOBase",
"vgaHWGetIndex",
"vgaHWInit",
"vgaHWLock",
"vgaHWProtect",
"vgaHWRestore",
"vgaHWSave",
"vgaHWSaveScreen",
"vgaHWSetMmioFuncs",
"vgaHWSetStdFuncs",
"vgaHWUnmapMem",
"vgaHWddc1SetSpeedWeak",
#if 0
"vgaHWFreeHWRec",
"vgaHWMapMem",
"vgaHWUnlock",
#endif
NULL
};
#ifdef XF86DRI
static const char *drmSymbols[] = {
"drmAvailable",
"drmAddBufs",
"drmAddMap",
"drmCtlInstHandler",
"drmGetInterruptFromBusID",
"drmFreeVersion",
"drmGetVersion",
"drmMap",
"drmUnmap",
"drmMapBufs",
"drmUnmapBufs",
"drmAgpAcquire",
"drmAgpRelease",
"drmAgpEnable",
"drmAgpAlloc",
"drmAgpFree",
"drmAgpBind",
"drmAgpUnbind",
"drmAgpGetMode",
"drmAgpBase",
"drmAgpSize",
"drmAgpVendorId",
"drmAgpDeviceId",
"drmMGAInitDMA",
"drmMGACleanupDMA",
"drmMGAFlushDMA",
"drmMGAEngineReset",
NULL
};
static const char *driSymbols[] = {
"DRIGetDrawableIndex",
"DRIFinishScreenInit",
"DRIDestroyInfoRec",
"DRICloseScreen",
"DRIDestroyInfoRec",
"DRIScreenInit",
"DRIDestroyInfoRec",
"DRICreateInfoRec",
"DRILock",
"DRIUnlock",
"DRIGetSAREAPrivate",
"DRIGetContext",
"DRIQueryVersion",
"DRIAdjustFrame",
"DRIOpenFullScreen",
"DRICloseFullScreen",
"GlxSetVisualConfigs",
NULL
};
#endif
static const char *ramdacSymbols[] = {
"xf86CreateCursorInfoRec",
#if 0
"xf86DestroyCursorInfoRec",
#endif
"xf86InitCursor",
NULL
};
static const char *int10Symbols[] = {
"xf86ExecX86int10",
"xf86Int10AllocPages",
"xf86int10Addr",
"xf86Int10FreePages"
};
static const char *vbeSymbols[] = {
"VBEInit",
"vbeDoEDID",
#if 0
"vbeFree",
#endif
NULL
};
static const char *vbeOptSymbols[] = {
"vbeModeInit",
"VBESetVBEMode",
"VBEGetVBEInfo",
"VBEFreeVBEInfo",
NULL
};
static const char *ddcSymbols[] = {
"xf86DoEDID_DDC1",
"xf86DoEDID_DDC2",
"xf86PrintEDID",
"xf86SetDDCproperties",
NULL
};
static const char *i2cSymbols[] = {
"xf86CreateI2CBusRec",
"xf86I2CBusInit",
"xf86CreateI2CDevRec",
"xf86I2CDevInit",
"xf86I2CWriteByte",
"xf86I2CWriteBytes",
"xf86I2CReadByte",
"xf86I2CReadBytes",
"xf86I2CWriteRead",
"xf86DestroyI2CDevRec",
NULL
};
static const char *xaaSymbols[] = {
"XAAGetCopyROP",
"XAAGetCopyROP_PM",
"XAACreateInfoRec",
"XAADestroyInfoRec",
"XAAFillSolidRects",
"XAAHelpPatternROP",
"XAAHelpSolidROP",
"XAAInit",
"XAAScreenIndex",
NULL
};
static const char *exaSymbols[] = {
"exaDriverAlloc",
"exaDriverInit",
"exaDriverFini",
"exaOffscreenAlloc",
"exaOffscreenFree",
"exaGetPixmapOffset",
"exaGetPixmapPitch",
"exaGetPixmapSize",
NULL
};
static const char *shadowSymbols[] = {
"ShadowFBInit",
NULL
};
static const char *fbSymbols[] = {
"fbPictureInit",
"fbScreenInit",
NULL
};
#ifdef XFree86LOADER
static MODULESETUPPROTO(SavageSetup);
@ -540,14 +378,6 @@ static pointer SavageSetup(pointer module, pointer opts, int *errmaj,
if (!setupDone) {
setupDone = TRUE;
xf86AddDriver(&SAVAGE, module, 1);
LoaderRefSymLists(vgaHWSymbols, fbSymbols, ramdacSymbols,
xaaSymbols,
exaSymbols,
shadowSymbols, vbeSymbols, vbeOptSymbols,
#ifdef XF86DRI
drmSymbols, driSymbols,
#endif
int10Symbols, i2cSymbols, ddcSymbols, NULL);
return (pointer) 1;
} else {
if (errmaj)
@ -853,7 +683,7 @@ static Bool SavagePciProbe(DriverPtr drv, int entity_num,
}
pScrn = xf86ConfigPciEntity(NULL, 0, entity_num, NULL,
RES_SHARED_VGA, NULL, NULL, NULL, NULL);
NULL, NULL, NULL, NULL, NULL);
if (pScrn != NULL) {
EntityInfoPtr pEnt;
SavagePtr psav;
@ -1050,7 +880,6 @@ static void SavageDoDDC(ScrnInfoPtr pScrn)
/* Do the DDC dance. */ /* S3/VIA's DDC code */
ddc = xf86LoadSubModule(pScrn, "ddc");
if (ddc) {
xf86LoaderReqSymLists(ddcSymbols, NULL);
switch( psav->Chipset ) {
case S3_SAVAGE3D:
case S3_SAVAGE_MX:
@ -1072,7 +901,6 @@ static void SavageDoDDC(ScrnInfoPtr pScrn)
if (!SavageDDC1(pScrn->scrnIndex)) {
/* DDC1 failed,switch to DDC2 */
if (xf86LoadSubModule(pScrn, "i2c")) {
xf86LoaderReqSymLists(i2cSymbols,NULL);
if (SavageI2CInit(pScrn)) {
unsigned char tmp;
xf86MonPtr pMon;
@ -1274,7 +1102,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
if (!xf86LoadSubModule(pScrn, "vgahw"))
return FALSE;
xf86LoaderReqSymLists(vgaHWSymbols, NULL);
if (!vgaHWGetHWRec(pScrn))
return FALSE;
@ -1569,21 +1396,24 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
}
pEnt = xf86GetEntityInfo(pScrn->entityList[0]);
#ifndef XSERVER_LIBPCIACCESS
if (pEnt->resources) {
xfree(pEnt);
SavageFreeRec(pScrn);
return FALSE;
}
#endif
psav->EntityIndex = pEnt->index;
if (xf86LoadSubModule(pScrn, "vbe")) {
xf86LoaderReqSymLists(vbeSymbols, NULL);
psav->pVbe = VBEInit(NULL, pEnt->index);
}
#ifndef XSERVER_LIBPCIACCESS
xf86RegisterResources(pEnt->index, NULL, ResNone);
xf86SetOperatingState(resVgaIo, pEnt->index, ResUnusedOpr);
xf86SetOperatingState(resVgaMem, pEnt->index, ResDisableOpr);
#endif
from = X_DEFAULT;
if (pEnt->device->chipset && *pEnt->device->chipset) {
@ -1870,6 +1700,20 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
"%s DVI port support (Savage4 only)\n",(psav->dvi?"Force":"Disable"));
}
psav->AGPforXv = FALSE;
#ifdef XF86DRI
if (xf86GetOptValBool(psav->Options, OPTION_AGP_FOR_XV, &psav->AGPforXv)) {
if (psav->AGPforXv) {
if (psav->agpSize == 0) {
psav->AGPforXv = FALSE;
xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "AGP not available, cannot use AGP for Xv\n");
}
}
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG,
"Option: %s use of AGP buffer for Xv\n",(psav->AGPforXv?"Enable":"Disable"));
}
#endif
/* Add more options here. */
@ -2190,10 +2034,11 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
/* Check LCD panel information */
if(psav->DisplayType == MT_LCD)
{
SavageGetPanelInfo(pScrn);
/* DisplayType will be reset if panel is not active */
if(psav->DisplayType == MT_LCD)
SavageAddPanelMode(pScrn);
}
#if 0
if (psav->CrtOnly && !psav->UseBIOS) {
@ -2296,16 +2141,11 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
xf86LoaderReqSymLists(fbSymbols, NULL);
if( !psav->NoAccel ) {
char *modName = NULL;
const char **symNames = NULL;
if (psav->useEXA) {
modName = "exa";
symNames = exaSymbols;
XF86ModReqInfo req;
int errmaj, errmin;
memset(&req, 0, sizeof(req));
@ -2322,7 +2162,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
}
} else {
modName = "xaa";
symNames = xaaSymbols;
if( !xf86LoadSubModule(pScrn, modName) ) {
SavageFreeRec(pScrn);
vbeFree(psav->pVbe);
@ -2330,9 +2169,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
return FALSE;
}
}
xf86LoaderReqSymLists(symNames, NULL );
}
if (psav->hwcursor) {
@ -2342,7 +2178,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
psav->pVbe = NULL;
return FALSE;
}
xf86LoaderReqSymLists(ramdacSymbols, NULL);
}
if (psav->shadowFB) {
@ -2352,7 +2187,6 @@ static Bool SavagePreInit(ScrnInfoPtr pScrn, int flags)
psav->pVbe = NULL;
return FALSE;
}
xf86LoaderReqSymLists(shadowSymbols, NULL);
}
vbeFree(psav->pVbe);
@ -3678,6 +3512,11 @@ static Bool SavageScreenInit(int scrnIndex, ScreenPtr pScreen,
else
xf86DrvMsg(pScrn->scrnIndex,X_CONFIG,"XvMC is not enabled\n");
}
if (!psav->directRenderingEnabled && psav->AGPforXv) {
xf86DrvMsg(pScrn->scrnIndex,X_ERROR,"AGPforXV requires DRI to be enabled.\n");
psav->AGPforXv = FALSE;
}
#endif
if (serverGeneration == 1)
@ -4720,7 +4559,6 @@ SavageProbeDDC(ScrnInfoPtr pScrn, int index)
vbeInfoPtr pVbe;
if (xf86LoadSubModule(pScrn, "vbe")) {
xf86LoaderReqSymLists(vbeSymbols, NULL);
pVbe = VBEInit(NULL, index);
ConfiguredMonitor = vbeDoEDID(pVbe, NULL);
vbeFree(pVbe);

View File

@ -51,7 +51,9 @@
#include "compiler.h"
#include "vgaHW.h"
#include "xf86.h"
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 6
#include "xf86Resources.h"
#endif
#include "xf86Pci.h"
#include "xf86PciInfo.h"
#include "xf86_OSproc.h"
@ -136,6 +138,9 @@ typedef struct _server{
/* command DMA */
drmRegion cmdDma;
/* XVideo through AGP */
drmRegion agpXVideo;
} SAVAGEDRIServerPrivateRec, *SAVAGEDRIServerPrivatePtr;
#endif
@ -486,6 +491,7 @@ typedef struct _Savage {
Bool bDisableXvMC;
Bool AGPforXv;
#endif
Bool disableCOB;

View File

@ -69,31 +69,8 @@ SavageDownloadFromScreen(PixmapPtr pSrc, int x, int y, int w, int h, char *dst,
#define GXset 0xFF
#endif
static int SavageGetCopyROP(int rop) {
int ALUCopyROP[16] =
{
0x00, /*ROP_0 GXclear */
0x88, /*ROP_DSa GXand */
0x44, /*ROP_SDna GXandReverse */
0xCC, /*ROP_S GXcopy */
0x22, /*ROP_DSna GXandInverted */
0xAA, /*ROP_D GXnoop */
0x66, /*ROP_DSx GXxor */
0xEE, /*ROP_DSo GXor */
0x11, /*ROP_DSon GXnor */
0x99, /*ROP_DSxn GXequiv */
0x55, /*ROP_Dn GXinvert*/
0xDD, /*ROP_SDno GXorReverse */
0x33, /*ROP_Sn GXcopyInverted */
0xBB, /*ROP_DSno GXorInverted */
0x77, /*ROP_DSan GXnand */
0xFF, /*ROP_1 GXset */
};
return (ALUCopyROP[rop]);
}
/* Definition moved to savage_accel.c */
int SavageGetCopyROP(int rop);
static int SavageGetSolidROP(int rop) {
@ -382,7 +359,7 @@ SavagePrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, int ydir
/*ErrorF("in preparecopy\n");*/
cmd = BCI_CMD_RECT | BCI_CMD_DEST_PBD_NEW | BCI_CMD_SRC_SBD_COLOR_NEW;
cmd = BCI_CMD_RECT | BCI_CMD_DEST_PBD | BCI_CMD_SRC_SBD_COLOR;
BCI_CMD_SET_ROP( cmd, SavageGetCopyROP(alu) );
@ -397,18 +374,23 @@ SavagePrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, int ydir
psav->SavedBciCmd = cmd;
psav->WaitQueue(psav,7);
psav->WaitQueue(psav,8);
BCI_SEND(BCI_SET_REGISTER
| BCI_SET_REGISTER_COUNT(1)
| BCI_BITPLANE_WRITE_MASK);
BCI_SEND(planemask);
BCI_SEND(psav->SavedBciCmd);
/* src */
BCI_SEND(BCI_SET_REGISTER
| BCI_SET_REGISTER_COUNT(2)
| BCI_SBD_1);
BCI_SEND(psav->sbd_offset);
BCI_SEND(psav->sbd_high);
/* dst */
BCI_SEND(BCI_SET_REGISTER
| BCI_SET_REGISTER_COUNT(2)
| BCI_PBD_1);
BCI_SEND(psav->pbd_offset);
BCI_SEND(psav->pbd_high);
@ -437,7 +419,8 @@ SavageCopy(PixmapPtr pDstPixmap, int srcX, int srcY, int dstX, int dstY, int wid
height ++;
}
psav->WaitQueue(psav,4);
psav->WaitQueue(psav,5);
BCI_SEND(psav->SavedBciCmd);
BCI_SEND(BCI_X_Y(srcX, srcY));
BCI_SEND(BCI_X_Y(dstX, dstY));
BCI_SEND(BCI_W_H(width, height));
@ -457,10 +440,73 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
BCI_GET_PTR;
int i, j, dwords, queue, Bpp;
unsigned int cmd;
CARD32 * srcp;
CARD32 * srcp;
unsigned int dst_pitch;
unsigned int dst_yoffset;
int agp_possible;
exaWaitSync(pDst->drawable.pScreen);
Bpp = pDst->drawable.bitsPerPixel / 8;
/* Test for conditions for AGP Mastered Image Transfer (MIT). AGP memory
needs to be available, the XVideo AGP needs to be enabled, the
framebuffer destination must be a multiple of 32 bytes, and the source
pitch must span the entirety of the destination pitch. This last
condition allows the code to consider this upload as equivalent to a
plain memcpy() call. */
dst_pitch = exaGetPixmapPitch(pDst);
dst_yoffset = exaGetPixmapOffset(pDst) + y * dst_pitch;
agp_possible =
(!psav->IsPCI && psav->drmFD > 0 && psav->DRIServerInfo != NULL &&
psav->DRIServerInfo->agpXVideo.size > 0 &&
x == 0 && src_pitch == dst_pitch && w * Bpp == dst_pitch &&
(dst_yoffset & 0x1f) == 0);
if (agp_possible) {
SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo;
if (pSAVAGEDRIServer->agpXVideo.map != NULL ||
0 <= drmMap( psav->drmFD,
pSAVAGEDRIServer->agpXVideo.handle,
pSAVAGEDRIServer->agpXVideo.size,
&pSAVAGEDRIServer->agpXVideo.map)) {
unsigned char * agpMap = pSAVAGEDRIServer->agpXVideo.map;
unsigned int agpOffset = drmAgpBase(psav->drmFD) + pSAVAGEDRIServer->agpXVideo.offset;
unsigned int bytesTotal = dst_pitch * h;
while (bytesTotal > 0) {
unsigned int bytesTransfer =
(bytesTotal > pSAVAGEDRIServer->agpXVideo.size)
? pSAVAGEDRIServer->agpXVideo.size
: bytesTotal;
unsigned int qwordsTransfer = bytesTransfer >> 3;
/* Copy source into AGP buffer */
memcpy(agpMap, src, bytesTransfer);
psav->WaitQueue(psav,6);
BCI_SEND(BCI_SET_REGISTER | BCI_SET_REGISTER_COUNT(2) | 0x51);
BCI_SEND(agpOffset | 3); /* Source buffer in AGP memory */
BCI_SEND(dst_yoffset); /* Destination buffer in framebuffer */
BCI_SEND(BCI_SET_REGISTER | BCI_SET_REGISTER_COUNT(1) | 0x50);
BCI_SEND(0x00000002 | ((qwordsTransfer - 1) << 3)); /* Select MIT, sysmem to framebuffer */
/* I want to wait here for any reads from AGP memory and any
framebuffer writes performed by the MIT to stop. */
BCI_SEND(0xC0000000 | ((0x08 | 0x01) << 16));
bytesTotal -= bytesTransfer;
src += bytesTransfer;
dst_yoffset += bytesTransfer;
}
exaMarkSync(pDst->drawable.pScreen);
return TRUE;
}
}
/* If we reach here, AGP transfer is not possible, or failed to drmMap() */
psav->sbd_offset = exaGetPixmapOffset(pDst);
psav->sbd_high = SavageSetBD(psav, pDst);
@ -489,19 +535,27 @@ SavageUploadToScreen(PixmapPtr pDst, int x, int y, int w, int h, char *src, int
dwords = (((w * Bpp) + 3) >> 2);
for (i = 0; i < h; i++) {
srcp = (CARD32 *)src;
for (j = 0; j < dwords; j++) {
if (queue < 4) {
BCI_RESET;
queue = 120 * 1024;
if (4 * dwords <= queue) {
/* WARNING: breaking BCI_PTR abstraction here */
memcpy(bci_ptr, srcp, 4 * dwords);
bci_ptr += dwords;
queue -= 4 * dwords;
} else {
for (j = 0; j < dwords; j++) {
if (queue < 4) {
BCI_RESET;
queue = 120 * 1024;
}
BCI_SEND(*srcp++);
queue -= 4;
}
BCI_SEND(*srcp++);
queue -= 4;
}
src += src_pitch;
}
/*exaWaitSync(pDst->drawable.pScreen);*/
exaMarkSync(pDst->drawable.pScreen);
return TRUE;
}

View File

@ -28,7 +28,6 @@
#include "xf86.h"
#include "xf86_OSproc.h"
#include "xf86Resources.h"
#include "compiler.h"
#include "xf86PciInfo.h"
#include "xf86Pci.h"

View File

@ -241,9 +241,16 @@ typedef struct {
Time freeTime;
int lastKnownPitch;
int size;
void *video_memory;
int video_offset;
void *video_memory; /* opaque memory management information structure */
CARD32 video_offset; /* offset in video memory of packed YUV buffer */
void *video_planarmem; /* opaque memory management information structure */
CARD32 video_planarbuf; /* offset in video memory of planar YV12 buffer */
Bool tried_agp; /* TRUE if AGP allocation has been tried */
CARD32 agpBase; /* Physical address of aperture base */
CARD32 agpBufferOffset; /* Offset of buffer in AGP memory, or 0 if unavailable */
drmAddress agpBufferMap; /* Mapping of AGP buffer in process memory, or NULL */
} SavagePortPrivRec, *SavagePortPrivPtr;
@ -1028,7 +1035,8 @@ static void
SavageStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
{
SavagePortPrivPtr pPriv = (SavagePortPrivPtr)data;
/*SavagePtr psav = SAVPTR(pScrn); */
SavagePtr psav = SAVPTR(pScrn);
ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
xf86ErrorFVerb(XVTRACE,"SavageStopVideo\n");
@ -1037,11 +1045,29 @@ SavageStopVideo(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
if(shutdown) {
/*SavageClipVWindow(pScrn);*/
SavageStreamsOff( pScrn );
if (pPriv->agpBufferMap != NULL) {
SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo;
/* agpXVideo is reused to implement UploadToScreen in EXA */
if (!psav->useEXA) {
drmUnmap(pPriv->agpBufferMap, pSAVAGEDRIServer->agpXVideo.size);
pSAVAGEDRIServer->agpXVideo.map = NULL;
}
pPriv->agpBufferMap = NULL;
pPriv->agpBufferOffset = 0;
}
if (pPriv->video_memory != NULL) {
SavageFreeMemory(pScrn, pPriv->video_memory);
pPriv->video_memory = NULL;
}
if (pPriv->video_planarmem != NULL) {
SavageFreeMemory(pScrn, pPriv->video_planarmem);
pPriv->video_planarmem = NULL;
}
pPriv->videoStatus = 0;
pPriv->tried_agp = FALSE;
} else {
if(pPriv->videoStatus & CLIENT_VIDEO_ON) {
pPriv->videoStatus |= OFF_TIMER;
@ -1170,34 +1196,37 @@ SavageCopyPlanarDataBCI(
unsigned char *srcV, /* V */
unsigned char *srcU, /* U */
unsigned char *dst,
unsigned char * planarPtr,
unsigned long planarOffset,
int srcPitch, int srcPitch2,
int dstPitch,
int h,int w)
int h,int w,
Bool isAGP)
{
SavagePtr psav = SAVPTR(pScrn);
/* half of the dest buffer for copying the YVU data to it ??? */
unsigned char *dstCopy = (unsigned char *)(((unsigned long)dst
+ dstPitch * h
+ 0x0f) & ~0x0f);
/* for pixel transfer */
unsigned long offsetY = (unsigned long)dstCopy - (unsigned long)psav->FBBase;
unsigned long offsetY = planarOffset;
unsigned long offsetV = offsetY + srcPitch * h;
unsigned long offsetU = offsetV + srcPitch2 * (h>>1);
unsigned long dstOffset = (unsigned long)dst - (unsigned long)psav->FBBase;
int i;
unsigned char memType;
BCI_GET_PTR;
/* copy Y planar */
memcpy(dstCopy, srcY, srcPitch * h);
memcpy(planarPtr, srcY, srcPitch * h);
/* copy V planar */
dstCopy = dstCopy + srcPitch * h;
memcpy(dstCopy, srcV, srcPitch2 * (h>>1));
planarPtr = planarPtr + srcPitch * h;
memcpy(planarPtr, srcV, srcPitch2 * (h>>1));
/* copy U planar */
dstCopy = dstCopy + srcPitch2 * (h>>1);
memcpy(dstCopy, srcU, srcPitch2 * (h>>1));
planarPtr = planarPtr + srcPitch2 * (h>>1);
memcpy(planarPtr, srcU, srcPitch2 * (h>>1));
memType = isAGP ? 3 : 0;
/*
* Transfer pixel data from one memory location to another location
@ -1217,23 +1246,18 @@ SavageCopyPlanarDataBCI(
w = (w+0xf)&0xff0;
psav->WaitQueue(psav,11);
BCI_SEND(0x96070051);
BCI_SEND(offsetY);
BCI_SEND(BCI_SET_REGISTER | BCI_SET_REGISTER_COUNT(7) | 0x51);
BCI_SEND(offsetY | memType);
BCI_SEND(dstOffset);
BCI_SEND(((h-1)<<16)|((w-1)>>3));
BCI_SEND(dstPitch >> 3);
BCI_SEND(offsetU);
BCI_SEND(offsetV);
BCI_SEND(offsetU | memType);
BCI_SEND(offsetV | memType);
BCI_SEND((srcPitch2 << 16)| srcPitch2);
BCI_SEND(0x96010050);
BCI_SEND(BCI_SET_REGISTER | BCI_SET_REGISTER_COUNT(1) | 0x50);
BCI_SEND(0x00200003 | srcPitch);
BCI_SEND(0xC0170000);
}
@ -1304,6 +1328,8 @@ SavageVideoSave(ScreenPtr pScreen, ExaOffscreenArea *area)
if (pPriv->video_memory == area)
pPriv->video_memory = NULL;
if (pPriv->video_planarmem == area)
pPriv->video_planarmem = NULL;
}
static CARD32
@ -1840,6 +1866,16 @@ SavageDisplayVideo2000(
#endif
}
static void
SavageFillKeyHelper(DrawablePtr pDraw, uint32_t colorKey, RegionPtr clipBoxes)
{
#if HAVE_XV_DRAWABLE_HELPER
xf86XVFillKeyHelperDrawable(pDraw, colorKey, clipBoxes);
#else
xf86XVFillKeyHelper(pDraw->pScreen, colorKey, clipBoxes);
#endif
}
static int
SavagePutImage(
ScrnInfoPtr pScrn,
@ -1860,6 +1896,7 @@ SavagePutImage(
unsigned char *dst_start;
int pitch, new_size, offset, offsetV=0, offsetU=0;
int srcPitch, srcPitch2=0, dstPitch;
int planarFrameSize;
int top, left, npixels, nlines;
BoxRec dstBox;
CARD32 tmp;
@ -1895,8 +1932,8 @@ SavagePutImage(
pitch = pScrn->bitsPerPixel * pScrn->displayWidth >> 3;
/* All formats directly displayable by Savage are packed and 2 bytes per pixel */
dstPitch = ((width << 1) + 15) & ~15;
/*new_h = ((dstPitch * height) + pitch - 1) / pitch;*/
new_size = dstPitch * height;
switch(id) {
@ -1923,17 +1960,78 @@ SavagePutImage(
break;
}
/* Calculate required memory for all planar frames */
planarFrameSize = 0;
if (srcPitch2 != 0 && S3_SAVAGE4_SERIES(psav->Chipset) && psav->BCIforXv) {
new_size = ((new_size + 0xF) & ~0xF) + srcPitch * height + srcPitch2 * height;
new_size = ((new_size + 0xF) & ~0xF);
planarFrameSize = srcPitch * height + srcPitch2 * height;
}
/* if(!(pPriv->area = SavageAllocateMemory(pScrn, pPriv->area, new_h)))
return BadAlloc;*/
pPriv->video_offset = SavageAllocateMemory(pScrn, &pPriv->video_memory,
new_size);
/* Check whether AGP buffers can be allocated. If not, fall back to ordinary
upload to framebuffer (slower) */
if (!pPriv->tried_agp && !psav->IsPCI && psav->drmFD > 0 && psav->DRIServerInfo != NULL) {
int ret;
SAVAGEDRIServerPrivatePtr pSAVAGEDRIServer = psav->DRIServerInfo;
pPriv->tried_agp = TRUE;
if (pSAVAGEDRIServer->agpXVideo.size >= max(new_size, planarFrameSize)) {
if (pSAVAGEDRIServer->agpXVideo.map == NULL &&
drmMap( psav->drmFD,
pSAVAGEDRIServer->agpXVideo.handle,
pSAVAGEDRIServer->agpXVideo.size,
&pSAVAGEDRIServer->agpXVideo.map ) < 0 ) {
xf86DrvMsg( pScreen->myNum, X_ERROR, "[agp] XVideo: Could not map agpXVideo \n" );
pPriv->agpBufferOffset = 0;
pPriv->agpBufferMap = NULL;
} else {
pPriv->agpBufferMap = pSAVAGEDRIServer->agpXVideo.map;
pPriv->agpBufferOffset = pSAVAGEDRIServer->agpXVideo.offset;
pPriv->agpBase = drmAgpBase(psav->drmFD);
#if 0
xf86DrvMsg( pScreen->myNum, X_INFO,
"[agp] agpXVideo mapped at 0x%08lx aperture=0x%08x offset=0x%08lx\n",
(unsigned long)pPriv->agpBufferMap, pPriv->agpBase, pPriv->agpBufferOffset);
#endif
}
} else {
/* This situation is expected if AGPforXv is disabled, otherwise report. */
if (pSAVAGEDRIServer->agpXVideo.size > 0) {
xf86DrvMsg( pScreen->myNum, X_ERROR,
"[agp] XVideo: not enough space in buffer (got %ld bytes, required %ld bytes).\n",
pSAVAGEDRIServer->agpXVideo.size, max(new_size, planarFrameSize));
}
pPriv->agpBufferMap = NULL;
pPriv->agpBufferOffset = 0;
}
}
/* Buffer for final packed frame */
pPriv->video_offset = SavageAllocateMemory(
pScrn, &pPriv->video_memory,
new_size);
if (pPriv->video_offset == 0)
return BadAlloc;
/* Packed format cases */
if (planarFrameSize == 0) {
pPriv->video_planarbuf = 0;
/* Planar format cases */
} else {
/* Hardware-assisted planar conversion only works on 16-byte aligned addresses */
pPriv->video_planarbuf = SavageAllocateMemory(
pScrn, &pPriv->video_planarmem,
((planarFrameSize + 0xF) & ~0xF));
if (pPriv->video_planarbuf != 0) {
/* TODO: stop any pending conversions when buffers change... */
pPriv->video_planarbuf = ((pPriv->video_planarbuf + 0xF) & ~0xF);
} else {
/* Fallback using software conversion */
}
}
/* copy data */
top = y1 >> 16;
left = (x1 >> 16) & ~1;
@ -1941,7 +2039,6 @@ SavagePutImage(
left <<= 1;
offset = (pPriv->video_offset) + (top * dstPitch);
/*offset = pPriv->area->box.y1 * psav->lDelta;*/
dst_start = (psav->FBBase + ((offset + left) & ~BASE_PAD));
switch(id) {
@ -1952,13 +2049,30 @@ SavagePutImage(
offsetU += tmp;
offsetV += tmp;
nlines = ((((y2 + 0xffff) >> 16) + 1) & ~1) - top;
if (S3_SAVAGE4_SERIES(psav->Chipset) && psav->BCIforXv && (npixels & 0xF) == 0) {
SavageCopyPlanarDataBCI(
pScrn,
buf + (top * srcPitch) + (left >> 1),
buf + offsetV,
buf + offsetU,
dst_start, srcPitch, srcPitch2, dstPitch, nlines, npixels);
if (S3_SAVAGE4_SERIES(psav->Chipset) && psav->BCIforXv && (npixels & 0xF) == 0 && pPriv->video_planarbuf != 0) {
if (pPriv->agpBufferMap != NULL) {
/* Using copy to AGP memory */
SavageCopyPlanarDataBCI(
pScrn,
buf + (top * srcPitch) + (left >> 1),
buf + offsetV,
buf + offsetU,
dst_start,
pPriv->agpBufferMap,
pPriv->agpBase + pPriv->agpBufferOffset,
srcPitch, srcPitch2, dstPitch, nlines, npixels, TRUE);
} else {
/* Using ordinary copy to framebuffer */
SavageCopyPlanarDataBCI(
pScrn,
buf + (top * srcPitch) + (left >> 1),
buf + offsetV,
buf + offsetU,
dst_start,
(unsigned char *)psav->FBBase + pPriv->video_planarbuf,
pPriv->video_planarbuf,
srcPitch, srcPitch2, dstPitch, nlines, npixels, FALSE);
}
} else {
SavageCopyPlanarData(
buf + (top * srcPitch) + (left >> 1),
@ -1988,7 +2102,7 @@ SavagePutImage(
if(!REGION_EQUAL(pScreen, &pPriv->clip, clipBoxes)) {
REGION_COPY(pScreen, &pPriv->clip, clipBoxes);
/* draw these */
xf86XVFillKeyHelper(pScrn->pScreen, pPriv->colorKey, clipBoxes);
SavageFillKeyHelper(pDraw, pPriv->colorKey, clipBoxes);
}