Update SiS driver to 0.10

Tested by todd.
ok Matthieu.
This commit is contained in:
oga 2008-04-19 14:03:12 +00:00
parent d0af8d36f0
commit 73d1e76463
50 changed files with 805 additions and 240 deletions

View File

@ -168,6 +168,8 @@ 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@
PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
@ -179,6 +181,8 @@ STRIP = @STRIP@
VERSION = @VERSION@
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@

View File

@ -7427,7 +7427,7 @@ AC_DEFUN([XORG_MACROS_VERSION],[
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.5
[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
@ -7576,7 +7576,11 @@ AC_DEFUN([XORG_CHECK_LINUXDOC],[
XORG_SGML_PATH=$prefix/share/sgml
HAVE_DEFS_ENT=
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
if test x"$cross_compiling" = x"yes" ; then
HAVE_DEFS_ENT=no
else
AC_CHECK_FILE([$XORG_SGML_PATH/X11/defs.ent], [HAVE_DEFS_ENT=yes])
fi
AC_PATH_PROG(LINUXDOC, linuxdoc)
AC_PATH_PROG(PS2PDF, ps2pdf)
@ -7897,14 +7901,14 @@ AC_DEFUN([XORG_RELEASE_VERSION],[
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`
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`
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi

View File

@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59 for xf86-video-sis 0.9.3.
# Generated by GNU Autoconf 2.59 for xf86-video-sis 0.10.0.
#
# Report bugs to <https://bugs.freedesktop.org/enter_bug.cgi?product=xorg>.
#
@ -423,8 +423,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
# Identity of this package.
PACKAGE_NAME='xf86-video-sis'
PACKAGE_TARNAME='xf86-video-sis'
PACKAGE_VERSION='0.9.3'
PACKAGE_STRING='xf86-video-sis 0.9.3'
PACKAGE_VERSION='0.10.0'
PACKAGE_STRING='xf86-video-sis 0.10.0'
PACKAGE_BUGREPORT='https://bugs.freedesktop.org/enter_bug.cgi?product=xorg'
ac_unique_file="Makefile.am"
@ -465,7 +465,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RAWCPP RAWCPPFLAGS PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS DRI_TRUE DRI_FALSE DRI_CFLAGS DRI_LIBS moduledir DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LINUXDOC PS2PDF BUILD_LINUXDOC_TRUE BUILD_LINUXDOC_FALSE BUILD_PDFDOC_TRUE BUILD_PDFDOC_FALSE MAKE_TEXT MAKE_PS MAKE_PDF MAKE_HTML LIBOBJS LTLIBOBJS'
ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL RAWCPP RAWCPPFLAGS PKG_CONFIG ac_pt_PKG_CONFIG XORG_CFLAGS XORG_LIBS DRI_TRUE DRI_FALSE DRI_CFLAGS DRI_LIBS PCIACCESS_CFLAGS PCIACCESS_LIBS XSERVER_LIBPCIACCESS_TRUE XSERVER_LIBPCIACCESS_FALSE moduledir DRIVER_NAME APP_MAN_SUFFIX LIB_MAN_SUFFIX FILE_MAN_SUFFIX MISC_MAN_SUFFIX DRIVER_MAN_SUFFIX ADMIN_MAN_SUFFIX APP_MAN_DIR LIB_MAN_DIR FILE_MAN_DIR MISC_MAN_DIR DRIVER_MAN_DIR ADMIN_MAN_DIR LINUXDOC PS2PDF BUILD_LINUXDOC_TRUE BUILD_LINUXDOC_FALSE BUILD_PDFDOC_TRUE BUILD_PDFDOC_FALSE MAKE_TEXT MAKE_PS MAKE_PDF MAKE_HTML LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@ -966,6 +966,14 @@ ac_env_DRI_LIBS_set=${DRI_LIBS+set}
ac_env_DRI_LIBS_value=$DRI_LIBS
ac_cv_env_DRI_LIBS_set=${DRI_LIBS+set}
ac_cv_env_DRI_LIBS_value=$DRI_LIBS
ac_env_PCIACCESS_CFLAGS_set=${PCIACCESS_CFLAGS+set}
ac_env_PCIACCESS_CFLAGS_value=$PCIACCESS_CFLAGS
ac_cv_env_PCIACCESS_CFLAGS_set=${PCIACCESS_CFLAGS+set}
ac_cv_env_PCIACCESS_CFLAGS_value=$PCIACCESS_CFLAGS
ac_env_PCIACCESS_LIBS_set=${PCIACCESS_LIBS+set}
ac_env_PCIACCESS_LIBS_value=$PCIACCESS_LIBS
ac_cv_env_PCIACCESS_LIBS_set=${PCIACCESS_LIBS+set}
ac_cv_env_PCIACCESS_LIBS_value=$PCIACCESS_LIBS
#
# Report the --help message.
@ -974,7 +982,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures xf86-video-sis 0.9.3 to adapt to many kinds of systems.
\`configure' configures xf86-video-sis 0.10.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@ -1040,7 +1048,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of xf86-video-sis 0.9.3:";;
short | recursive ) echo "Configuration of xf86-video-sis 0.10.0:";;
esac
cat <<\_ACEOF
@ -1092,6 +1100,10 @@ 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.
@ -1192,7 +1204,7 @@ fi
test -n "$ac_init_help" && exit 0
if $ac_init_version; then
cat <<\_ACEOF
xf86-video-sis configure 0.9.3
xf86-video-sis configure 0.10.0
generated by GNU Autoconf 2.59
Copyright (C) 2003 Free Software Foundation, Inc.
@ -1206,7 +1218,7 @@ cat >&5 <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by xf86-video-sis $as_me 0.9.3, which was
It was created by xf86-video-sis $as_me 0.10.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ $0 $@
@ -1809,7 +1821,7 @@ fi
# Define the identity of the package.
PACKAGE='xf86-video-sis'
VERSION='0.9.3'
VERSION='0.10.0'
cat >>confdefs.h <<_ACEOF
@ -3691,7 +3703,7 @@ ia64-*-hpux*)
;;
*-*-irix6*)
# Find out which ABI we are using.
echo '#line 3694 "configure"' > conftest.$ac_ext
echo '#line 3706 "configure"' > conftest.$ac_ext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
@ -5290,7 +5302,7 @@ fi
# Provide some information about the compiler.
echo "$as_me:5293:" \
echo "$as_me:5305:" \
"checking for Fortran 77 compiler version" >&5
ac_compiler=`set X $ac_compile; echo $2`
{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
@ -6353,11 +6365,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:6356: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6368: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6360: \$? = $ac_status" >&5
echo "$as_me:6372: \$? = $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.
@ -6621,11 +6633,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:6624: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6636: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:6628: \$? = $ac_status" >&5
echo "$as_me:6640: \$? = $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.
@ -6725,11 +6737,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:6728: $lt_compile\"" >&5)
(eval echo "\"\$as_me:6740: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:6732: \$? = $ac_status" >&5
echo "$as_me:6744: \$? = $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
@ -9074,7 +9086,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9077 "configure"
#line 9089 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -9174,7 +9186,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 9177 "configure"
#line 9189 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -11518,11 +11530,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:11521: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11533: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:11525: \$? = $ac_status" >&5
echo "$as_me:11537: \$? = $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.
@ -11622,11 +11634,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:11625: $lt_compile\"" >&5)
(eval echo "\"\$as_me:11637: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:11629: \$? = $ac_status" >&5
echo "$as_me:11641: \$? = $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
@ -13192,11 +13204,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:13195: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13207: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:13199: \$? = $ac_status" >&5
echo "$as_me:13211: \$? = $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.
@ -13296,11 +13308,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:13299: $lt_compile\"" >&5)
(eval echo "\"\$as_me:13311: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:13303: \$? = $ac_status" >&5
echo "$as_me:13315: \$? = $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
@ -15503,11 +15515,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:15506: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15518: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15510: \$? = $ac_status" >&5
echo "$as_me:15522: \$? = $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.
@ -15771,11 +15783,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:15774: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15786: $lt_compile\"" >&5)
(eval "$lt_compile" 2>conftest.err)
ac_status=$?
cat conftest.err >&5
echo "$as_me:15778: \$? = $ac_status" >&5
echo "$as_me:15790: \$? = $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.
@ -15875,11 +15887,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:15878: $lt_compile\"" >&5)
(eval echo "\"\$as_me:15890: $lt_compile\"" >&5)
(eval "$lt_compile" 2>out/conftest.err)
ac_status=$?
cat out/conftest.err >&5
echo "$as_me:15882: \$? = $ac_status" >&5
echo "$as_me:15894: \$? = $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
@ -20493,6 +20505,198 @@ cat >>confdefs.h <<\_ACEOF
_ACEOF
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $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
char *p = (char *) XSERVER_LIBPCIACCESS;
#endif
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&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); } &&
{ ac_try='test -z "$ac_c_werror_flag"
|| test ! -s conftest.err'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; 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 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
CPPFLAGS="$SAVE_CPPFLAGS"
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://www.freedesktop.org/software/pkgconfig>.
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://www.freedesktop.org/software/pkgconfig>.
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
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
fi
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
XSERVER_LIBPCIACCESS_TRUE=
XSERVER_LIBPCIACCESS_FALSE='#'
else
XSERVER_LIBPCIACCESS_TRUE='#'
XSERVER_LIBPCIACCESS_FALSE=
fi
@ -20591,7 +20795,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MAJOR `echo $PACKAGE_VERSION | cut -d . -f 1`
_ACEOF
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2`
PVM=`echo $PACKAGE_VERSION | cut -d . -f 2 | cut -d - -f 1`
if test "x$PVM" = "x"; then
PVM="0"
fi
@ -20600,7 +20804,7 @@ cat >>confdefs.h <<_ACEOF
#define PACKAGE_VERSION_MINOR $PVM
_ACEOF
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3`
PVP=`echo $PACKAGE_VERSION | cut -d . -f 3 | cut -d - -f 1`
if test "x$PVP" = "x"; then
PVP="0"
fi
@ -20615,7 +20819,10 @@ _ACEOF
XORG_SGML_PATH=$prefix/share/sgml
HAVE_DEFS_ENT=
as_ac_File=`echo "ac_cv_file_$XORG_SGML_PATH/X11/defs.ent" | $as_tr_sh`
if test x"$cross_compiling" = x"yes" ; then
HAVE_DEFS_ENT=no
else
as_ac_File=`echo "ac_cv_file_$XORG_SGML_PATH/X11/defs.ent" | $as_tr_sh`
echo "$as_me:$LINENO: checking for $XORG_SGML_PATH/X11/defs.ent" >&5
echo $ECHO_N "checking for $XORG_SGML_PATH/X11/defs.ent... $ECHO_C" >&6
if eval "test \"\${$as_ac_File+set}\" = set"; then
@ -20637,6 +20844,7 @@ if test `eval echo '${'$as_ac_File'}'` = yes; then
HAVE_DEFS_ENT=yes
fi
fi
# Extract the first word of "linuxdoc", so it can be a program name with args.
set dummy linuxdoc; ac_word=$2
@ -20908,6 +21116,13 @@ 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
if test -z "${BUILD_LINUXDOC_TRUE}" && test -z "${BUILD_LINUXDOC_FALSE}"; then
{ { echo "$as_me:$LINENO: error: conditional \"BUILD_LINUXDOC\" was never defined.
Usually this means the macro was only invoked conditionally." >&5
@ -21193,7 +21408,7 @@ _ASBOX
} >&5
cat >&5 <<_CSEOF
This file was extended by xf86-video-sis $as_me 0.9.3, which was
This file was extended by xf86-video-sis $as_me 0.10.0, which was
generated by GNU Autoconf 2.59. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@ -21256,7 +21471,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF
ac_cs_version="\\
xf86-video-sis config.status 0.9.3
xf86-video-sis config.status 0.10.0
configured by $0, generated by GNU Autoconf 2.59,
with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
@ -21534,6 +21749,10 @@ s,@DRI_TRUE@,$DRI_TRUE,;t t
s,@DRI_FALSE@,$DRI_FALSE,;t t
s,@DRI_CFLAGS@,$DRI_CFLAGS,;t t
s,@DRI_LIBS@,$DRI_LIBS,;t t
s,@PCIACCESS_CFLAGS@,$PCIACCESS_CFLAGS,;t t
s,@PCIACCESS_LIBS@,$PCIACCESS_LIBS,;t t
s,@XSERVER_LIBPCIACCESS_TRUE@,$XSERVER_LIBPCIACCESS_TRUE,;t t
s,@XSERVER_LIBPCIACCESS_FALSE@,$XSERVER_LIBPCIACCESS_FALSE,;t t
s,@moduledir@,$moduledir,;t t
s,@DRIVER_NAME@,$DRIVER_NAME,;t t
s,@APP_MAN_SUFFIX@,$APP_MAN_SUFFIX,;t t

View File

@ -22,7 +22,7 @@
AC_PREREQ(2.57)
AC_INIT([xf86-video-sis],
0.9.3,
0.10.0,
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
xf86-video-sis)
@ -101,6 +101,19 @@ fi
# technically this should be a configure flag. meh.
AC_DEFINE(XF86EXA, 1, [Build support for Exa])
SAVE_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="$CPPFLAGS $XORG_CFLAGS"
AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
[XSERVER_LIBPCIACCESS=yes],[XSERVER_LIBPCIACCESS=no],
[#include "xorg-server.h"])
CPPFLAGS="$SAVE_CPPFLAGS"
if test "x$XSERVER_LIBPCIACCESS" = xyes; then
PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.10])
XORG_CFLAGS="$XORG_CFLAGS $PCIACCESS_CFLAGS"
fi
AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
AC_SUBST([DRI_CFLAGS])
AC_SUBST([XORG_CFLAGS])
AC_SUBST([moduledir])

View File

@ -160,6 +160,8 @@ 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@
PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
@ -171,6 +173,8 @@ STRIP = @STRIP@
VERSION = @VERSION@
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@

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Register settings for SiS 300 series
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Register settings for SiS 315/330/340 series
*

View File

@ -46,6 +46,7 @@ sis_drv_la_SOURCES = \
sis310_accel.c \
sis310_accel.h \
sis6326_video.c \
sispcirename.h \
sis_accel.c \
sis_accel.h \
sis_common.h \

View File

@ -82,12 +82,12 @@ sis_drv_la_LIBADD =
am__sis_drv_la_SOURCES_DIST = 300vtbl.h 310vtbl.h init301.c init301.h \
init.c initdef.h initextx.c initextx.h init.h oem300.h \
oem310.h osdef.h sis300_accel.c sis300_accel.h sis310_accel.c \
sis310_accel.h sis6326_video.c sis_accel.c sis_accel.h \
sis_common.h sis_cursor.c sis_cursor.h sis_dac.c sis_dac.h \
sis_dga.c sis_driver.c sis_driver.h sis.h sis_memcpy.c \
sis_opt.c sis_regs.h sis_setup.c sis_shadow.c sis_utility.c \
sis_vb.c sis_vga.c sis_video.c sis_video.h sis_videostr.h \
vgatypes.h vstruct.h sis_dri.c sis_dri.h
sis310_accel.h sis6326_video.c sispcirename.h sis_accel.c \
sis_accel.h sis_common.h sis_cursor.c sis_cursor.h sis_dac.c \
sis_dac.h sis_dga.c sis_driver.c sis_driver.h sis.h \
sis_memcpy.c sis_opt.c sis_regs.h sis_setup.c sis_shadow.c \
sis_utility.c sis_vb.c sis_vga.c sis_video.c sis_video.h \
sis_videostr.h vgatypes.h vstruct.h sis_dri.c sis_dri.h
@DRI_TRUE@am__objects_1 = sis_dri.lo
am_sis_drv_la_OBJECTS = init301.lo init.lo initextx.lo sis300_accel.lo \
sis310_accel.lo sis6326_video.lo sis_accel.lo sis_cursor.lo \
@ -188,6 +188,8 @@ 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@
PS2PDF = @PS2PDF@
RANLIB = @RANLIB@
@ -199,6 +201,8 @@ STRIP = @STRIP@
VERSION = @VERSION@
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@
@ -257,12 +261,12 @@ sis_drv_ladir = @moduledir@/drivers
sis_drv_la_SOURCES = 300vtbl.h 310vtbl.h init301.c init301.h init.c \
initdef.h initextx.c initextx.h init.h oem300.h oem310.h \
osdef.h sis300_accel.c sis300_accel.h sis310_accel.c \
sis310_accel.h sis6326_video.c sis_accel.c sis_accel.h \
sis_common.h sis_cursor.c sis_cursor.h sis_dac.c sis_dac.h \
sis_dga.c sis_driver.c sis_driver.h sis.h sis_memcpy.c \
sis_opt.c sis_regs.h sis_setup.c sis_shadow.c sis_utility.c \
sis_vb.c sis_vga.c sis_video.c sis_video.h sis_videostr.h \
vgatypes.h vstruct.h $(am__append_1)
sis310_accel.h sis6326_video.c sispcirename.h sis_accel.c \
sis_accel.h sis_common.h sis_cursor.c sis_cursor.h sis_dac.c \
sis_dac.h sis_dga.c sis_driver.c sis_driver.h sis.h \
sis_memcpy.c sis_opt.c sis_regs.h sis_setup.c sis_shadow.c \
sis_utility.c sis_vb.c sis_vga.c sis_video.c sis_video.h \
sis_videostr.h vgatypes.h vstruct.h $(am__append_1)
all: all-am
.SUFFIXES:

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Mode initializing code (CRT1 section) for
* for SiS 300/305/540/630/730,
@ -2505,7 +2503,7 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
#ifdef SIS_LINUX_KERNEL
templ = sisfb_read_nbridge_pci_dword(SiS_Pr, 0x50);
#else
templ = pciReadLong(0x00000000, 0x50);
templ = sis_pci_read_host_bridge_u32(0x50);
#endif
if(SiS_Pr->ChipType == SIS_730) {
@ -2530,8 +2528,8 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
sisfb_write_nbridge_pci_dword(SiS_Pr, 0x50, templ);
templ = sisfb_read_nbridge_pci_dword(SiS_Pr, 0xA0);
#else
pciWriteLong(0x00000000, 0x50, templ);
templ = pciReadLong(0x00000000, 0xA0);
sis_pci_write_host_bridge_u32(0x50, templ);
templ = sis_pci_read_host_bridge_u32(0xA0);
#endif
/* GUI grant timer (PCI config 0xA3) */
@ -2551,7 +2549,7 @@ SiS_SetCRT1FIFO_630(struct SiS_Private *SiS_Pr, unsigned short ModeNo,
#ifdef SIS_LINUX_KERNEL
sisfb_write_nbridge_pci_dword(SiS_Pr, 0xA0, templ);
#else
pciWriteLong(0x00000000, 0xA0, templ);
sis_pci_write_host_bridge_u32(0xA0, templ);
#endif
}
#endif /* SIS300 */
@ -3169,7 +3167,7 @@ SiS_Handle760(struct SiS_Private *SiS_Pr)
#ifdef SIS_LINUX_KERNEL
somebase = sisfb_read_mio_pci_word(SiS_Pr, 0x74);
#else
somebase = pciReadWord(0x00001000, 0x74);
somebase = sis_pci_read_device_u32(2, 0x74);
#endif
somebase &= 0xffff;
@ -3190,8 +3188,8 @@ SiS_Handle760(struct SiS_Private *SiS_Pr)
sisfb_write_nbridge_pci_byte(SiS_Pr, 0x7e, temp1);
sisfb_write_nbridge_pci_byte(SiS_Pr, 0x8d, temp2);
#else
pciWriteByte(0x00000000, 0x7e, temp1);
pciWriteByte(0x00000000, 0x8d, temp2);
sis_pci_write_host_bridge_u8(0x7e, temp1);
sis_pci_write_host_bridge_u8(0x8d, temp2);
#endif
SiS_SetRegByte((somebase + 0x85), temp3);

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Data and prototypes for init.c
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Mode initializing code (CRT2 section)
* for SiS 300/305/540/630/730,
@ -932,7 +930,7 @@ SiS_SetChrontelGPIO(struct SiS_Private *SiS_Pr, unsigned short myvbinfo)
#ifdef SIS_LINUX_KERNEL
acpibase = sisfb_read_lpc_pci_dword(SiS_Pr, 0x74);
#else
acpibase = pciReadLong(0x00000800, 0x74);
acpibase = sis_pci_read_device_u32(1, 0x74);
#endif
acpibase &= 0xFFFF;
if(!acpibase) return;
@ -5220,8 +5218,8 @@ SiS_SetCRT2FIFO_300(struct SiS_Private *SiS_Pr,unsigned short ModeNo)
pci50 = sisfb_read_nbridge_pci_dword(SiS_Pr, 0x50);
pciA0 = sisfb_read_nbridge_pci_dword(SiS_Pr, 0xa0);
#else
pci50 = pciReadLong(0x00000000, 0x50);
pciA0 = pciReadLong(0x00000000, 0xA0);
pci50 = sis_pci_read_host_bridge_u32(0x50);
pciA0 = sis_pci_read_host_bridge_u32(0xA0);
#endif
if(SiS_Pr->ChipType == SIS_730) {

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Data and prototypes for init301.c
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Global definitions for init.c and init301.c
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* X.org/XFree86 specific extensions to init.c/init301.c
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* X.org/XFree86 specific supplements to init.c/init301.c
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* OEM Data for 300 series
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* OEM Data for 315/330/340 series
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* OS depending defines
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis.h,v 1.67 2006/04/07 21:05:21 ajax Exp $ */
/*
* Main global data and definitions
*
@ -39,6 +37,11 @@
#include <string.h>
#include <math.h>
#include <setjmp.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sispcirename.h>
#define SISDRIVERVERSIONYEAR 5
#define SISDRIVERVERSIONMONTH 9
@ -92,7 +95,7 @@
(((major) * 10000000) + ((minor) * 100000) + ((patch) * 1000) + snap)
#define XF86_VERSION_CURRENT XF86_VERSION_NUMERIC(4,3,99,902,0)
#endif
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,900,0)
#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(6,8,99,900,0) || XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(4,0,0,0,0)
#define SISISXORG6899900
#endif
#if 0
@ -109,10 +112,10 @@
#define SIS_NAME "SIS"
#define SIS_DRIVER_NAME "sis"
#define SIS_MAJOR_VERSION 0
#define SIS_MAJOR_VERSION PACKAGE_VERSION_MAJOR
#ifdef SISISXORG6899900
#define SIS_MINOR_VERSION 9 /* DRI changes */
#define SIS_PATCHLEVEL 1
#define SIS_MINOR_VERSION PACKAGE_VERSION_MINOR /* DRI changes */
#define SIS_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
#else
#define SIS_MINOR_VERSION 7
#define SIS_PATCHLEVEL 1
@ -850,15 +853,15 @@ typedef struct {
ULong masterFbSize;
ULong slaveFbAddress;
ULong slaveFbSize;
UChar *FbBase; /* VRAM linear address */
void *FbBase; /* VRAM linear address */
UChar *RealFbBase; /* Real VRAM linear address (for DHM, SiS76x UMA skipping) */
UChar *IOBase; /* MMIO linear address */
void *IOBase; /* MMIO linear address */
UShort MapCountIOBase; /* map/unmap queue counter */
UShort MapCountFbBase; /* map/unmap queue counter */
Bool forceUnmapIOBase; /* ignore counter and unmap */
Bool forceUnmapFbBase; /* ignore counter and unmap */
#ifdef __alpha__
UChar *IOBaseDense; /* MMIO for Alpha platform */
void *IOBaseDense; /* MMIO for Alpha platform */
UShort MapCountIOBaseDense;
Bool forceUnmapIOBaseDense; /* ignore counter and unmap */
#endif
@ -921,7 +924,7 @@ typedef struct {
unsigned int CPUFlags;
#ifdef SIS_NEED_MAP_IOP
CARD32 IOPAddress; /* I/O port physical address */
UChar *IOPBase; /* I/O port linear address */
void *IOPBase; /* I/O port linear address */
UShort MapCountIOPBase; /* map/unmap queue counter */
Bool forceUnmapIOPBase; /* ignore counter and unmap */
#endif
@ -962,13 +965,13 @@ typedef struct {
int DSTN; /* For 550 FSTN/DSTN; set by option, no detection */
ULong FbAddress; /* VRAM physical address (in DHM: for each Fb!) */
ULong realFbAddress; /* For DHM/PCI mem mapping: store global FBAddress */
UChar *FbBase; /* VRAM virtual linear address */
UChar *RealFbBase; /* Real VRAM virtual linear address (for DHM and SiS76x UMA skipping) */
void *FbBase; /* VRAM virtual linear address */
void *RealFbBase; /* Real VRAM virtual linear address (for DHM and SiS76x UMA skipping) */
CARD32 IOAddress; /* MMIO physical address */
UChar *IOBase; /* MMIO linear address */
void *IOBase; /* MMIO linear address */
IOADDRESS IODBase; /* Base of PIO memory area */
#ifdef __alpha__
UChar *IOBaseDense; /* MMIO for Alpha platform */
void *IOBaseDense; /* MMIO for Alpha platform */
#endif
SISIOADDRESS RelIO; /* Relocated IO Ports baseaddress */
UChar *BIOS;
@ -1376,7 +1379,7 @@ typedef struct {
Bool SCLogQuiet;
#ifdef SIS_NEED_MAP_IOP
CARD32 IOPAddress; /* I/O port physical address */
UChar *IOPBase; /* I/O port linear address */
void *IOPBase; /* I/O port linear address */
#endif
#ifdef SISMERGED
Bool MergedFB, MergedFBAuto;
@ -1570,6 +1573,12 @@ extern int SiS_GetTVyscale(ScrnInfoPtr pScrn);
extern int SiS_GetSISCRT1SaturationGain(ScrnInfoPtr pScrn);
extern void SiS_SetSISCRT1SaturationGain(ScrnInfoPtr pScrn, int val);
extern unsigned int sis_pci_read_device_u32(int device, int offset);
extern unsigned char sis_pci_read_device_u8(int device, int offset);
extern unsigned int sis_pci_read_host_bridge_u32(int offset);
extern unsigned char sis_pci_read_host_bridge_u8(int offset);
extern void sis_pci_write_host_bridge_u8(int offset, unsigned char value);
extern void sis_pci_write_host_bridge_u32(int offset, unsigned int value);
#endif /* _SIS_H_ */

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis300_accel.c,v 1.23 2006-03-09 06:06:25 anholt Exp $ */
/*
* 2D Acceleration for SiS 530, 620, 300, 540, 630, 730.
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* 2D Acceleration for SiS 530, 620, 300, 540, 630, 730.
* Definitions for the SIS engine communication

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis310_accel.c,v 1.31 2006-03-09 06:06:25 anholt Exp $ */
/*
* 2D Acceleration for SiS 315, 330 and 340 series
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* 2D Acceleration for SiS 315 and Xabre series
* Definitions for the SIS engine communication.

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis6326_video.c,v 1.19 2005/10/16 18:12:32 twini Exp $ */
/*
* Xv driver for SiS 5597/5598, 6326 and 530/620.
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis_accel.c,v 1.23 2006-03-09 06:06:25 anholt Exp $ */
/*
* 2D acceleration for SiS5597/5598 and 6326
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* 2D acceleration for 5597/5598 and 6326
* Definitions for the SIS engine communication

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Common header definitions for SiS 2D/3D/DRM suite
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* SiS hardware cursor handling
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* SiS hardware cursor handling
* Definitions

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* DAC helper functions (Save/Restore, MemClk, etc)
*
@ -545,8 +543,8 @@ SiS300Save(ScrnInfoPtr pScrn, SISRegPtr sisReg)
/* Save FQBQ and GUI timer settings */
if(pSiS->Chipset == PCI_CHIP_SIS630) {
sisReg->sisRegsPCI50 = pciReadLong(0x00000000, 0x50);
sisReg->sisRegsPCIA0 = pciReadLong(0x00000000, 0xA0);
sisReg->sisRegsPCI50 = sis_pci_read_host_bridge_u32(0x50);
sisReg->sisRegsPCIA0 = sis_pci_read_host_bridge_u32(0xA0);
#ifdef TWDEBUG
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"PCI Config 50 = %lx\n", sisReg->sisRegsPCI50);
@ -687,9 +685,9 @@ SiS300Restore(ScrnInfoPtr pScrn, SISRegPtr sisReg)
/* Restore FQBQ and GUI timer settings */
if(pSiS->Chipset == PCI_CHIP_SIS630) {
temp1 = pciReadLong(0x00000000, 0x50);
temp2 = pciReadLong(0x00000000, 0xA0);
if(pciReadLong(0x00000000, 0x00) == 0x06301039) {
temp1 = sis_pci_read_host_bridge_u32(0x50);
temp2 = sis_pci_read_host_bridge_u32(0xA0);
if(sis_pci_read_host_bridge_u32(0x00) == 0x06301039) {
temp1 &= 0xf0ffffff;
temp1 |= (sisReg->sisRegsPCI50 & ~0xf0ffffff);
temp2 &= 0xf0ffffff;
@ -700,8 +698,8 @@ SiS300Restore(ScrnInfoPtr pScrn, SISRegPtr sisReg)
temp2 &= 0x00ffffff;
temp2 |= (sisReg->sisRegsPCIA0 & ~0x00ffffff);
}
pciWriteLong(0x00000000, 0x50, temp1);
pciWriteLong(0x00000000, 0xA0, temp2);
sis_pci_write_host_bridge_u32(0x50, temp1);
sis_pci_write_host_bridge_u32(0xA0, temp2);
}
/* Restore panel link/video bridge registers */

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* DAC helper functions (Save/Restore, MemClk, etc)
* Definitions and prototypes

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* SiS DGA handling
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis_dri.c,v 1.26 2005/10/21 18:40:19 ajax Exp $ */
/*
* DRI wrapper for 300 and 315 series
*
@ -59,8 +57,10 @@ extern Bool drmSiSAgpInit(int driSubFD, int offset, int size);
#ifdef XORG_VERSION_CURRENT
#define SISHAVECREATEBUSID
#if XORG_VERSION_CURRENT < XORG_VERSION_NUMERIC(6,7,99,1,0)
#ifndef XSERVER_LIBPCIACCESS
extern char *DRICreatePCIBusID(pciVideoPtr PciInfo);
#endif
#endif
#else
# if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,4,99,9,0)
# undef SISHAVECREATEBUSID
@ -861,7 +861,7 @@ SISDRISwapContext(ScreenPtr pScreen, DRISyncType syncType,
break;
#endif
case SIS_300_VGA:
*(pSiS->IOBase + 0x8B50) = 0xff;
*((unsigned char *)pSiS->IOBase + 0x8B50) = 0xff;
*(CARD32 *)(pSiS->IOBase + 0x8B60) = 0xffffffff;
break;
}

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* SiS DRI wrapper
*
@ -115,8 +113,6 @@ typedef struct {
int dummy;
} SISDRIContextRec, *SISDRIContextPtr;
#ifdef XFree86Server
#include "screenint.h"
Bool SISDRIScreenInit(ScreenPtr pScreen);
@ -124,4 +120,3 @@ void SISDRICloseScreen(ScreenPtr pScreen);
Bool SISDRIFinishScreenInit(ScreenPtr pScreen);
#endif
#endif

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis_driver.c,v 1.72 2006/03/09 06:06:25 anholt Exp $ */
/*
* SiS driver main code
*
@ -555,7 +553,7 @@ SiS_SiSFB_Lock(ScrnInfoPtr pScrn, Bool lock)
if(!pSiS->sisfbfound) return;
if(!pSiS->sisfb_havelock) return;
if((fd = open(pSiS->sisfbdevname, 'r')) != -1) {
if((fd = open(pSiS->sisfbdevname, O_RDONLY)) != -1) {
parm = lock ? 1 : 0;
ioctl(fd, SISFB_SET_LOCK, &parm);
close(fd);
@ -614,6 +612,7 @@ SISProbe(DriverPtr drv, int flags)
* All of the cards this driver supports are PCI, so the "probing" just
* amounts to checking the PCI data that the server has already collected.
*/
#ifndef XSERVER_LIBPCIACCESS
if(xf86GetPciVideoInfo() == NULL) {
/*
* We won't let anything in the config file override finding no
@ -621,6 +620,7 @@ SISProbe(DriverPtr drv, int flags)
*/
return FALSE;
}
#endif
numUsedSiS = xf86MatchPciInstances(SIS_NAME, PCI_VENDOR_SIS,
SISChipsets, SISPciChipsets, devSections,
@ -2983,7 +2983,7 @@ SiS_MapVGAMem(ScrnInfoPtr pScrn)
/* If card is secondary or if a0000-address decoding
* is disabled, set Phys to beginning of our video RAM.
*/
pSiS->VGAMapPhys = pSiS->PciInfo->memBase[0];
pSiS->VGAMapPhys = PCI_REGION_BASE(pSiS->PciInfo, 0, REGION_MEM);
}
if(!SiSVGAMapMem(pScrn)) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
@ -3032,7 +3032,7 @@ SiS_CheckKernelFB(ScrnInfoPtr pScrn)
sprintf(name, "/dev/fb/%1d", (i - 8));
}
if((fd = open(name, 'r')) != -1) {
if((fd = open(name, O_RDONLY)) != -1) {
Bool gotit = FALSE;
@ -3380,10 +3380,13 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
/* Find the PCI info for this screen */
pSiS->PciInfo = xf86GetPciInfoForEntity(pSiS->pEnt->index);
pSiS->PciBus = ((pciConfigPtr)pSiS->PciInfo->thisCard)->busnum; /*SIS_PCI_BUS(pSiS->PciInfo);*/
pSiS->PciDevice = ((pciConfigPtr)pSiS->PciInfo->thisCard)->devnum; /*SIS_PCI_DEVICE(pSiS->PciInfo);*/
pSiS->PciFunc = ((pciConfigPtr)pSiS->PciInfo->thisCard)->funcnum; /*SIS_PCI_FUNC(pSiS->PciInfo);*/
pSiS->PciTag = ((pciConfigPtr)pSiS->PciInfo->thisCard)->tag; /*SIS_PCI_TAG(pSiS->PciInfo);*/
pSiS->PciBus = PCI_CFG_BUS(pSiS->PciInfo); /*SIS_PCI_BUS(pSiS->PciInfo);*/
pSiS->PciDevice = PCI_CFG_DEV(pSiS->PciInfo); /*SIS_PCI_DEVICE(pSiS->PciInfo);*/
pSiS->PciFunc = PCI_CFG_FUNC(pSiS->PciInfo); /*SIS_PCI_FUNC(pSiS->PciInfo);*/
pSiS->PciTag = pciTag(PCI_DEV_BUS(pSiS->PciInfo),
PCI_DEV_DEV(pSiS->PciInfo),
PCI_DEV_FUNC(pSiS->PciInfo));
#ifdef SIS_NEED_MAP_IOP
/********************************************/
@ -3433,7 +3436,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
{
SymTabRec *myChipsets = SISChipsets;
if(pSiS->PciInfo->vendor == PCI_VENDOR_XGI) {
if(PCI_DEV_VENDOR_ID(pSiS->PciInfo) == PCI_VENDOR_XGI) {
myChipsets = XGIChipsets;
}
@ -3451,7 +3454,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->Chipset);
} else {
pSiS->Chipset = pSiS->PciInfo->chipType;
pSiS->Chipset = PCI_DEV_DEVICE_ID(pSiS->PciInfo);
pScrn->chipset = (char *)xf86TokenToString(myChipsets, pSiS->Chipset);
}
@ -3464,7 +3467,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->ChipRev);
} else {
pSiS->ChipRev = pSiS->PciInfo->chipRev;
pSiS->ChipRev = PCI_DEV_REVISION(pSiS->PciInfo);
}
@ -3648,7 +3651,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
* by the BIOS. So we can pretty much rely on that these
* are enabled.
*/
pSiS->RelIO = (SISIOADDRESS)(pSiS->PciInfo->ioBase[2] + pSiS->IODBase);
pSiS->RelIO = (SISIOADDRESS)(PCI_REGION_BASE(pSiS->PciInfo, 2, REGION_IO) + pSiS->IODBase);
xf86DrvMsg(pScrn->scrnIndex, X_PROBED, "Relocated I/O registers at 0x%lX\n",
(ULong)pSiS->RelIO);
@ -3769,7 +3772,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
break;
case PCI_CHIP_SIS630: /* 630 + 730 */
pSiS->ChipType = SIS_630;
if(pciReadLong(0x00000000, 0x00) == 0x07301039) {
if(sis_pci_read_host_bridge_u32(0x00) == 0x07301039) {
pSiS->ChipType = SIS_730;
}
pSiS->SiS_SD_Flags |= SiS_SD_IS300SERIES;
@ -3808,7 +3811,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
break;
case PCI_CHIP_SIS650: /* 650 + 740 */
pSiS->ChipType = SIS_650;
if(pciReadLong(0x00000000, 0x00) == 0x07401039) {
if(sis_pci_read_host_bridge_u32(0x00) == 0x07401039) {
pSiS->ChipType = SIS_740;
}
pSiS->ChipFlags |= (SiSCF_Integrated | SiSCF_Real256ECore | SiSCF_MMIOPalette);
@ -3826,7 +3829,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
break;
case PCI_CHIP_SIS660: /* 660, 661, 741, 760, 761, 670(?) */
{
ULong hpciid = pciReadLong(0x00000000, 0x00);
ULong hpciid = sis_pci_read_host_bridge_u32(0x00);
switch(hpciid) {
case 0x06601039:
pSiS->ChipType = SIS_660;
@ -4067,7 +4070,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_SIS6326:
pSiS->oldChipset = OC_SIS6326; break;
case PCI_CHIP_SIS530:
if(pciReadLong(0x00000000, 0x00) == 0x06201039) {
if(sis_pci_read_host_bridge_u32(0x00) == 0x06201039) {
pSiS->oldChipset = OC_SIS620;
} else {
if((pSiS->ChipRev & 0x0f) < 0x0a)
@ -4214,7 +4217,6 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
"Could not allocate memory for video BIOS image\n");
} else {
ULong segstart;
UShort mypciid = pSiS->Chipset;
UShort mypcivendor = (pSiS->ChipFlags & SiSCF_IsXGI) ? PCI_VENDOR_XGI : PCI_VENDOR_SIS;
Bool found = FALSE, readpci = FALSE;
@ -4237,7 +4239,15 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
biossize = 0x8000;
break;
}
#if XSERVER_LIBPCIACCESS
if(readpci) {
pSiS->PciInfo->rom_size = biossize;
pci_device_read_rom(pSiS->PciInfo, pSiS->BIOS);
if(SISCheckBIOS(pSiS, mypciid, mypcivendor, biossize)) {
found = TRUE;
}
}
#else
if(readpci) {
xf86ReadPciBIOS(0, pSiS->PciTag, 0, pSiS->BIOS, biossize);
if(SISCheckBIOS(pSiS, mypciid, mypcivendor, biossize)) {
@ -4246,6 +4256,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
}
if(!found) {
ULong segstart;
for(segstart = BIOS_BASE; segstart < 0x000f0000; segstart += 0x00001000) {
#if XF86_VERSION_CURRENT < XF86_VERSION_NUMERIC(4,2,99,0,0)
@ -4260,7 +4271,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
break;
}
}
#endif
if(found) {
UShort romptr = pSiS->BIOS[0x16] | (pSiS->BIOS[0x17] << 8);
pSiS->SiS_Pr->VirtualRomBase = pSiS->BIOS;
@ -4522,7 +4533,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->FbAddress = pSiS->pEnt->device->MemBase;
from = X_CONFIG;
} else {
pSiS->FbAddress = pSiS->PciInfo->memBase[0] & 0xFFFFFFF0;
pSiS->FbAddress = PCI_REGION_BASE(pSiS->PciInfo, 0, REGION_MEM) & 0xFFFFFFF0;
from = X_PROBED;
}
@ -4546,7 +4557,7 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
pSiS->IOAddress = pSiS->pEnt->device->IOBase;
from = X_CONFIG;
} else {
pSiS->IOAddress = pSiS->PciInfo->memBase[1] & 0xFFFFFFF0;
pSiS->IOAddress = PCI_REGION_BASE(pSiS->PciInfo, 1, REGION_MEM) & 0xFFFFFFF0;
from = X_PROBED;
}
xf86DrvMsg(pScrn->scrnIndex, from, "MMIO registers at 0x%lX (size %ldK)\n",
@ -5064,15 +5075,15 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
if(pSiS->Chipset == PCI_CHIP_SIS630) {
int i = 0;
do {
if(mychswtable[i].subsysVendor == pSiS->PciInfo->subsysVendor &&
mychswtable[i].subsysCard == pSiS->PciInfo->subsysCard) {
if(mychswtable[i].subsysVendor == PCI_SUB_VENDOR_ID(pSiS->PciInfo) &&
mychswtable[i].subsysCard == PCI_SUB_DEVICE_ID(pSiS->PciInfo)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"PCI subsystem ID found in list for Chrontel/GPIO setup:\n");
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"\tVendor/Card: %s %s (ID %04x)\n",
mychswtable[i].vendorName,
mychswtable[i].cardName,
pSiS->PciInfo->subsysCard);
PCI_SUB_DEVICE_ID(pSiS->PciInfo));
pSiS->SiS_Pr->SiS_ChSW = TRUE;
break;
}
@ -5105,8 +5116,8 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
((!SiS_customttable[i].bioschksum) ||
(pSiS->SiS_Pr->UseROM &&
(SiS_customttable[i].bioschksum == chksum))) &&
(SiS_customttable[i].pcisubsysvendor == pSiS->PciInfo->subsysVendor) &&
(SiS_customttable[i].pcisubsyscard == pSiS->PciInfo->subsysCard) ) {
(SiS_customttable[i].pcisubsysvendor == PCI_SUB_VENDOR_ID(pSiS->PciInfo)) &&
(SiS_customttable[i].pcisubsyscard == PCI_SUB_DEVICE_ID(pSiS->PciInfo)) ) {
footprint = TRUE;
for(j=0; j<5; j++) {
if(SiS_customttable[i].biosFootprintAddr[j]) {
@ -5834,14 +5845,14 @@ SISPreInit(ScrnInfoPtr pScrn, int flags)
if(pSiS->SiS_Pr->PDC == -1) {
int i=0;
do {
if(mypdctable[i].subsysVendor == pSiS->PciInfo->subsysVendor &&
mypdctable[i].subsysCard == pSiS->PciInfo->subsysCard) {
if(mypdctable[i].subsysVendor == PCI_SUB_VENDOR_ID(pSiS->PciInfo) &&
mypdctable[i].subsysCard == PCI_SUB_DEVICE_ID(pSiS->PciInfo)) {
xf86DrvMsg(pScrn->scrnIndex, X_INFO,
"PCI card/vendor identified for non-default PanelDelayCompensation\n");
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Vendor: %s, card: %s (ID %04x), PanelDelayCompensation: 0x%02x\n",
mypdctable[i].vendorName, mypdctable[i].cardName,
pSiS->PciInfo->subsysCard, mypdctable[i].pdc);
PCI_SUB_DEVICE_ID(pSiS->PciInfo), mypdctable[i].pdc);
if(pSiS->PDC == -1) {
pSiS->PDC = mypdctable[i].pdc;
} else {
@ -7144,15 +7155,48 @@ SISMapIOPMem(ScrnInfoPtr pScrn)
pSiSEnt->MapCountIOPBase++;
if(!(pSiSEnt->IOPBase)) {
/* Only map if not mapped previously */
#ifndef XSERVER_LIBPCIACCESS
pSiSEnt->IOPBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pSiS->PciTag, pSiS->IOPAddress, 128);
#else
{
void **result = (void **)&pSiSEnt->IOPBase;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOPAddress,
128,
PCI_DEV_MAP_FLAG_WRITABLE,
result);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map IO aperture. %s (%d)\n",
strerror (err), err);
}
}
#endif
}
pSiS->IOPBase = pSiSEnt->IOPBase;
} else
#endif
pSiS->IOPBase = xf86MapPciMem(pScrn->scrnIndex, mmioFlags,
pSiS->PciTag, pSiS->IOPAddress, 128);
#ifndef XSERVER_LIBPCIACCESS
pSiS->IOPBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pSiS->PciTag, pSiS->IOPAddress, 128);
#else
{
void **result = (void **)&pSiS->IOPBase;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOPAddress,
128,
PCI_DEV_MAP_FLAG_WRITABLE,
result);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map IO aperture. %s (%d)\n",
strerror (err), err);
}
}
#endif
if(pSiS->IOPBase == NULL) {
SISErrorLog(pScrn, "Could not map I/O port area\n");
return FALSE;
@ -7222,14 +7266,46 @@ SISMapMem(ScrnInfoPtr pScrn)
pSiSEnt->MapCountIOBase++;
if(!(pSiSEnt->IOBase)) {
/* Only map if not mapped previously */
#ifndef XSERVER_LIBPCIACCESS
pSiSEnt->IOBase = xf86MapPciMem(pScrn->scrnIndex, mmioFlags,
pSiS->PciTag, pSiS->IOAddress, (pSiS->mmioSize * 1024));
#else
void **result = (void **)&pSiSEnt->IOBase;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOAddress,
(pSiS->mmioSize * 1024),
PCI_DEV_MAP_FLAG_WRITABLE,
result);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map IO aperture. %s (%d)\n",
strerror (err), err);
}
#endif
}
pSiS->IOBase = pSiSEnt->IOBase;
} else
#endif
#ifndef XSERVER_LIBPCIACCESS
pSiS->IOBase = xf86MapPciMem(pScrn->scrnIndex, mmioFlags,
pSiS->PciTag, pSiS->IOAddress, (pSiS->mmioSize * 1024));
#else
{
void **result = (void **)&pSiS->IOBase;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOAddress,
(pSiS->mmioSize * 1024),
PCI_DEV_MAP_FLAG_WRITABLE,
result);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map IO aperture. %s (%d)\n",
strerror (err), err);
}
}
#endif
if(pSiS->IOBase == NULL) {
SISErrorLog(pScrn, "Could not map MMIO area\n");
@ -7246,14 +7322,42 @@ SISMapMem(ScrnInfoPtr pScrn)
pSiSEnt->MapCountIOBaseDense++;
if(!(pSiSEnt->IOBaseDense)) {
/* Only map if not mapped previously */
#ifndef XSERVER_LIBPCIACCESS
pSiSEnt->IOBaseDense = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pSiS->PciTag, pSiS->IOAddress, (pSiS->mmioSize * 1024));
#else
void **result = (void **)&pSiSEnt->IOBaseDense;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOAddress,
(pSiS->mmioSize * 1024),
PCI_DEV_MAP_FLAG_WRITABLE,
result);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map IO dense aperture. %s (%d)\n",
strerror (err), err);
#endif
}
pSiS->IOBaseDense = pSiSEnt->IOBaseDense;
} else
#endif
pSiS->IOBaseDense = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
#ifndef XSERVER_LIBPCIACCESS
pSiS->IOBaseDense = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_MMIO,
pSiS->PciTag, pSiS->IOAddress, (pSiS->mmioSize * 1024));
#else
void **result = (void **)&pSiS->IOBaseDense;
int err = pci_device_map_range(pSiS->PciInfo,
pSiS->IOAddress,
(pSiS->mmioSize * 1024),
PCI_DEV_MAP_FLAG_WRITABLE,
result);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map IO dense aperture. %s (%d)\n",
strerror (err), err);
#endif
if(pSiS->IOBaseDense == NULL) {
SISErrorLog(pScrn, "Could not map MMIO dense area\n");
@ -7266,21 +7370,55 @@ SISMapMem(ScrnInfoPtr pScrn)
pSiSEnt->MapCountFbBase++;
if(!(pSiSEnt->FbBase)) {
/* Only map if not mapped previously */
#ifndef XSERVER_LIBPCIACCESS
pSiSEnt->FbBase = pSiSEnt->RealFbBase =
xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pSiS->PciTag, (ULong)pSiS->realFbAddress,
pSiS->FbMapSize);
#else
int err = pci_device_map_range(pSiS->PciInfo,
(ULong)pSiS->realFbAddress,
pSiS->FbMapSize,
PCI_DEV_MAP_FLAG_WRITABLE |
PCI_DEV_MAP_FLAG_WRITE_COMBINE,
(void *)&pSiSEnt->FbBase);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map FB aperture. %s (%d)\n",
strerror (err), err);
return FALSE;
}
pSiSEnt->RealFbBase = pSiSEnt->FbBase;
#endif
}
pSiS->FbBase = pSiS->RealFbBase = pSiSEnt->FbBase;
/* Adapt FbBase (for DHM and SiS76x UMA skipping; dhmOffset is 0 otherwise) */
pSiS->FbBase += pSiS->dhmOffset;
} else {
#endif
pSiS->FbBase = pSiS->RealFbBase =
xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
#ifndef XSERVER_LIBPCIACCESS
pSiS->FbBase = pSiS->RealFbBase =
xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pSiS->PciTag, (ULong)pSiS->realFbAddress,
pSiS->FbMapSize);
#else
int err = pci_device_map_range(pSiS->PciInfo,
(ULong)pSiS->realFbAddress,
pSiS->FbMapSize,
PCI_DEV_MAP_FLAG_WRITABLE |
PCI_DEV_MAP_FLAG_WRITE_COMBINE,
(void *)&pSiS->FbBase);
if (err) {
xf86DrvMsg (pScrn->scrnIndex, X_ERROR,
"Unable to map FB aperture. %s (%d)\n",
strerror (err), err);
return FALSE;
}
pSiS->RealFbBase = pSiS->FbBase;
#endif
pSiS->FbBase += pSiS->dhmOffset;
#ifdef SISDUALHEAD
}
#endif
@ -7847,7 +7985,7 @@ SiSRestore_SiSFB_TVParms(ScrnInfoPtr pScrn)
if(!pSiS->sisfb_tvposvalid) return;
if(!(pSiS->sisfbdevname[0])) return;
if((fd = open(pSiS->sisfbdevname, 'r')) != -1) {
if((fd = open(pSiS->sisfbdevname, O_RDONLY)) != -1) {
parm = (CARD32)((pSiS->sisfb_tvxpos << 16) | (pSiS->sisfb_tvypos & 0xffff));
ioctl(fd, SISFB_SET_TVPOSOFFSET, &parm);
close(fd);

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Global data and definitions
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* SiS driver option evaluation
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Register access macros and register definitions
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Basic hardware and memory detection
*
@ -99,6 +97,140 @@ static const struct _sis6326mclk {
{134, 0, 0x4a, 0xa3 }
};
#ifdef XSERVER_LIBPCIACCESS
struct pci_device *
sis_get_device (int device)
{
struct pci_slot_match bridge_match = {
0, 0, device, PCI_MATCH_ANY, 0
};
struct pci_device_iterator *slot_iterator;
struct pci_device *bridge;
slot_iterator = pci_slot_match_iterator_create (&bridge_match);
bridge = pci_device_next (slot_iterator);
pci_iterator_destroy (slot_iterator);
return bridge;
}
unsigned int
sis_pci_read_device_u32(int device, int offset)
{
struct pci_device *host_bridge = sis_get_device(device);
unsigned int result;
pci_device_cfg_read_u32(host_bridge, &result, offset);
return result;
}
unsigned char
sis_pci_read_device_u8(int device, int offset)
{
struct pci_device *host_bridge = sis_get_device(device);
unsigned char result;
pci_device_cfg_read_u8(host_bridge, &result, offset);
return result;
}
void
sis_pci_write_host_bridge_u32(int offset, unsigned int value)
{
struct pci_device *host_bridge = sis_get_device(0);
pci_device_cfg_write_u32(host_bridge, value, offset);
}
void
sis_pci_write_host_bridge_u8(int offset, unsigned char value)
{
struct pci_device *host_bridge = sis_get_device(0);
pci_device_cfg_write_u8(host_bridge, value, offset);
}
#else
unsigned int
sis_pci_read_device_u32(int device, int offset)
{
PCITAG tag = pciTag(0, device, 0);
return pciReadLong(tag, offset);
}
unsigned char
sis_pci_read_device_u8(int device, int offset)
{
PCITAG tag = pciTag(0, device, 0);
return pciReadByte(tag, offset);
}
void
sis_pci_write_host_bridge_u32(int offset, unsigned int value)
{
pciWriteLong(0x00000000, offset, value);
}
void
sis_pci_write_host_bridge_u8(int offset, unsigned char value)
{
pciWriteByte(0x00000000, offset, value);
}
#endif
unsigned int
sis_pci_read_host_bridge_u32(int offset)
{
return sis_pci_read_device_u32(0, offset);
}
unsigned char
sis_pci_read_host_bridge_u8(int offset)
{
return sis_pci_read_device_u8(0, offset);
}
static int sisESSPresent(ScrnInfoPtr pScrn)
{
int flags = 0;
#ifndef XSERVER_LIBPCIACCESS
int i;
pciConfigPtr pdptr, *systemPCIdevices = NULL;
if((systemPCIdevices = xf86GetPciConfigInfo())) {
i = 0;
while((pdptr = systemPCIdevices[i])) {
if((pdptr->pci_vendor == 0x1274) &&
((pdptr->pci_device == 0x5000) ||
((pdptr->pci_device & 0xFFF0) == 0x1370))) {
flags |= ESS137xPRESENT;
break;
}
i++;
}
}
return flags;
#else
struct pci_id_match id_match = { 0x1274, PCI_MATCH_ANY,
PCI_MATCH_ANY, PCI_MATCH_ANY,
PCI_MATCH_ANY, PCI_MATCH_ANY,
0 };
struct pci_device_iterator *id_iterator;
struct pci_device *ess137x;
id_iterator = pci_id_match_iterator_create(&id_match);
ess137x = pci_device_next(id_iterator);
while (ess137x) {
if ((ess137x->device_id == 0x5000) ||
((ess137x->device_id & 0xfff0) == 0x1370)) {
flags |= ESS137xPRESENT;
}
ess137x = pci_device_next(id_iterator);
}
return flags;
#endif
}
/* For old chipsets, 5597, 6326, 530/620 */
static void
sisOldSetup(ScrnInfoPtr pScrn)
@ -113,7 +245,7 @@ sisOldSetup(ScrnInfoPtr pScrn)
#if 0
UChar newsr13, newsr28, newsr29;
#endif
pciConfigPtr pdptr, *systemPCIdevices = NULL;
if(pSiS->oldChipset <= OC_SIS6225) {
inSISIDXREG(SISSR, 0x0F, temp);
@ -206,22 +338,11 @@ sisOldSetup(ScrnInfoPtr pScrn)
pSiS->Flags &= ~(ESS137xPRESENT);
if(pSiS->Chipset == PCI_CHIP_SIS530) {
if(pSiS->oldChipset == OC_SIS530A) {
if((systemPCIdevices = xf86GetPciConfigInfo())) {
i = 0;
while((pdptr = systemPCIdevices[i])) {
if((pdptr->pci_vendor == 0x1274) &&
((pdptr->pci_device == 0x5000) ||
((pdptr->pci_device & 0xFFF0) == 0x1370))) {
pSiS->Flags |= ESS137xPRESENT;
break;
}
i++;
}
}
if(pSiS->Flags & ESS137xPRESENT) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"SiS530/620: Found ESS device\n");
}
pSiS->Flags |= sisESSPresent(pScrn);
}
if(pSiS->Flags & ESS137xPRESENT) {
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"SiS530/620: Found ESS device\n");
}
}
@ -289,20 +410,20 @@ sis300Setup(ScrnInfoPtr pScrn)
case PCI_CHIP_SIS540:
case PCI_CHIP_SIS630:
pSiS->IsAGPCard = TRUE;
pciconfig = pciReadByte(0x00000000, 0x63);
pciconfig = sis_pci_read_host_bridge_u8(0x63);
if(pciconfig & 0x80) {
pScrn->videoRam = (1 << (((pciconfig & 0x70) >> 4) + 21)) / 1024;
pSiS->BusWidth = 64;
pciconfig = pciReadByte(0x00000000, 0x64);
pciconfig = sis_pci_read_host_bridge_u8(0x64);
if((pciconfig & 0x30) == 0x30) {
pSiS->BusWidth = 128;
pScrn->videoRam <<= 1;
}
ramtype = pciReadByte(0x00000000,0x65);
ramtype = sis_pci_read_host_bridge_u8(0x65);
ramtype &= 0x03;
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Shared Memory Area is on DIMM%d\n", ramtype);
ramtype = pciReadByte(0x00000000,(0x60 + ramtype));
ramtype = sis_pci_read_host_bridge_u8(0x60 + ramtype);
if(ramtype & 0x80) ramtype = 9;
else ramtype = 4;
pSiS->UMAsize = pScrn->videoRam;
@ -568,7 +689,7 @@ sis550Setup(ScrnInfoPtr pScrn)
/* UMA - shared fb */
pScrn->videoRam = 0;
pciconfig = pciReadByte(0x00000000, 0x4c);
pciconfig = sis_pci_read_host_bridge_u8(0x4c);
if(pciconfig & 0xe0) {
pScrn->videoRam = (1 << (((pciconfig & 0xe0) >> 5) - 2)) * 32768;
pSiS->ChipFlags |= SiSCF_760UMA;
@ -580,7 +701,8 @@ sis550Setup(ScrnInfoPtr pScrn)
}
/* LFB - local framebuffer: PCI reg hold total RAM (but configurable in BIOS) */
pciconfig = pciReadByte(0x00000800, 0xcd);
/* TODO */
pciconfig = sis_pci_read_device_u8(1, 0xcd);
pciconfig = (pciconfig >> 1) & 0x03;
i = 0;
if(pciconfig == 0x01) i = 32768;
@ -631,7 +753,7 @@ sis550Setup(ScrnInfoPtr pScrn)
dimmnum = 3;
}
pciconfig = pciReadByte(0x00000000, 0x64);
pciconfig = sis_pci_read_host_bridge_u8(0x64);
if(pciconfig & 0x80) {
pScrn->videoRam = (1 << (((pciconfig & 0x70) >> 4) - 1)) * 32768;
pSiS->UMAsize = pScrn->videoRam;
@ -643,7 +765,7 @@ sis550Setup(ScrnInfoPtr pScrn)
pSiS->BusWidth = 64;
for(i = 0; i <= (dimmnum - 1); i++) {
if(pciconfig & (1 << i)) {
temp = pciReadByte(0x00000000, 0x60 + i);
temp = sis_pci_read_host_bridge_u8(0x60 + i);
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"DIMM%d is %s SDRAM\n",
i, (temp & 0x40) ? "DDR" : "SDR");
@ -652,7 +774,7 @@ sis550Setup(ScrnInfoPtr pScrn)
"DIMM%d is not installed\n", i);
}
}
pciconfig = pciReadByte(0x00000000, 0x7c);
pciconfig = sis_pci_read_host_bridge_u8(0x7c);
ramtype = (pciconfig & 0x02) ? 8 : 4;
alldone = TRUE;
}
@ -662,14 +784,14 @@ sis550Setup(ScrnInfoPtr pScrn)
} else if(pSiS->Chipset == PCI_CHIP_SIS650) {
pciconfig = pciReadByte(0x00000000, 0x64);
pciconfig = sis_pci_read_host_bridge_u8(0x64);
if(pciconfig & 0x80) {
pScrn->videoRam = (1 << (((pciconfig & 0x70) >> 4) + 22)) / 1024;
pSiS->UMAsize = pScrn->videoRam;
pSiS->BusWidth = 64;
for(i=0; i<=3; i++) {
if(pciconfig & (1 << i)) {
temp = pciReadByte(0x00000000, 0x60 + i);
temp = sis_pci_read_host_bridge_u8(0x60 + i);
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"DIMM%d is %s SDRAM\n",
i, (temp & 0x40) ? "DDR" : "SDR");
@ -678,20 +800,19 @@ sis550Setup(ScrnInfoPtr pScrn)
"DIMM%d is not installed\n", i);
}
}
pciconfig = pciReadByte(0x00000000, 0x7c);
pciconfig = sis_pci_read_host_bridge_u8(0x7c);
if(pciconfig & 0x02) ramtype = 8;
else ramtype = 4;
alldone = TRUE;
}
} else {
pciconfig = pciReadByte(0x00000000, 0x63);
pciconfig = sis_pci_read_host_bridge_u8(0x63);
if(pciconfig & 0x80) {
pScrn->videoRam = (1 << (((pciconfig & 0x70) >> 4) + 21)) / 1024;
pSiS->UMAsize = pScrn->videoRam;
pSiS->BusWidth = 64;
ramtype = pciReadByte(0x00000000,0x65);
ramtype = sis_pci_read_host_bridge_u8(0x65);
ramtype &= 0x01;
xf86DrvMsg(pScrn->scrnIndex, X_PROBED,
"Shared Memory Area is on DIMM%d\n", ramtype);

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Copyright (C) 1999-2004 by The XFree86 Project, Inc.
* based on code written by Mark Vojkovich

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* SiS driver utility interface & routines
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Video bridge detection and configuration for 300, 315 and 330 series
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Mode setup and basic video bridge detection
*
@ -1717,8 +1715,13 @@ SiSVGAMapMem(ScrnInfoPtr pScrn)
if(pSiS->VGAMapPhys == 0) pSiS->VGAMapPhys = 0xA0000;
#if XF86_VERSION_CURRENT >= XF86_VERSION_NUMERIC(4,3,0,0,0)
#if XSERVER_LIBPCIACCESS
pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
pSiS->PciInfo, pSiS->VGAMapPhys, pSiS->VGAMapSize);
#else
pSiS->VGAMemBase = xf86MapDomainMemory(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
pSiS->PciTag, pSiS->VGAMapPhys, pSiS->VGAMapSize);
#endif
#else
pSiS->VGAMemBase = xf86MapVidMem(pScrn->scrnIndex, VIDMEM_MMIO_32BIT,
pSiS->VGAMapPhys, pSiS->VGAMapSize);

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis_video.c,v 1.32 2005/09/23 16:34:04 twini Exp $ */
/*
* Xv driver for SiS 300, 315 and 330 series.
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg: driver/xf86-video-sis/src/sis_video.h,v 1.4 2005/07/04 10:57:08 twini Exp $ */
/*
* Xv driver for SiS 300, 315 and 330 series.
*
@ -163,7 +161,7 @@ extern int SISGetPortUtilAttribute(ScrnInfoPtr pScrn, Atom attribute,
#define IMAGE_MAX_WIDTH_315 1920
#define IMAGE_MAX_WIDTH_340 1920 /* ? */
#define IMAGE_MAX_WIDTH_761 1920 /* ? */
#define IMAGE_MAX_HEIGHT_315 1080
#define IMAGE_MAX_HEIGHT_315 1088
#define OVERLAY_MIN_WIDTH 32 /* Minimum overlay sizes */
#define OVERLAY_MIN_HEIGHT 24

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* Xv driver for SiS 300, 315 and 330 series
*

View File

@ -0,0 +1,122 @@
/*
* Copyright 2007 George Sapountzis
*
* 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.
*/
/**
* Macros for porting drivers from legacy xfree86 PCI code to the pciaccess
* library. The main purpose being to facilitate source code compatibility.
*/
#ifndef SISPCIRENAME_H
#define SISPCIRENAME_H
enum region_type {
REGION_MEM,
REGION_IO
};
#ifndef XSERVER_LIBPCIACCESS
/* pciVideoPtr */
#define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor)
#define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->chipType)
#define PCI_DEV_REVISION(_pcidev) ((_pcidev)->chipRev)
#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subsysVendor)
#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subsysCard)
#define PCI_DEV_TAG(_pcidev) pciTag((_pcidev)->bus, \
(_pcidev)->device, \
(_pcidev)->func)
#define PCI_DEV_BUS(_pcidev) ((_pcidev)->bus)
#define PCI_DEV_DEV(_pcidev) ((_pcidev)->device)
#define PCI_DEV_FUNC(_pcidev) ((_pcidev)->func)
/* pciConfigPtr */
#define PCI_CFG_TAG(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->tag)
#define PCI_CFG_BUS(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->busnum)
#define PCI_CFG_DEV(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->devnum)
#define PCI_CFG_FUNC(_pcidev) (((pciConfigPtr)(_pcidev)->thisCard)->funcnum)
/* region addr: xfree86 uses different fields for memory regions and I/O ports */
#define PCI_REGION_BASE(_pcidev, _b, _type) \
(((_type) == REGION_MEM) ? (_pcidev)->memBase[(_b)] \
: (_pcidev)->ioBase[(_b)])
/* region size: xfree86 uses the log2 of the region size,
* but with zero meaning no region, not size of one XXX */
#define PCI_REGION_SIZE(_pcidev, _b) \
(((_pcidev)->size[(_b)] > 0) ? (1 << (_pcidev)->size[(_b)]) : 0)
/* read/write PCI configuration space */
#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \
*(_value_ptr) = pciReadByte(PCI_CFG_TAG(_pcidev), (_offset))
#define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \
*(_value_ptr) = pciReadLong(PCI_CFG_TAG(_pcidev), (_offset))
#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
pciWriteLong(PCI_CFG_TAG(_pcidev), (_offset), (_value))
#else /* XSERVER_LIBPCIACCESS */
typedef struct pci_device *pciVideoPtr;
#define PCI_DEV_VENDOR_ID(_pcidev) ((_pcidev)->vendor_id)
#define PCI_DEV_DEVICE_ID(_pcidev) ((_pcidev)->device_id)
#define PCI_DEV_REVISION(_pcidev) ((_pcidev)->revision)
#define PCI_SUB_VENDOR_ID(_pcidev) ((_pcidev)->subvendor_id)
#define PCI_SUB_DEVICE_ID(_pcidev) ((_pcidev)->subdevice_id)
/* pci-rework functions take a 'pci_device' parameter instead of a tag */
#define PCI_DEV_TAG(_pcidev) (_pcidev)
/* PCI_DEV macros, typically used in printf's, add domain ? XXX */
#define PCI_DEV_BUS(_pcidev) ((_pcidev)->bus)
#define PCI_DEV_DEV(_pcidev) ((_pcidev)->dev)
#define PCI_DEV_FUNC(_pcidev) ((_pcidev)->func)
/* pci-rework functions take a 'pci_device' parameter instead of a tag */
#define PCI_CFG_TAG(_pcidev) (_pcidev)
/* PCI_CFG macros, typically used in DRI init, contain the domain */
#define PCI_CFG_BUS(_pcidev) (((_pcidev)->domain << 8) | \
(_pcidev)->bus)
#define PCI_CFG_DEV(_pcidev) ((_pcidev)->dev)
#define PCI_CFG_FUNC(_pcidev) ((_pcidev)->func)
#define PCI_REGION_BASE(_pcidev, _b, _type) ((_pcidev)->regions[(_b)].base_addr)
#define PCI_REGION_SIZE(_pcidev, _b) ((_pcidev)->regions[(_b)].size)
#define PCI_READ_BYTE(_pcidev, _value_ptr, _offset) \
pci_device_cfg_read_u8((_pcidev), (_value_ptr), (_offset))
#define PCI_READ_LONG(_pcidev, _value_ptr, _offset) \
pci_device_cfg_read_u32((_pcidev), (_value_ptr), (_offset))
#define PCI_WRITE_LONG(_pcidev, _value, _offset) \
pci_device_cfg_write_u32((_pcidev), (_value), (_offset))
#endif /* XSERVER_LIBPCIACCESS */
#endif /* SISPCIRENAME_H */

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* General type definitions for universal mode switching modules
*

View File

@ -1,5 +1,3 @@
/* $XFree86$ */
/* $XdotOrg$ */
/*
* General structure definitions for universal mode switching modules
*