Update xf86-video-apm to 1.2.4

This commit is contained in:
matthieu 2012-05-13 20:03:52 +00:00
parent 87d3c25241
commit 210cce104a
17 changed files with 28459 additions and 20708 deletions

View File

@ -1,3 +1,27 @@
Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved.
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 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
XFREE86 PROJECT 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.
Except as contained in this notice, the name of the XFree86 Project shall
not be used in advertising or otherwise to promote the sale, use or other
dealings in this Software without prior written authorization from the
XFree86 Project.
Copyright 2007 George Sapountzis Copyright 2007 George Sapountzis
Permission is hereby granted, free of charge, to any person obtaining a Permission is hereby granted, free of charge, to any person obtaining a

View File

@ -1,3 +1,103 @@
commit d63d7c600cb3927a5a2a5e223252cfd9a44112d4
Author: Julien Cristau <jcristau@debian.org>
Date: Sat May 12 12:46:11 2012 +0200
xf86-video-apm 1.2.4
Signed-off-by: Julien Cristau <jcristau@debian.org>
commit 384531dbd4ea359511c274d3cbd2b34449321ad0
Author: Luc Verhaegen <luc.verhaegen@basyskom.de>
Date: Wed Nov 24 18:21:23 2010 +0100
xv: disable reputimage hook on newer api
This change makes Xv support slightly less nice, but should, in itself,
not deteriorate things too much, as most drivers function acceptably
without reputimage.
Signed-off-by: Luc Verhaegen <luc.verhaegen@basyskom.de>
Signed-off-by: Julien Cristau <jcristau@debian.org>
commit e92c8ed0b03b5a33f4b0c3966e540a31af760402
Author: Julien Cristau <jcristau@debian.org>
Date: Tue May 1 15:27:40 2012 +0200
Disable PC98 code on newer servers
It was removed in xserver commit
6ad7bb69eebd5e5b4068bd9aa0b9a7168f075006, and keeping API compatibility
would have been too hard. Or something.
commit 37630bd20e59e49db3ee0bfa77f82a7c2595a0ac
Author: Julien Cristau <jcristau@debian.org>
Date: Tue May 1 15:25:30 2012 +0200
Stop including xf86PciInfo.h
Deprecated in xserver commit 1f5baa924a5907978f564372265d9830ac72a077
commit 784c3a1fa53771662b4656e193fb392cbb8c8452
Author: Julien Cristau <jcristau@debian.org>
Date: Tue May 1 15:10:39 2012 +0200
Replace x{{,re,c}alloc,free} with malloc/realloc/calloc/free
commit 21f5f7acf9235428ef2bcd5e34d0a44f9e4d838b
Author: Adam Jackson <ajax@redhat.com>
Date: Mon Dec 19 17:44:20 2011 -0500
Fix for new vgaHW ABI
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit f66da557eb7773856081bda2465973dfabf3eaa0
Author: Adam Jackson <ajax@redhat.com>
Date: Mon Dec 19 16:09:34 2011 -0500
Fall back to shadowfb if XAA fails to load
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit ca19356b3b979b92535f6f22f79c8bab852093a4
Merge: 413eee0 967f6f2
Author: Adam Jackson <ajax@redhat.com>
Date: Mon Dec 19 16:06:05 2011 -0500
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-apm
commit 967f6f20670baa33506c3c1b107260a4f909f3d6
Author: Adam Jackson <ajax@redhat.com>
Date: Thu Nov 17 15:50:02 2011 -0500
Check ABI major not encoded ABI
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit 6b195cc0273650d01fc20c26433b929e9683aa5f
Author: Adam Jackson <ajax@redhat.com>
Date: Wed Nov 16 13:02:14 2011 -0500
Adapt to vgahw changes in videoabi 12
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit 9ce6499f013a5b6fdc9440fd3213dbb28b3bf1be
Author: Adam Jackson <ajax@redhat.com>
Date: Wed Nov 16 12:59:00 2011 -0500
s/IOADDRESS/unsigned long/
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit 6f8a776f792c02779a34c911f803fde8c09b93f6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Wed Jul 28 07:42:30 2010 -0700
Add XFree86 Copyright/License to COPYING for all code that came from XF86 4.4
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
commit 876d8aea6c4c442756c03dd6cd64e14e42658d0b commit 876d8aea6c4c442756c03dd6cd64e14e42658d0b
Author: Alan Coopersmith <alan.coopersmith@oracle.com> Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date: Fri Jul 23 15:13:02 2010 -0700 Date: Fri Jul 23 15:13:02 2010 -0700
@ -122,6 +222,16 @@ Date: Sat Jun 12 10:25:31 2010 -0400
Signed-off-by: Gaetan Nadon <memsize@videotron.ca> Signed-off-by: Gaetan Nadon <memsize@videotron.ca>
commit 413eee03287b6e161ce0337df712099b585aa722
Author: Adam Jackson <ajax@redhat.com>
Date: Fri Jun 4 17:10:07 2010 -0400
Remove non-linear framebuffer mapping
It hasn't worked since the pciaccess conversion anyway.
Signed-off-by: Adam Jackson <ajax@redhat.com>
commit aa26b72a5f76012e8246de1e885f707f29e5fc4c commit aa26b72a5f76012e8246de1e885f707f29e5fc4c
Author: Adam Jackson <ajax@redhat.com> Author: Adam Jackson <ajax@redhat.com>
Date: Tue May 18 12:59:36 2010 -0400 Date: Tue May 18 12:59:36 2010 -0400

View File

@ -42,9 +42,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = . top_builddir = .
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@ INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = ${SHELL} $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA) INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name) transform = $(program_transform_name)
NORMAL_INSTALL = : NORMAL_INSTALL = :
@ -105,6 +105,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@ -112,25 +113,21 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@ DRIVER_NAME = @DRIVER_NAME@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ FGREP = @FGREP@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@ GREP = @GREP@
@ -141,23 +138,30 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@ MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
@ -172,6 +176,7 @@ RANLIB = @RANLIB@
SED = @SED@ SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_CFLAGS = @XEXT_CFLAGS@
@ -179,13 +184,13 @@ XEXT_LIBS = @XEXT_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@ XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@ XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XV_NEW_REPUT_FALSE = @XV_NEW_REPUT_FALSE@
XV_NEW_REPUT_TRUE = @XV_NEW_REPUT_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@

File diff suppressed because it is too large Load Diff

View File

@ -35,6 +35,10 @@
/* xextproto 7.1 available */ /* xextproto 7.1 available */
#undef HAVE_XEXTPROTO_71 #undef HAVE_XEXTPROTO_71
/* Define to the sub-directory in which libtool stores uninstalled libraries.
*/
#undef LT_OBJDIR
/* Name of package */ /* Name of package */
#undef PACKAGE #undef PACKAGE
@ -67,3 +71,6 @@
/* Version number of package */ /* Version number of package */
#undef VERSION #undef VERSION
/* XvReputImage takes more all coordinates */
#undef XV_NEW_REPUT

File diff suppressed because it is too large Load Diff

View File

@ -23,7 +23,7 @@
# Initialize Autoconf # Initialize Autoconf
AC_PREREQ([2.60]) AC_PREREQ([2.60])
AC_INIT([xf86-video-apm], AC_INIT([xf86-video-apm],
[1.2.3], [1.2.4],
[https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
[xf86-video-apm]) [xf86-video-apm])
AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_SRCDIR([Makefile.am])
@ -72,6 +72,24 @@ PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
DRIVER_NAME=apm DRIVER_NAME=apm
AC_SUBST([DRIVER_NAME]) AC_SUBST([DRIVER_NAME])
# since we cannot use the result from XORG_DRIVER_CHECK_EXT directly.
AC_CHECK_DECL([XV], [have_xv=yes], [have_xv=false], [#include "xorg/xorg-server.h"])
if test "x$have_xv" = xyes; then
SAVED_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $XORG_CFLAGS"
AC_CHECK_MEMBER([ScrnInfoRec.ModeSet],
[SCRNINFO_HAS_MODESET=yes], [SCRNINFO_HAS_MODESET=no],
[#include "xf86str.h"])
if test "x$SCRNINFO_HAS_MODESET" = xyes; then
AC_DEFINE(XV_NEW_REPUT, 1,
[XvReputImage takes more all coordinates])
fi
CFLAGS="$SAVED_CFLAGS"
fi
AM_CONDITIONAL(XV_NEW_REPUT, test x$XV_NEW_REPUT = xyes)
AC_CONFIG_FILES([ AC_CONFIG_FILES([
Makefile Makefile
src/Makefile src/Makefile

File diff suppressed because it is too large Load Diff

View File

@ -46,9 +46,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@ INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = ${SHELL} $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA) INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name) transform = $(program_transform_name)
NORMAL_INSTALL = : NORMAL_INSTALL = :
@ -94,6 +94,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@ -101,25 +102,21 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@ DRIVER_NAME = @DRIVER_NAME@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ FGREP = @FGREP@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@ GREP = @GREP@
@ -130,23 +127,30 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@ MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
@ -161,6 +165,7 @@ RANLIB = @RANLIB@
SED = @SED@ SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_CFLAGS = @XEXT_CFLAGS@
@ -168,13 +173,13 @@ XEXT_LIBS = @XEXT_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@ XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@ XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XV_NEW_REPUT_FALSE = @XV_NEW_REPUT_FALSE@
XV_NEW_REPUT_TRUE = @XV_NEW_REPUT_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@

View File

@ -67,10 +67,6 @@ Enable or disable the hardware cursor. Default: on.
.BI "Option \*qNoAccel\*q \*q" boolean \*q .BI "Option \*qNoAccel\*q \*q" boolean \*q
Disable or enable acceleration. Default: acceleration is enabled. Disable or enable acceleration. Default: acceleration is enabled.
.TP .TP
.BI "Option \*qNoLinear\*q \*q" boolean \*q
Disable or enable use of linear frame buffer. Default: on.
Note: it may or may not work. Tell me if you need it.
.TP
.BI "Option \*qPciRetry\*q \*q" boolean \*q .BI "Option \*qPciRetry\*q \*q" boolean \*q
Enable or disable PCI retries. Default: off. Enable or disable PCI retries. Default: off.
.TP .TP

View File

@ -49,9 +49,9 @@ pkgincludedir = $(includedir)/@PACKAGE@
top_builddir = .. top_builddir = ..
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
INSTALL = @INSTALL@ INSTALL = @INSTALL@
install_sh_DATA = $(install_sh) -c -m 644 install_sh_DATA = ${SHELL} $(install_sh) -c -m 644
install_sh_PROGRAM = $(install_sh) -c install_sh_PROGRAM = ${SHELL} $(install_sh) -c
install_sh_SCRIPT = $(install_sh) -c install_sh_SCRIPT = ${SHELL} $(install_sh) -c
INSTALL_HEADER = $(INSTALL_DATA) INSTALL_HEADER = $(INSTALL_DATA)
transform = $(program_transform_name) transform = $(program_transform_name)
NORMAL_INSTALL = : NORMAL_INSTALL = :
@ -114,6 +114,7 @@ AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@ AUTOHEADER = @AUTOHEADER@
AUTOMAKE = @AUTOMAKE@ AUTOMAKE = @AUTOMAKE@
AWK = @AWK@ AWK = @AWK@
BASE_CFLAGS = @BASE_CFLAGS@
CC = @CC@ CC = @CC@
CCDEPMODE = @CCDEPMODE@ CCDEPMODE = @CCDEPMODE@
CFLAGS = @CFLAGS@ CFLAGS = @CFLAGS@
@ -121,25 +122,21 @@ CHANGELOG_CMD = @CHANGELOG_CMD@
CPP = @CPP@ CPP = @CPP@
CPPFLAGS = @CPPFLAGS@ CPPFLAGS = @CPPFLAGS@
CWARNFLAGS = @CWARNFLAGS@ CWARNFLAGS = @CWARNFLAGS@
CXX = @CXX@
CXXCPP = @CXXCPP@
CXXDEPMODE = @CXXDEPMODE@
CXXFLAGS = @CXXFLAGS@
CYGPATH_W = @CYGPATH_W@ CYGPATH_W = @CYGPATH_W@
DEFS = @DEFS@ DEFS = @DEFS@
DEPDIR = @DEPDIR@ DEPDIR = @DEPDIR@
DLLTOOL = @DLLTOOL@
DRIVER_MAN_DIR = @DRIVER_MAN_DIR@ DRIVER_MAN_DIR = @DRIVER_MAN_DIR@
DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@ DRIVER_MAN_SUFFIX = @DRIVER_MAN_SUFFIX@
DRIVER_NAME = @DRIVER_NAME@ DRIVER_NAME = @DRIVER_NAME@
DSYMUTIL = @DSYMUTIL@ DSYMUTIL = @DSYMUTIL@
ECHO = @ECHO@ DUMPBIN = @DUMPBIN@
ECHO_C = @ECHO_C@ ECHO_C = @ECHO_C@
ECHO_N = @ECHO_N@ ECHO_N = @ECHO_N@
ECHO_T = @ECHO_T@ ECHO_T = @ECHO_T@
EGREP = @EGREP@ EGREP = @EGREP@
EXEEXT = @EXEEXT@ EXEEXT = @EXEEXT@
F77 = @F77@ FGREP = @FGREP@
FFLAGS = @FFLAGS@
FILE_MAN_DIR = @FILE_MAN_DIR@ FILE_MAN_DIR = @FILE_MAN_DIR@
FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@ FILE_MAN_SUFFIX = @FILE_MAN_SUFFIX@
GREP = @GREP@ GREP = @GREP@
@ -150,23 +147,30 @@ INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LD = @LD@
LDFLAGS = @LDFLAGS@ LDFLAGS = @LDFLAGS@
LIBOBJS = @LIBOBJS@ LIBOBJS = @LIBOBJS@
LIBS = @LIBS@ LIBS = @LIBS@
LIBTOOL = @LIBTOOL@ LIBTOOL = @LIBTOOL@
LIB_MAN_DIR = @LIB_MAN_DIR@ LIB_MAN_DIR = @LIB_MAN_DIR@
LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@ LIB_MAN_SUFFIX = @LIB_MAN_SUFFIX@
LIPO = @LIPO@
LN_S = @LN_S@ LN_S = @LN_S@
LTLIBOBJS = @LTLIBOBJS@ LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@ MAINT = @MAINT@
MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
MAKEINFO = @MAKEINFO@ MAKEINFO = @MAKEINFO@
MANIFEST_TOOL = @MANIFEST_TOOL@
MAN_SUBSTS = @MAN_SUBSTS@ MAN_SUBSTS = @MAN_SUBSTS@
MISC_MAN_DIR = @MISC_MAN_DIR@ MISC_MAN_DIR = @MISC_MAN_DIR@
MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@ MISC_MAN_SUFFIX = @MISC_MAN_SUFFIX@
NM = @NM@
NMEDIT = @NMEDIT@ NMEDIT = @NMEDIT@
OBJDUMP = @OBJDUMP@
OBJEXT = @OBJEXT@ OBJEXT = @OBJEXT@
OTOOL = @OTOOL@
OTOOL64 = @OTOOL64@
PACKAGE = @PACKAGE@ PACKAGE = @PACKAGE@
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_NAME = @PACKAGE_NAME@
@ -181,6 +185,7 @@ RANLIB = @RANLIB@
SED = @SED@ SED = @SED@
SET_MAKE = @SET_MAKE@ SET_MAKE = @SET_MAKE@
SHELL = @SHELL@ SHELL = @SHELL@
STRICT_CFLAGS = @STRICT_CFLAGS@
STRIP = @STRIP@ STRIP = @STRIP@
VERSION = @VERSION@ VERSION = @VERSION@
XEXT_CFLAGS = @XEXT_CFLAGS@ XEXT_CFLAGS = @XEXT_CFLAGS@
@ -188,13 +193,13 @@ XEXT_LIBS = @XEXT_LIBS@
XORG_CFLAGS = @XORG_CFLAGS@ XORG_CFLAGS = @XORG_CFLAGS@
XORG_LIBS = @XORG_LIBS@ XORG_LIBS = @XORG_LIBS@
XORG_MAN_PAGE = @XORG_MAN_PAGE@ XORG_MAN_PAGE = @XORG_MAN_PAGE@
XV_NEW_REPUT_FALSE = @XV_NEW_REPUT_FALSE@
XV_NEW_REPUT_TRUE = @XV_NEW_REPUT_TRUE@
ac_ct_AR = @ac_ct_AR@
ac_ct_CC = @ac_ct_CC@ ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
ac_ct_F77 = @ac_ct_F77@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
am__include = @am__include@ am__include = @am__include@
am__leading_dot = @am__leading_dot@ am__leading_dot = @am__leading_dot@
am__quote = @am__quote@ am__quote = @am__quote@

View File

@ -11,9 +11,6 @@
/* Everything using inb/outb, etc needs "compiler.h" */ /* Everything using inb/outb, etc needs "compiler.h" */
#include "compiler.h" #include "compiler.h"
/* Drivers for PCI hardware need this */
#include "xf86PciInfo.h"
/* Drivers that need to access the PCI config space directly need this */ /* Drivers that need to access the PCI config space directly need this */
#include "xf86Pci.h" #include "xf86Pci.h"
@ -109,14 +106,13 @@ typedef struct {
char *MemMap; char *MemMap;
pointer BltMap; pointer BltMap;
Bool UnlockCalled; Bool UnlockCalled;
IOADDRESS iobase, xport, xbase; unsigned long iobase, xport, xbase;
unsigned char savedSR10; unsigned char savedSR10;
CARD8 MiscOut; CARD8 MiscOut;
CARD8 c9, d9, db, Rush; CARD8 c9, d9, db, Rush;
unsigned int saveCmd; unsigned int saveCmd;
pointer FontInfo; pointer FontInfo;
Bool hwCursor; Bool hwCursor;
Bool noLinear;
ApmRegStr ModeReg, SavedReg; ApmRegStr ModeReg, SavedReg;
CloseScreenProcPtr CloseScreen; CloseScreenProcPtr CloseScreen;
Bool UsePCIRetry; /* Do we use PCI-retry or busy-waiting */ Bool UsePCIRetry; /* Do we use PCI-retry or busy-waiting */

View File

@ -32,16 +32,9 @@ static unsigned char apmROP[] = {
#include "apm_funcs.c" #include "apm_funcs.c"
#define IOP_ACCESS
#include "apm_funcs.c"
#define PSZ 24 #define PSZ 24
#include "apm_funcs.c" #include "apm_funcs.c"
#define PSZ 24
#define IOP_ACCESS
#include "apm_funcs.c"
static void static void
ApmRemoveStipple(FBAreaPtr area) ApmRemoveStipple(FBAreaPtr area)
{ {
@ -279,21 +272,11 @@ ApmAccelInit(ScreenPtr pScreen)
i = 4; i = 4;
else else
i = 8; i = 8;
if (pApm->noLinear) { stat = RDXL_M(0x1FC);
stat = RDXL_IOP(0x1FC); while ((stat & (STATUS_HOSTBLTBUSY | STATUS_ENGINEBUSY)) ||
while ((stat & (STATUS_HOSTBLTBUSY | STATUS_ENGINEBUSY)) || ((stat & STATUS_FIFO) < i)) {
((stat & STATUS_FIFO) < i)) { WRXB_M(0x1FC, 0);
WRXB_IOP(0x1FC, 0);
stat = RDXL_IOP(0x1FC);
}
}
else {
stat = RDXL_M(0x1FC); stat = RDXL_M(0x1FC);
while ((stat & (STATUS_HOSTBLTBUSY | STATUS_ENGINEBUSY)) ||
((stat & STATUS_FIFO) < i)) {
WRXB_M(0x1FC, 0);
stat = RDXL_M(0x1FC);
}
} }
/* Setup current register values */ /* Setup current register values */
@ -316,26 +299,14 @@ ApmAccelInit(ScreenPtr pScreen)
ApmSetupXAAInfo(pApm, pXAAinfo); ApmSetupXAAInfo(pApm, pXAAinfo);
if (!pApm->noLinear) { pApm->SetupForSolidFill = ApmSetupForSolidFill;
pApm->SetupForSolidFill = ApmSetupForSolidFill; pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect;
pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect; pApm->SetupForSolidFill24 = ApmSetupForSolidFill24;
pApm->SetupForSolidFill24 = ApmSetupForSolidFill24; pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24;
pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24; pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy;
pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy; pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy;
pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy; pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24;
pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24; pApm->SubsequentScreenToScreenCopy24= ApmSubsequentScreenToScreenCopy24;
pApm->SubsequentScreenToScreenCopy24 = ApmSubsequentScreenToScreenCopy24;
}
else {
pApm->SetupForSolidFill = ApmSetupForSolidFill_IOP;
pApm->SubsequentSolidFillRect = ApmSubsequentSolidFillRect_IOP;
pApm->SetupForSolidFill24 = ApmSetupForSolidFill24_IOP;
pApm->SubsequentSolidFillRect24 = ApmSubsequentSolidFillRect24_IOP;
pApm->SetupForScreenToScreenCopy = ApmSetupForScreenToScreenCopy_IOP;
pApm->SubsequentScreenToScreenCopy = ApmSubsequentScreenToScreenCopy_IOP;
pApm->SetupForScreenToScreenCopy24 = ApmSetupForScreenToScreenCopy24_IOP;
pApm->SubsequentScreenToScreenCopy24 = ApmSubsequentScreenToScreenCopy24_IOP;
}
/* /*
* Init Rush extension. * Init Rush extension.
@ -427,334 +398,168 @@ void ApmSetupXAAInfo(ApmPtr pApm, XAAInfoRecPtr pXAAinfo)
pXAAinfo->CacheMonoStipple = ApmCacheMonoStipple; pXAAinfo->CacheMonoStipple = ApmCacheMonoStipple;
if (pApm->CurrentLayout.bitsPerPixel != 24) { if (pApm->CurrentLayout.bitsPerPixel != 24) {
if (!pApm->noLinear) {
#define XAA(s) pXAAinfo->s = Apm##s #define XAA(s) pXAAinfo->s = Apm##s
if (pApm->Chipset < AT24) if (pApm->Chipset < AT24)
pXAAinfo->Sync = ApmSync6422; pXAAinfo->Sync = ApmSync6422;
else else
XAA(Sync); XAA(Sync);
/* Accelerated filled rectangles */ /* Accelerated filled rectangles */
pXAAinfo->SolidFillFlags = NO_PLANEMASK; pXAAinfo->SolidFillFlags = NO_PLANEMASK;
XAA(SetupForSolidFill); XAA(SetupForSolidFill);
XAA(SubsequentSolidFillRect); XAA(SubsequentSolidFillRect);
/* Accelerated screen to screen color expansion */ /* Accelerated screen to screen color expansion */
pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK; pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
XAA(SetupForScreenToScreenColorExpandFill); XAA(SetupForScreenToScreenColorExpandFill);
XAA(SubsequentScreenToScreenColorExpandFill); XAA(SubsequentScreenToScreenColorExpandFill);
#if 0 #if 0
The constraints of the transfer range are incompatible with the The constraints of the transfer range are incompatible with the
XAA architecture. I rewrote the XAA functions using ImageWrite XAA architecture. I rewrote the XAA functions using ImageWrite
/* Accelerated CPU to screen color expansion */ /* Accelerated CPU to screen color expansion */
if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) || if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) ||
pApm->Chipset == AT3D) { pApm->Chipset == AT3D) {
pXAAinfo->CPUToScreenColorExpandFillFlags = pXAAinfo->CPUToScreenColorExpandFillFlags =
NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
| BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING | | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND; LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
XAA(SetupForCPUToScreenColorExpandFill); XAA(SetupForCPUToScreenColorExpandFill);
XAA(SubsequentCPUToScreenColorExpandFill); XAA(SubsequentCPUToScreenColorExpandFill);
pXAAinfo->ColorExpandBase = pApm->BltMap; pXAAinfo->ColorExpandBase = pApm->BltMap;
pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024; pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
}
/* Accelerated image transfers */
pXAAinfo->ImageWriteFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK |
SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
LEFT_EDGE_CLIPPING_NEGATIVE_X |
SYNC_AFTER_IMAGE_WRITE;
pXAAinfo->ImageWriteBase = pApm->BltMap;
pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
XAA(SetupForImageWrite);
XAA(SubsequentImageWriteRect);
#endif
pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(WritePixmap);
pXAAinfo->FillImageWriteRectsFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(FillImageWriteRects);
pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X |
BIT_ORDER_IN_BYTE_LSBFIRST;
XAA(WriteBitmap);
pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(TEGlyphRenderer);
/* Accelerated screen-screen bitblts */
pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK;
XAA(SetupForScreenToScreenCopy);
XAA(SubsequentScreenToScreenCopy);
/* Accelerated Line drawing */
pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
XAA(SetClippingRectangle);
pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
if (pApm->Chipset >= AT24) {
XAA(SubsequentSolidBresenhamLine);
/* Pattern fill */
pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK |
HARDWARE_PATTERN_PROGRAMMED_BITS |
HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForMono8x8PatternFill);
XAA(SubsequentMono8x8PatternFillRect);
if (pApm->CurrentLayout.bitsPerPixel == 8) {
pXAAinfo->Color8x8PatternFillFlags = NO_PLANEMASK |
HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForColor8x8PatternFill);
XAA(SubsequentColor8x8PatternFillRect);
}
}
else
pXAAinfo->SubsequentSolidBresenhamLine =
ApmSubsequentSolidBresenhamLine6422;
#undef XAA
} }
else {
#define XAA(s) pXAAinfo->s = Apm##s##_IOP
if (pApm->Chipset < AT24)
pXAAinfo->Sync = ApmSync6422_IOP;
else
XAA(Sync);
/* Accelerated filled rectangles */ /* Accelerated image transfers */
pXAAinfo->SolidFillFlags = NO_PLANEMASK; pXAAinfo->ImageWriteFlags =
XAA(SetupForSolidFill); LEFT_EDGE_CLIPPING | NO_PLANEMASK |
XAA(SubsequentSolidFillRect); SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
LEFT_EDGE_CLIPPING_NEGATIVE_X |
/* Accelerated screen to screen color expansion */ SYNC_AFTER_IMAGE_WRITE;
pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK; pXAAinfo->ImageWriteBase = pApm->BltMap;
XAA(SetupForScreenToScreenColorExpandFill); pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
XAA(SubsequentScreenToScreenColorExpandFill); XAA(SetupForImageWrite);
XAA(SubsequentImageWriteRect);
#if 0
The constraints of the transfer range are incompatible with the
XAA architecture. I rewrote the XAA functions using ImageWrite
/* Accelerated CPU to screen color expansion */
if ((pApm->Chipset == AT24 && pApm->ChipRev >= 4) ||
pApm->Chipset == AT3D) {
pXAAinfo->CPUToScreenColorExpandFillFlags =
NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
| BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
XAA(SetupForCPUToScreenColorExpandFill);
XAA(SubsequentCPUToScreenColorExpandFill);
pXAAinfo->ColorExpandBase = pApm->BltMap;
pXAAinfo->ColorExpandRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
}
/* Accelerated image transfers */
pXAAinfo->ImageWriteFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK |
SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD;
pXAAinfo->ImageWriteBase = pApm->BltMap;
pXAAinfo->ImageWriteRange = (pApm->Chipset >= AT3D) ? 32*1024 : 30*1024;
XAA(SetupForImageWrite);
XAA(SubsequentImageWriteRect);
#endif #endif
pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK | pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X; LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(WritePixmap); XAA(WritePixmap);
pXAAinfo->FillImageWriteRectsFlags = pXAAinfo->FillImageWriteRectsFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK | LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X; LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(FillImageWriteRects); XAA(FillImageWriteRects);
pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK | pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X | LEFT_EDGE_CLIPPING_NEGATIVE_X |
BIT_ORDER_IN_BYTE_LSBFIRST; BIT_ORDER_IN_BYTE_LSBFIRST;
XAA(WriteBitmap); XAA(WriteBitmap);
pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK | pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X; LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(TEGlyphRenderer); XAA(TEGlyphRenderer);
/* Accelerated screen-screen bitblts */ /* Accelerated screen-screen bitblts */
pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK; pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK;
XAA(SetupForScreenToScreenCopy); XAA(SetupForScreenToScreenCopy);
XAA(SubsequentScreenToScreenCopy); XAA(SubsequentScreenToScreenCopy);
/* Accelerated Line drawing */ /* Accelerated Line drawing */
pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE; pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
XAA(SetClippingRectangle); XAA(SetClippingRectangle);
pXAAinfo->SolidBresenhamLineErrorTermBits = 15; pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
if (pApm->Chipset >= AT24) { if (pApm->Chipset >= AT24) {
XAA(SubsequentSolidBresenhamLine); XAA(SubsequentSolidBresenhamLine);
/* Pattern fill */ /* Pattern fill */
pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK |
HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_PROGRAMMED_BITS |
HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForMono8x8PatternFill);
XAA(SubsequentMono8x8PatternFillRect);
if (pApm->CurrentLayout.bitsPerPixel == 8) {
pXAAinfo->Color8x8PatternFillFlags = NO_PLANEMASK |
HARDWARE_PATTERN_SCREEN_ORIGIN; HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForMono8x8PatternFill); XAA(SetupForColor8x8PatternFill);
XAA(SubsequentMono8x8PatternFillRect); XAA(SubsequentColor8x8PatternFillRect);
if (pApm->CurrentLayout.bitsPerPixel == 8) {
pXAAinfo->Color8x8PatternFillFlags = NO_PLANEMASK |
HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForColor8x8PatternFill);
XAA(SubsequentColor8x8PatternFillRect);
}
} }
else
pXAAinfo->SubsequentSolidBresenhamLine =
ApmSubsequentSolidBresenhamLine6422_IOP;
#undef XAA
} }
else
pXAAinfo->SubsequentSolidBresenhamLine =
ApmSubsequentSolidBresenhamLine6422;
#undef XAA
} }
else { else {
if (!pApm->noLinear) {
#define XAA(s) pXAAinfo->s = Apm##s##24 #define XAA(s) pXAAinfo->s = Apm##s##24
XAA(Sync); XAA(Sync);
/* Accelerated filled rectangles */ /* Accelerated filled rectangles */
pXAAinfo->SolidFillFlags = NO_PLANEMASK; pXAAinfo->SolidFillFlags = NO_PLANEMASK;
XAA(SetupForSolidFill); XAA(SetupForSolidFill);
XAA(SubsequentSolidFillRect); XAA(SubsequentSolidFillRect);
#if 0 #if 0
/* Accelerated screen to screen color expansion */ /* Accelerated screen to screen color expansion */
pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK; pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK;
XAA(SetupForScreenToScreenColorExpandFill); XAA(SetupForScreenToScreenColorExpandFill);
XAA(SubsequentScreenToScreenColorExpandFill); XAA(SubsequentScreenToScreenColorExpandFill);
#if 0 #if 0
The constraints of the transfer range are incompatible with the The constraints of the transfer range are incompatible with the
XAA architecture. I rewrote the XAA functions using ImageWrite XAA architecture. I rewrote the XAA functions using ImageWrite
/* Accelerated CPU to screen color expansion */ /* Accelerated CPU to screen color expansion */
if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) { if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) {
pXAAinfo->CPUToScreenColorExpandFillFlags = pXAAinfo->CPUToScreenColorExpandFillFlags =
NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
| BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING | | BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND; LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
XAA(SetupForCPUToScreenColorExpandFill); XAA(SetupForCPUToScreenColorExpandFill);
XAA(SubsequentCPUToScreenColorExpandFill); XAA(SubsequentCPUToScreenColorExpandFill);
pXAAinfo->ColorExpandBase = pApm->BltMap; pXAAinfo->ColorExpandBase = pApm->BltMap;
pXAAinfo->ColorExpandRange = 32*1024; pXAAinfo->ColorExpandRange = 32*1024;
}
/* Accelerated image transfers */
pXAAinfo->ImageWriteFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK |
SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
SYNC_AFTER_IMAGE_WRITE;
pXAAinfo->ImageWriteBase = pApm->BltMap;
pXAAinfo->ImageWriteRange = 32*1024;
XAA(SetupForImageWrite);
XAA(SubsequentImageWriteRect);
#endif
pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(WritePixmap);
pXAAinfo->FillImageWriteRectsFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(FillImageWriteRects);
pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X |
BIT_ORDER_IN_BYTE_LSBFIRST;
XAA(WriteBitmap);
pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(TEGlyphRenderer);
/* Accelerated Line drawing */
pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
XAA(SubsequentSolidBresenhamLine);
XAA(SetClippingRectangle);
pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
/* Pattern fill */
pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY |
HARDWARE_PATTERN_PROGRAMMED_BITS |
HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForMono8x8PatternFill);
XAA(SubsequentMono8x8PatternFillRect);
#endif
/* Accelerated screen-screen bitblts */
pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
XAA(SetupForScreenToScreenCopy);
XAA(SubsequentScreenToScreenCopy);
#undef XAA
} }
else {
#define XAA(s) pXAAinfo->s = Apm##s##24##_IOP
XAA(Sync);
/* Accelerated filled rectangles */ /* Accelerated image transfers */
pXAAinfo->SolidFillFlags = NO_PLANEMASK; pXAAinfo->ImageWriteFlags =
XAA(SetupForSolidFill); LEFT_EDGE_CLIPPING | NO_PLANEMASK |
XAA(SubsequentSolidFillRect); SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD |
SYNC_AFTER_IMAGE_WRITE;
#if 0 pXAAinfo->ImageWriteBase = pApm->BltMap;
/* Accelerated screen to screen color expansion */ pXAAinfo->ImageWriteRange = 32*1024;
pXAAinfo->ScreenToScreenColorExpandFillFlags = NO_PLANEMASK; XAA(SetupForImageWrite);
XAA(SetupForScreenToScreenColorExpandFill); XAA(SubsequentImageWriteRect);
XAA(SubsequentScreenToScreenColorExpandFill);
#if 0
The constraints of the transfer range are incompatible with the
XAA architecture. I rewrote the XAA functions using ImageWrite
/* Accelerated CPU to screen color expansion */
if (pApm->Chipset == AT3D && pApm->ChipRev >= 4) {
pXAAinfo->CPUToScreenColorExpandFillFlags =
NO_PLANEMASK | SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD
| BIT_ORDER_IN_BYTE_MSBFIRST | LEFT_EDGE_CLIPPING |
LEFT_EDGE_CLIPPING_NEGATIVE_X | SYNC_AFTER_COLOR_EXPAND;
XAA(SetupForCPUToScreenColorExpandFill);
XAA(SubsequentCPUToScreenColorExpandFill);
pXAAinfo->ColorExpandBase = pApm->BltMap;
pXAAinfo->ColorExpandRange = 32*1024;
}
/* Accelerated image transfers */
pXAAinfo->ImageWriteFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK |
SCANLINE_PAD_DWORD | CPU_TRANSFER_PAD_QWORD;
pXAAinfo->ImageWriteBase = pApm->BltMap;
pXAAinfo->ImageWriteRange = 32*1024;
XAA(SetupForImageWrite);
XAA(SubsequentImageWriteRect);
#endif #endif
pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK | pXAAinfo->WritePixmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X; LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(WritePixmap); XAA(WritePixmap);
pXAAinfo->FillImageWriteRectsFlags = pXAAinfo->FillImageWriteRectsFlags =
LEFT_EDGE_CLIPPING | NO_PLANEMASK | LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X; LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(FillImageWriteRects); XAA(FillImageWriteRects);
pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK | pXAAinfo->WriteBitmapFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X | LEFT_EDGE_CLIPPING_NEGATIVE_X |
BIT_ORDER_IN_BYTE_LSBFIRST; BIT_ORDER_IN_BYTE_LSBFIRST;
XAA(WriteBitmap); XAA(WriteBitmap);
pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK | pXAAinfo->TEGlyphRendererFlags = LEFT_EDGE_CLIPPING | NO_PLANEMASK |
LEFT_EDGE_CLIPPING_NEGATIVE_X; LEFT_EDGE_CLIPPING_NEGATIVE_X;
XAA(TEGlyphRenderer); XAA(TEGlyphRenderer);
/* Accelerated Line drawing */ /* Accelerated Line drawing */
pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE; pXAAinfo->SolidLineFlags = NO_PLANEMASK | HARDWARE_CLIP_LINE;
XAA(SubsequentSolidBresenhamLine); XAA(SubsequentSolidBresenhamLine);
XAA(SetClippingRectangle); XAA(SetClippingRectangle);
pXAAinfo->SolidBresenhamLineErrorTermBits = 15; pXAAinfo->SolidBresenhamLineErrorTermBits = 15;
/* Pattern fill */ /* Pattern fill */
pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY | pXAAinfo->Mono8x8PatternFillFlags = NO_PLANEMASK | NO_TRANSPARENCY |
HARDWARE_PATTERN_PROGRAMMED_BITS | HARDWARE_PATTERN_PROGRAMMED_BITS |
HARDWARE_PATTERN_SCREEN_ORIGIN; HARDWARE_PATTERN_SCREEN_ORIGIN;
XAA(SetupForMono8x8PatternFill); XAA(SetupForMono8x8PatternFill);
XAA(SubsequentMono8x8PatternFillRect); XAA(SubsequentMono8x8PatternFillRect);
#endif #endif
/* Accelerated screen-screen bitblts */ /* Accelerated screen-screen bitblts */
pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY; pXAAinfo->ScreenToScreenCopyFlags = NO_PLANEMASK | NO_TRANSPARENCY;
XAA(SetupForScreenToScreenCopy); XAA(SetupForScreenToScreenCopy);
XAA(SubsequentScreenToScreenCopy); XAA(SubsequentScreenToScreenCopy);
#undef XAA #undef XAA
}
} }
} }

View File

@ -11,7 +11,6 @@
#include "xf86.h" #include "xf86.h"
#include "xf86_OSproc.h" #include "xf86_OSproc.h"
#include "xf86Pci.h" #include "xf86Pci.h"
#include "xf86PciInfo.h"
#include "xaa.h" #include "xaa.h"
#include "xaalocal.h" #include "xaalocal.h"
#include "apm.h" #include "apm.h"
@ -103,7 +102,7 @@ SECOND_PASS:
if(secondPitch) if(secondPitch)
pitch = secondPitch; pitch = secondPitch;
if(!(newmodes = xrealloc(modes, (*num + 1) * sizeof(DGAModeRec)))) if(!(newmodes = realloc(modes, (*num + 1) * sizeof(DGAModeRec))))
break; break;
modes = newmodes; modes = newmodes;
@ -316,18 +315,10 @@ ApmSetViewport(
* This is just an attempt, because Daryll is tampering with MY * This is just an attempt, because Daryll is tampering with MY
* registers. * registers.
*/ */
if (!pApm->noLinear) { tmp = (RDXB(0xDB) & 0xF4) | 0x0A;
tmp = (RDXB(0xDB) & 0xF4) | 0x0A; WRXB(0xDB, tmp);
WRXB(0xDB, tmp); ApmWriteSeq(0x1B, 0x20);
ApmWriteSeq(0x1B, 0x20); ApmWriteSeq(0x1C, 0x2F);
ApmWriteSeq(0x1C, 0x2F);
}
else {
tmp = (RDXB_IOP(0xDB) & 0xF4) | 0x0A;
WRXB_IOP(0xDB, tmp);
wrinx(pApm->xport, 0x1B, 0x20);
wrinx(pApm->xport, 0x1C, 0x2F);
}
pApm->apmLock = FALSE; pApm->apmLock = FALSE;
} }
pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags); pScrn->AdjustFrame(pScrn->pScreen->myNum, x, y, flags);

View File

@ -28,9 +28,11 @@
#define APM_MAJOR_VERSION PACKAGE_VERSION_MAJOR #define APM_MAJOR_VERSION PACKAGE_VERSION_MAJOR
#define APM_MINOR_VERSION PACKAGE_VERSION_MINOR #define APM_MINOR_VERSION PACKAGE_VERSION_MINOR
#define APM_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL #define APM_PATCHLEVEL PACKAGE_VERSION_PATCHLEVEL
#ifndef PCI_CHIP_AT3D
#define PCI_CHIP_AT3D 0x643D #define PCI_VENDOR_ALLIANCE 0x1142
#endif #define PCI_CHIP_AP6422 0x6422
#define PCI_CHIP_AT24 0x6424
#define PCI_CHIP_AT3D 0x643D
/* bytes to save for text/font data */ /* bytes to save for text/font data */
#define TEXT_AMOUNT 32768 #define TEXT_AMOUNT 32768
@ -189,10 +191,8 @@ ApmGetRec(ScrnInfoPtr pScrn)
static void static void
ApmFreeRec(ScrnInfoPtr pScrn) ApmFreeRec(ScrnInfoPtr pScrn)
{ {
if (pScrn->driverPrivate) { free(pScrn->driverPrivate);
xfree(pScrn->driverPrivate); pScrn->driverPrivate = NULL;
pScrn->driverPrivate = NULL;
}
} }
@ -200,7 +200,7 @@ ApmFreeRec(ScrnInfoPtr pScrn)
static void static void
ApmUnlock(ApmPtr pApm) ApmUnlock(ApmPtr pApm)
{ {
if (pApm->Chipset >= AT3D && !pApm->noLinear) if (pApm->Chipset >= AT3D)
ApmWriteSeq(0x10, 0x12); ApmWriteSeq(0x10, 0x12);
else else
wrinx(pApm->xport, 0x10, 0x12); wrinx(pApm->xport, 0x10, 0x12);
@ -210,7 +210,7 @@ ApmUnlock(ApmPtr pApm)
static void static void
ApmLock(ApmPtr pApm) ApmLock(ApmPtr pApm)
{ {
if (pApm->Chipset >= AT3D && !pApm->noLinear) if (pApm->Chipset >= AT3D)
ApmWriteSeq(0x10, pApm->savedSR10 ? 0 : 0x12); ApmWriteSeq(0x10, pApm->savedSR10 ? 0 : 0x12);
else else
wrinx(pApm->xport, 0x10, pApm->savedSR10 ? 0 : 0x12); wrinx(pApm->xport, 0x10, pApm->savedSR10 ? 0 : 0x12);
@ -300,7 +300,7 @@ ApmProbe(DriverPtr drv, int flags)
} }
xfree(DevSections); free(DevSections);
return foundScreen; return foundScreen;
} }
@ -417,9 +417,16 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
return FALSE; return FALSE;
hwp = VGAHWPTR(pScrn); hwp = VGAHWPTR(pScrn);
vgaHWSetStdFuncs(hwp);
vgaHWGetIOBase(hwp); vgaHWGetIOBase(hwp);
pApm->iobase = hwp->PIOOffset; #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
pApm->xport = hwp->PIOOffset + 0x3C4; #define PIOOFFSET hwp->PIOOffset
#else
/* FIXME reintroduce domain support */
#define PIOOFFSET 0
#endif
pApm->iobase = PIOOFFSET;
pApm->xport = PIOOFFSET + 0x3C4;
/* Set pScrn->monitor */ /* Set pScrn->monitor */
pScrn->monitor = pScrn->confScreen->monitor; pScrn->monitor = pScrn->confScreen->monitor;
@ -483,7 +490,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
xf86CollectOptions(pScrn, NULL); xf86CollectOptions(pScrn, NULL);
/* Process the options */ /* Process the options */
if (!(pApm->Options = xalloc(sizeof(ApmOptions)))) if (!(pApm->Options = malloc(sizeof(ApmOptions))))
return FALSE; return FALSE;
memcpy(pApm->Options, ApmOptions, sizeof(ApmOptions)); memcpy(pApm->Options, ApmOptions, sizeof(ApmOptions));
xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pApm->Options); xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, pApm->Options);
@ -494,21 +501,11 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
/* Default to 8 */ /* Default to 8 */
pScrn->rgbBits = 8; pScrn->rgbBits = 8;
} }
#ifndef XSERVER_LIBPCIACCESS
/* you're getting a linear framebuffer with pciaccess */
if (xf86ReturnOptValBool(pApm->Options, OPTION_NOLINEAR, FALSE)) {
pApm->noLinear = TRUE;
xf86DrvMsg(pScrn->scrnIndex, X_CONFIG, "No linear framebuffer\n");
}
#else
pApm->noLinear = FALSE;
#endif
from = X_DEFAULT; from = X_DEFAULT;
pApm->hwCursor = FALSE; pApm->hwCursor = FALSE;
if (xf86GetOptValBool(pApm->Options, OPTION_HW_CURSOR, &pApm->hwCursor)) if (xf86GetOptValBool(pApm->Options, OPTION_HW_CURSOR, &pApm->hwCursor))
from = X_CONFIG; from = X_CONFIG;
if (pApm->noLinear || if (xf86ReturnOptValBool(pApm->Options, OPTION_SW_CURSOR, FALSE)) {
xf86ReturnOptValBool(pApm->Options, OPTION_SW_CURSOR, FALSE)) {
from = X_CONFIG; from = X_CONFIG;
pApm->hwCursor = FALSE; pApm->hwCursor = FALSE;
} }
@ -683,23 +680,11 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
} }
} }
if (pApm->noLinear) { if (pApm->Chipset >= AT3D)
/* pApm->LinMapSize = 16 * 1024 * 1024;
* TODO not AT3D. else
* XXX ICI XXX pApm->LinMapSize = 6 * 1024 * 1024;
*/ pApm->FbMapSize = 4 * 1024 * 1024;
pApm->LinMapSize = 4 * 1024 * 1024 /* 0x10000 */;
pApm->FbMapSize = 4 * 1024 * 1024 /* 0x10000 */;
if (pApm->Chipset >= AT3D)
pApm->LinAddress += 8 * 1024 * 1024 /* 0xA0000 */;
}
else {
if (pApm->Chipset >= AT3D)
pApm->LinMapSize = 16 * 1024 * 1024;
else
pApm->LinMapSize = 6 * 1024 * 1024;
pApm->FbMapSize = 4 * 1024 * 1024;
}
if (xf86LoadSubModule(pScrn, "int10")) { if (xf86LoadSubModule(pScrn, "int10")) {
void *ptr; void *ptr;
@ -722,7 +707,7 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
if (pEnt->device->videoRam != 0) { if (pEnt->device->videoRam != 0) {
pScrn->videoRam = pEnt->device->videoRam; pScrn->videoRam = pEnt->device->videoRam;
from = X_CONFIG; from = X_CONFIG;
} else if (!pApm->noLinear && pApm->Chipset >= AT3D) { } else if (pApm->Chipset >= AT3D) {
unsigned char d9, db, uc; unsigned char d9, db, uc;
/*unsigned long save;*/ /*unsigned long save;*/
volatile unsigned char *LinMap; volatile unsigned char *LinMap;
@ -791,7 +776,10 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kByte\n", xf86DrvMsg(pScrn->scrnIndex, from, "VideoRAM: %d kByte\n",
pScrn->videoRam); pScrn->videoRam);
if (!xf86IsPc98()) { #if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
if (!xf86IsPc98())
#endif
{
hwp->MapSize = 0x10000; hwp->MapSize = 0x10000;
vgaHWMapMem(pScrn); vgaHWMapMem(pScrn);
if (pApm->I2C) { if (pApm->I2C) {
@ -1008,8 +996,9 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags)
/* Load XAA if needed */ /* Load XAA if needed */
if (!pApm->NoAccel) { if (!pApm->NoAccel) {
if (!xf86LoadSubModule(pScrn, "xaa")) { if (!xf86LoadSubModule(pScrn, "xaa")) {
ApmFreeRec(pScrn); xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Falling back to shadowfb\n");
return FALSE; pApm->NoAccel = TRUE;
pApm->ShadowFB = TRUE;
} }
} }
@ -1077,55 +1066,42 @@ ApmMapMem(ScrnInfoPtr pScrn)
if (pApm->LinMap == NULL) if (pApm->LinMap == NULL)
return FALSE; return FALSE;
if (!pApm->noLinear) { if (pApm->Chipset >= AT3D) {
if (pApm->Chipset >= AT3D) { pApm->FbBase = (void *)(((char *)pApm->LinMap) + 0x800000);
pApm->FbBase = (void *)(((char *)pApm->LinMap) + 0x800000); pApm->VGAMap = ((char *)pApm->LinMap) + 0xFFF000;
pApm->VGAMap = ((char *)pApm->LinMap) + 0xFFF000; pApm->MemMap = ((char *)pApm->LinMap) + 0xFFEC00;
pApm->MemMap = ((char *)pApm->LinMap) + 0xFFEC00; pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
}
else {
pApm->FbBase = (void *)pApm->LinMap;
pApm->VGAMap = NULL;
if (pScrn->videoRam == 6 * 1024 - 32) {
pApm->MemMap = ((char *)pApm->LinMap) + 0x5FF800;
pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x5F8000);
}
else {
pApm->MemMap = ((char *)pApm->LinMap) + 0x3FF800;
pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
}
}
/*
* Initialize chipset
*/
pApm->c9 = RDXB(0xC9);
if (pApm->Chipset >= AT3D) {
pApm->d9 = RDXB(0xD9);
pApm->db = RDXB(0xDB);
/* If you change these two, change them also in apm_funcs.c */
WRXB(0xDB, (pApm->db & 0xF4) | 0x0A);
WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
vgaHWSetMmioFuncs(hwp, (CARD8 *)pApm->LinMap, 0xFFF000);
}
if (pApm->Chipset >= AP6422)
WRXB(0xC9, pApm->c9 | 0x10);
} }
else { else {
pApm->FbBase = pApm->LinMap; pApm->FbBase = (void *)pApm->LinMap;
pApm->VGAMap = NULL;
/* if (pScrn->videoRam == 6 * 1024 - 32) {
* Initialize chipset pApm->MemMap = ((char *)pApm->LinMap) + 0x5FF800;
*/ pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x5F8000);
if (pApm->Chipset >= AT3D) { }
pApm->d9 = RDXB_IOP(0xD9); else {
pApm->db = RDXB_IOP(0xDB); pApm->MemMap = ((char *)pApm->LinMap) + 0x3FF800;
WRXB_IOP(0xDB, pApm->db & 0xF4); pApm->BltMap = (void *)(((char *)pApm->LinMap) + 0x3F8000);
} }
} }
/*
* Initialize chipset
*/
pApm->c9 = RDXB(0xC9);
if (pApm->Chipset >= AT3D) {
pApm->d9 = RDXB(0xD9);
pApm->db = RDXB(0xDB);
/* If you change these two, change them also in apm_funcs.c */
WRXB(0xDB, (pApm->db & 0xF4) | 0x0A);
WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
vgaHWSetMmioFuncs(hwp, (CARD8 *)pApm->LinMap, 0xFFF000);
}
if (pApm->Chipset >= AP6422)
WRXB(0xC9, pApm->c9 | 0x10);
/* /*
* Save color mode * Save color mode
*/ */
@ -1150,14 +1126,8 @@ ApmUnmapMem(ScrnInfoPtr pScrn)
hwp->writeMiscOut(hwp, pApm->MiscOut); hwp->writeMiscOut(hwp, pApm->MiscOut);
if (pApm->LinMap) { if (pApm->LinMap) {
if (pApm->Chipset >= AT3D) { if (pApm->Chipset >= AT3D) {
if (!pApm->noLinear) { WRXB(0xD9, pApm->d9);
WRXB(0xD9, pApm->d9); WRXB(0xDB, pApm->db);
WRXB(0xDB, pApm->db);
}
else {
WRXB_IOP(0xD9, pApm->d9);
WRXB_IOP(0xDB, pApm->db);
}
} }
WRXB(0xC9, pApm->c9); WRXB(0xC9, pApm->c9);
xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, pApm->LinMapSize); xf86UnMapVidMem(pScrn->scrnIndex, (pointer)pApm->LinMap, pApm->LinMapSize);
@ -1187,7 +1157,7 @@ ApmSave(ScrnInfoPtr pScrn)
* Save fonts * Save fonts
*/ */
if (!(hwp->SavedReg.Attribute[0x10] & 1)) { if (!(hwp->SavedReg.Attribute[0x10] & 1)) {
if (pApm->FontInfo || (pApm->FontInfo = (pointer)xalloc(TEXT_AMOUNT))) { if (pApm->FontInfo || (pApm->FontInfo = malloc(TEXT_AMOUNT))) {
int locked; int locked;
locked = ApmReadSeq(0x10); locked = ApmReadSeq(0x10);
@ -1239,18 +1209,10 @@ ApmSave(ScrnInfoPtr pScrn)
ApmReg->SEQ[0x1C] = rdinx(pApm->xport, 0x1C); ApmReg->SEQ[0x1C] = rdinx(pApm->xport, 0x1C);
/* Hardware cursor registers. */ /* Hardware cursor registers. */
if (pApm->noLinear) { ApmReg->EX[XR140] = RDXL(0x140);
ApmReg->EX[XR140] = RDXL_IOP(0x140); ApmReg->EX[XR144] = RDXW(0x144);
ApmReg->EX[XR144] = RDXW_IOP(0x144); ApmReg->EX[XR148] = RDXL(0x148);
ApmReg->EX[XR148] = RDXL_IOP(0x148); ApmReg->EX[XR14C] = RDXW(0x14C);
ApmReg->EX[XR14C] = RDXW_IOP(0x14C);
}
else {
ApmReg->EX[XR140] = RDXL(0x140);
ApmReg->EX[XR144] = RDXW(0x144);
ApmReg->EX[XR148] = RDXL(0x148);
ApmReg->EX[XR14C] = RDXW(0x14C);
}
ApmReg->CRT[0x19] = rdinx(pApm->iobase + 0x3D4, 0x19); ApmReg->CRT[0x19] = rdinx(pApm->iobase + 0x3D4, 0x19);
ApmReg->CRT[0x1A] = rdinx(pApm->iobase + 0x3D4, 0x1A); ApmReg->CRT[0x1A] = rdinx(pApm->iobase + 0x3D4, 0x1A);
@ -1259,26 +1221,14 @@ ApmSave(ScrnInfoPtr pScrn)
ApmReg->CRT[0x1D] = rdinx(pApm->iobase + 0x3D4, 0x1D); ApmReg->CRT[0x1D] = rdinx(pApm->iobase + 0x3D4, 0x1D);
ApmReg->CRT[0x1E] = rdinx(pApm->iobase + 0x3D4, 0x1E); ApmReg->CRT[0x1E] = rdinx(pApm->iobase + 0x3D4, 0x1E);
if (pApm->noLinear) { /* RAMDAC registers. */
/* RAMDAC registers. */ ApmReg->EX[XRE8] = RDXL(0xE8);
ApmReg->EX[XRE8] = RDXL_IOP(0xE8); ApmReg->EX[XREC] = RDXL(0xEC);
ApmReg->EX[XREC] = RDXL_IOP(0xEC);
/* Color correction */ /* Color correction */
ApmReg->EX[XRE0] = RDXL_IOP(0xE0); ApmReg->EX[XRE0] = RDXL(0xE0);
ApmReg->EX[XR80] = RDXB_IOP(0x80); ApmReg->EX[XR80] = RDXB(0x80);
}
else {
/* RAMDAC registers. */
ApmReg->EX[XRE8] = RDXL(0xE8);
ApmReg->EX[XREC] = RDXL(0xEC);
/* Color correction */
ApmReg->EX[XRE0] = RDXL(0xE0);
ApmReg->EX[XR80] = RDXB(0x80);
}
} }
} }
@ -1431,8 +1381,10 @@ ApmModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
hwp->writeMiscOut(hwp, pApm->MiscOut | 0x0F); hwp->writeMiscOut(hwp, pApm->MiscOut | 0x0F);
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
if (xf86IsPc98()) if (xf86IsPc98())
outb(0xFAC, 0xFF); outb(0xFAC, 0xFF);
#endif
memcpy(ApmReg, &pApm->SavedReg, sizeof pApm->SavedReg); memcpy(ApmReg, &pApm->SavedReg, sizeof pApm->SavedReg);
@ -1539,10 +1491,8 @@ ApmModeInit(ScrnInfoPtr pScrn, DisplayModePtr mode)
ApmReg->EX[XRE8] = 0x071F01E8; /* Enable 58MHz MCLK (actually 57.3 MHz) ApmReg->EX[XRE8] = 0x071F01E8; /* Enable 58MHz MCLK (actually 57.3 MHz)
This is what is used in the Windows This is what is used in the Windows
drivers. The BIOS sets it to 50MHz. */ drivers. The BIOS sets it to 50MHz. */
else if (!pApm->noLinear)
ApmReg->EX[XRE8] = RDXL(0xE8); /* No change */
else else
ApmReg->EX[XRE8] = RDXL_IOP(0xE8); /* No change */ ApmReg->EX[XRE8] = RDXL(0xE8); /* No change */
ApmReg->EX[XRE0] = 0x10; ApmReg->EX[XRE0] = 0x10;
@ -1626,10 +1576,7 @@ ApmRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, ApmRegPtr ApmReg)
} }
else { else {
/* Set aperture index to 0. */ /* Set aperture index to 0. */
if (pApm->noLinear) WRXW(0xC0, 0);
WRXW_IOP(0xC0, 0);
else
WRXW(0xC0, 0);
/* /*
* Write the extended registers first * Write the extended registers first
@ -1638,18 +1585,10 @@ ApmRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, ApmRegPtr ApmReg)
wrinx(pApm->xport, 0x1C, ApmReg->SEQ[0x1C]); wrinx(pApm->xport, 0x1C, ApmReg->SEQ[0x1C]);
/* Hardware cursor registers. */ /* Hardware cursor registers. */
if (pApm->noLinear) { WRXL(0x140, ApmReg->EX[XR140]);
WRXL_IOP(0x140, ApmReg->EX[XR140]); WRXW(0x144, ApmReg->EX[XR144]);
WRXW_IOP(0x144, ApmReg->EX[XR144]); WRXL(0x148, ApmReg->EX[XR148]);
WRXL_IOP(0x148, ApmReg->EX[XR148]); WRXW(0x14C, ApmReg->EX[XR14C]);
WRXW_IOP(0x14C, ApmReg->EX[XR14C]);
}
else {
WRXL(0x140, ApmReg->EX[XR140]);
WRXW(0x144, ApmReg->EX[XR144]);
WRXL(0x148, ApmReg->EX[XR148]);
WRXW(0x14C, ApmReg->EX[XR14C]);
}
wrinx(pApm->iobase + 0x3D4, 0x19, ApmReg->CRT[0x19]); wrinx(pApm->iobase + 0x3D4, 0x19, ApmReg->CRT[0x19]);
wrinx(pApm->iobase + 0x3D4, 0x1A, ApmReg->CRT[0x1A]); wrinx(pApm->iobase + 0x3D4, 0x1A, ApmReg->CRT[0x1A]);
@ -1659,27 +1598,14 @@ ApmRestore(ScrnInfoPtr pScrn, vgaRegPtr vgaReg, ApmRegPtr ApmReg)
wrinx(pApm->iobase + 0x3D4, 0x1E, ApmReg->CRT[0x1E]); wrinx(pApm->iobase + 0x3D4, 0x1E, ApmReg->CRT[0x1E]);
/* RAMDAC registers. */ /* RAMDAC registers. */
if (pApm->noLinear) { WRXL(0xE8, ApmReg->EX[XRE8]);
WRXL_IOP(0xE8, ApmReg->EX[XRE8]); WRXL(0xEC, ApmReg->EX[XREC] & ~(1 << 7));
WRXL_IOP(0xEC, ApmReg->EX[XREC] & ~(1 << 7)); WRXL(0xEC, ApmReg->EX[XREC] | (1 << 7)); /* Do a PLL resync */
WRXL_IOP(0xEC, ApmReg->EX[XREC] | (1 << 7)); /* Do a PLL resync */
}
else {
WRXL(0xE8, ApmReg->EX[XRE8]);
WRXL(0xEC, ApmReg->EX[XREC] & ~(1 << 7));
WRXL(0xEC, ApmReg->EX[XREC] | (1 << 7)); /* Do a PLL resync */
}
/* Color correction */ /* Color correction */
if (pApm->noLinear) WRXL(0xE0, ApmReg->EX[XRE0]);
WRXL_IOP(0xE0, ApmReg->EX[XRE0]);
else
WRXL(0xE0, ApmReg->EX[XRE0]);
if (pApm->noLinear) WRXB(0x80, ApmReg->EX[XR80]);
WRXB_IOP(0x80, ApmReg->EX[XR80]);
else
WRXB(0x80, ApmReg->EX[XR80]);
/* /*
* This function handles restoring the generic VGA registers. * This function handles restoring the generic VGA registers.
@ -1735,17 +1661,8 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
pApm->pScreen = pScreen; pApm->pScreen = pScreen;
/* Map the chip memory and MMIO areas */ /* Map the chip memory and MMIO areas */
if (pApm->noLinear) { if (!ApmMapMem(pScrn))
PCI_READ_LONG(pApm->PciInfo, &pApm->saveCmd, PCI_CMD_STAT_REG); return FALSE;
PCI_WRITE_LONG(pApm->PciInfo, pApm->saveCmd | (PCI_CMD_IO_ENABLE | PCI_CMD_MEM_ENABLE), PCI_CMD_STAT_REG);
#ifndef XSERVER_LIBPCIACCESS
pApm->FbBase = xf86MapPciMem(pScrn->scrnIndex, VIDMEM_FRAMEBUFFER,
pApm->PciTag, 0xA0000, 0x10000);
#endif
}
else
if (!ApmMapMem(pScrn))
return FALSE;
/* No memory reserved yet */ /* No memory reserved yet */
pApm->OffscreenReserved = 0; pApm->OffscreenReserved = 0;
@ -1793,7 +1710,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
if(pApm->ShadowFB) { if(pApm->ShadowFB) {
pApm->ShadowPitch = pApm->ShadowPitch =
((pScrn->virtualX * pScrn->bitsPerPixel >> 3) + 3) & ~3L; ((pScrn->virtualX * pScrn->bitsPerPixel >> 3) + 3) & ~3L;
pApm->ShadowPtr = xalloc(pApm->ShadowPitch * pScrn->virtualY); pApm->ShadowPtr = malloc(pApm->ShadowPitch * pScrn->virtualY);
FbBase = pApm->ShadowPtr; FbBase = pApm->ShadowPtr;
} else { } else {
pApm->ShadowPtr = NULL; pApm->ShadowPtr = NULL;
@ -1895,10 +1812,7 @@ ApmScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
xf86DPMSInit(pScreen, ApmDisplayPowerManagementSet, 0); xf86DPMSInit(pScreen, ApmDisplayPowerManagementSet, 0);
if (pApm->noLinear) ApmInitVideo(pScreen);
ApmInitVideo_IOP(pScreen);
else
ApmInitVideo(pScreen);
pScreen->SaveScreen = ApmSaveScreen; pScreen->SaveScreen = ApmSaveScreen;
@ -2023,14 +1937,9 @@ ApmEnterVT(int scrnIndex, int flags)
vgaHWPtr hwp = VGAHWPTR(pScrn); vgaHWPtr hwp = VGAHWPTR(pScrn);
if (pApm->Chipset >= AT3D) { if (pApm->Chipset >= AT3D) {
if (!pApm->noLinear) { /* If you change it, change it also in apm_funcs.c */
/* If you change it, change it also in apm_funcs.c */ WRXB(0xDB, (pApm->db & 0xF4) | 0x0A | pApm->Rush);
WRXB(0xDB, (pApm->db & 0xF4) | 0x0A | pApm->Rush); WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
WRXB(0xD9, (pApm->d9 & 0xCF) | 0x20);
}
else {
WRXB_IOP(0xDB, pApm->db & 0xF4);
}
} }
if (pApm->Chipset >= AP6422) if (pApm->Chipset >= AP6422)
WRXB(0xC9, pApm->c9 | 0x10); WRXB(0xC9, pApm->c9 | 0x10);
@ -2064,19 +1973,15 @@ ApmLeaveVT(int scrnIndex, int flags)
vgaHWLock(hwp); vgaHWLock(hwp);
ApmLock(pApm); ApmLock(pApm);
if (pApm->Chipset >= AT3D) { if (pApm->Chipset >= AT3D) {
if (!pApm->noLinear) { WRXB(0xD9, pApm->d9);
WRXB(0xD9, pApm->d9); WRXB(0xDB, pApm->db);
WRXB(0xDB, pApm->db);
}
else {
WRXB_IOP(0xD9, pApm->d9);
WRXB_IOP(0xDB, pApm->db);
}
} }
WRXB(0xC9, pApm->c9); WRXB(0xC9, pApm->c9);
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
if (xf86IsPc98()) if (xf86IsPc98())
outb(0xFAC, 0xFE); outb(0xFAC, 0xFE);
#endif
} }
/* /*
@ -2105,15 +2010,15 @@ ApmCloseScreen(int scrnIndex, ScreenPtr pScreen)
if(pApm->CursorInfoRec) if(pApm->CursorInfoRec)
xf86DestroyCursorInfoRec(pApm->CursorInfoRec); xf86DestroyCursorInfoRec(pApm->CursorInfoRec);
pApm->CursorInfoRec = NULL; pApm->CursorInfoRec = NULL;
if (pApm->DGAModes) free(pApm->DGAModes);
xfree(pApm->DGAModes); free(pApm->adaptor);
if (pApm->adaptor)
xfree(pApm->adaptor);
pScrn->vtSema = FALSE; pScrn->vtSema = FALSE;
#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
if (xf86IsPc98()) if (xf86IsPc98())
outb(0xFAC, 0xFE); outb(0xFAC, 0xFE);
#endif
pScreen->CloseScreen = pApm->CloseScreen; pScreen->CloseScreen = pApm->CloseScreen;
return (*pScreen->CloseScreen)(scrnIndex, pScreen); return (*pScreen->CloseScreen)(scrnIndex, pScreen);
@ -2178,13 +2083,8 @@ ApmDisplayPowerManagementSet(ScrnInfoPtr pScrn, int PowerManagementMode,
default: default:
dpmsreg = 0; dpmsreg = 0;
} }
if (pApm->noLinear) { tmp = RDXB(0xD0);
tmp = RDXB_IOP(0xD0); WRXB(0xD0, (tmp & 0xFC) | dpmsreg);
WRXB_IOP(0xD0, (tmp & 0xFC) | dpmsreg);
} else {
tmp = RDXB(0xD0);
WRXB(0xD0, (tmp & 0xFC) | dpmsreg);
}
} }
static Bool static Bool

View File

@ -7,41 +7,15 @@
#ifndef PSZ #ifndef PSZ
#define PSZ 8 #define PSZ 8
#endif #endif
#ifdef IOP_ACCESS
# define APM_SUFF_IOP "_IOP"
# undef RDXB
# undef RDXW
# undef RDXL
# undef WRXB
# undef WRXW
# undef WRXL
# undef ApmWriteSeq
# define RDXB RDXB_IOP
# define RDXW RDXW_IOP
# define RDXL RDXL_IOP
# define WRXB WRXB_IOP
# define WRXW WRXW_IOP
# define WRXL WRXL_IOP
# define ApmWriteSeq(i, v) wrinx(pApm->xport, i, v)
#else
# define APM_SUFF_IOP ""
#endif
#if PSZ == 24 #if PSZ == 24
# define APM_SUFF_24 "24" # define APM_SUFF_24 "24"
# ifdef IOP_ACCESS # define A(s) Apm##s##24
# define A(s) Apm##s##24##_IOP
# else
# define A(s) Apm##s##24
# endif
#else #else
# define APM_SUFF_24 "" # define APM_SUFF_24 ""
# ifdef IOP_ACCESS # define A(s) Apm##s
# define A(s) Apm##s##_IOP
# else
# define A(s) Apm##s
# endif
#endif #endif
#define DPRINTNAME(s) do { xf86DrvMsgVerb(pScrn->pScreen->myNum, X_NOTICE, 6, "Apm" #s APM_SUFF_24 APM_SUFF_IOP "\n"); } while (0) #define DPRINTNAME(s) do { xf86DrvMsgVerb(pScrn->pScreen->myNum, X_NOTICE, 6, "Apm" #s APM_SUFF_24 "\n"); } while (0)
#if PSZ == 24 #if PSZ == 24
#undef SETSOURCEXY #undef SETSOURCEXY
@ -728,7 +702,7 @@ A(TEGlyphRenderer)(ScrnInfoPtr pScrn, int x, int y, int w, int h,
dwords = (w2 + 31) >> 5; dwords = (w2 + 31) >> 5;
dwords <<= 2; dwords <<= 2;
base0 = base = (CARD32*)xalloc(dwords * h); base0 = base = malloc(dwords * h);
if (!base) if (!base)
return; /* Should not happen : it's rather small... */ return; /* Should not happen : it's rather small... */
@ -739,7 +713,7 @@ A(TEGlyphRenderer)(ScrnInfoPtr pScrn, int x, int y, int w, int h,
A(WriteBitmap)(pScrn, x, y, w, h2, (unsigned char *)base0, dwords, A(WriteBitmap)(pScrn, x, y, w, h2, (unsigned char *)base0, dwords,
skipleft, fg, bg, rop, planemask); skipleft, fg, bg, rop, planemask);
xfree(base0); free(base0);
} }
static void A(SetupForMono8x8PatternFill)(ScrnInfoPtr pScrn, int patx, int paty, static void A(SetupForMono8x8PatternFill)(ScrnInfoPtr pScrn, int patx, int paty,
@ -1495,7 +1469,7 @@ A(Sync)(ScrnInfoPtr pScrn)
WRXB(0x1FF, 0); WRXB(0x1FF, 0);
if (!xf86ServerIsExiting()) if (!xf86ServerIsExiting())
FatalError("Hung in ApmSync" APM_SUFF_24 APM_SUFF_IOP "(%d) (Status = 0x%08X)\n", pScrn->pScreen->myNum, status); FatalError("Hung in ApmSync" APM_SUFF_24 "(%d) (Status = 0x%08X)\n", pScrn->pScreen->myNum, status);
} }
if (pApm->apmClip) { if (pApm->apmClip) {
SETCLIP_CTRL(0); SETCLIP_CTRL(0);
@ -1559,6 +1533,4 @@ A(Sync6422)(ScrnInfoPtr pScrn)
#undef A #undef A
#undef DEPTH #undef DEPTH
#undef PSZ #undef PSZ
#undef IOP_ACCESS
#undef APM_SUFF_24 #undef APM_SUFF_24
#undef APM_SUFF_IOP

View File

@ -19,7 +19,6 @@ static XF86VideoAdaptorPtr A(SetupImageVideo)(ScreenPtr);
static void A(StopVideo)(ScrnInfoPtr, pointer, Bool); static void A(StopVideo)(ScrnInfoPtr, pointer, Bool);
static int A(SetPortAttribute)(ScrnInfoPtr, Atom, INT32, pointer); static int A(SetPortAttribute)(ScrnInfoPtr, Atom, INT32, pointer);
#ifndef IOP_ACCESS
static int ApmGetPortAttribute(ScrnInfoPtr, Atom ,INT32 *, pointer); static int ApmGetPortAttribute(ScrnInfoPtr, Atom ,INT32 *, pointer);
static void ApmQueryBestSize(ScrnInfoPtr, Bool, short, short, short, static void ApmQueryBestSize(ScrnInfoPtr, Bool, short, short, short,
short, unsigned int *, unsigned int *, short, unsigned int *, unsigned int *,
@ -27,9 +26,10 @@ static void ApmQueryBestSize(ScrnInfoPtr, Bool, short, short, short,
static int ApmQueryImageAttributes(ScrnInfoPtr, int, static int ApmQueryImageAttributes(ScrnInfoPtr, int,
unsigned short *, unsigned short *, unsigned short *, unsigned short *,
int *, int *); int *, int *);
#endif #ifndef XV_NEW_REPUT
static int A(ReputImage)(ScrnInfoPtr, short, short, RegionPtr, pointer, static int A(ReputImage)(ScrnInfoPtr, short, short, RegionPtr, pointer,
DrawablePtr); DrawablePtr);
#endif
static int A(PutImage)(ScrnInfoPtr, short, short, short, short, short, static int A(PutImage)(ScrnInfoPtr, short, short, short, short, short,
short, short, short, int, unsigned char*, short, short, short, int, unsigned char*,
short, short, Bool, RegionPtr, pointer, short, short, Bool, RegionPtr, pointer,
@ -55,7 +55,7 @@ void A(InitVideo)(ScreenPtr pScreen)
if (pApm->Chipset >= AT24) { if (pApm->Chipset >= AT24) {
if ((newAdaptor = A(SetupImageVideo)(pScreen))) { if ((newAdaptor = A(SetupImageVideo)(pScreen))) {
newAdaptors = xalloc((num_adaptors + 1) * newAdaptors = malloc((num_adaptors + 1) *
sizeof(XF86VideoAdaptorPtr*)); sizeof(XF86VideoAdaptorPtr*));
if(newAdaptors) { if(newAdaptors) {
if(num_adaptors) if(num_adaptors)
@ -72,8 +72,7 @@ void A(InitVideo)(ScreenPtr pScreen)
if(num_adaptors) if(num_adaptors)
xf86XVScreenInit(pScreen, adaptors, num_adaptors); xf86XVScreenInit(pScreen, adaptors, num_adaptors);
if(freeAdaptors) free(adaptors);
xfree(adaptors);
} }
#ifndef APM_VIDEO_DEFINES #ifndef APM_VIDEO_DEFINES
@ -302,9 +301,9 @@ A(SetupImageVideo)(ScreenPtr pScreen)
XF86VideoAdaptorPtr adapt; XF86VideoAdaptorPtr adapt;
ApmPortPrivPtr pPriv; ApmPortPrivPtr pPriv;
if(!(adapt = xcalloc(1, sizeof(XF86VideoAdaptorRec) + if(!(adapt = calloc(1, sizeof(XF86VideoAdaptorRec) +
2 * sizeof(ApmPortPrivRec) + 2 * sizeof(ApmPortPrivRec) +
2 * sizeof(DevUnion)))) 2 * sizeof(DevUnion))))
return NULL; return NULL;
adapt->type = XvWindowMask | XvInputMask | XvImageMask; adapt->type = XvWindowMask | XvInputMask | XvImageMask;
@ -336,7 +335,9 @@ A(SetupImageVideo)(ScreenPtr pScreen)
adapt->GetPortAttribute = ApmGetPortAttribute; adapt->GetPortAttribute = ApmGetPortAttribute;
adapt->QueryBestSize = ApmQueryBestSize; adapt->QueryBestSize = ApmQueryBestSize;
adapt->PutImage = A(PutImage); adapt->PutImage = A(PutImage);
#ifndef XV_NEW_REPUT
adapt->ReputImage = A(ReputImage); adapt->ReputImage = A(ReputImage);
#endif
adapt->QueryImageAttributes = ApmQueryImageAttributes; adapt->QueryImageAttributes = ApmQueryImageAttributes;
pPriv->brightness = 0; pPriv->brightness = 0;
@ -358,7 +359,6 @@ A(SetupImageVideo)(ScreenPtr pScreen)
return adapt; return adapt;
} }
#ifndef IOP_ACCESS
/* ApmClipVideo - /* ApmClipVideo -
Takes the dst box in standard X BoxRec form (top and left Takes the dst box in standard X BoxRec form (top and left
@ -420,7 +420,6 @@ ApmClipVideo(BoxPtr dst, INT32 *x1, INT32 *x2, INT32 *y1, INT32 *y2,
else else
*scaley = ((*y2 - *y1) / (dst->y2 - dst->y1)) >> 4; *scaley = ((*y2 - *y1) / (dst->y2 - dst->y1)) >> 4;
} }
#endif
static void static void
A(StopVideo)(ScrnInfoPtr pScrn, pointer data, Bool shutdown) A(StopVideo)(ScrnInfoPtr pScrn, pointer data, Bool shutdown)
@ -457,7 +456,6 @@ A(SetPortAttribute)(ScrnInfoPtr pScrn, Atom attribute, INT32 value,
return Success; return Success;
} }
#ifndef IOP_ACCESS
static int static int
ApmGetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value, ApmGetPortAttribute(ScrnInfoPtr pScrn, Atom attribute, INT32 *value,
pointer data) pointer data)
@ -485,7 +483,6 @@ ApmQueryBestSize(ScrnInfoPtr pScrn, Bool motion, short vid_w, short vid_h,
*p_w = drw_w & round; *p_w = drw_w & round;
*p_h = drw_h & round; *p_h = drw_h & round;
} }
#endif
static void A(XvMoveCB)(FBAreaPtr area1, FBAreaPtr area2) static void A(XvMoveCB)(FBAreaPtr area1, FBAreaPtr area2)
{ {
@ -903,7 +900,6 @@ A(PutImage)(ScrnInfoPtr pScrn, short src_x, short src_y,
return Success; return Success;
} }
#ifndef IOP_ACCESS
static int static int
ApmQueryImageAttributes(ScrnInfoPtr pScrn, int id, ApmQueryImageAttributes(ScrnInfoPtr pScrn, int id,
unsigned short *w, unsigned short *h, unsigned short *w, unsigned short *h,
@ -949,5 +945,5 @@ common:
return size; return size;
} }
#endif
#endif #endif