diff options
author | Adam Jackson <ajax@redhat.com> | 2011-12-19 16:06:05 -0500 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2011-12-19 16:06:05 -0500 |
commit | ca19356b3b979b92535f6f22f79c8bab852093a4 (patch) | |
tree | b32fd0f8b12ecbbc0b222a286ce8011c39c6d20d | |
parent | 413eee03287b6e161ce0337df712099b585aa722 (diff) | |
parent | 967f6f20670baa33506c3c1b107260a4f909f3d6 (diff) |
Merge branch 'master' of git+ssh://git.freedesktop.org/git/xorg/driver/xf86-video-apm
-rw-r--r-- | COPYING | 49 | ||||
-rw-r--r-- | Makefile.am | 7 | ||||
-rw-r--r-- | README | 261 | ||||
-rw-r--r-- | README.sgml | 122 | ||||
-rw-r--r-- | configure.ac | 39 | ||||
-rw-r--r-- | man/Makefile.am | 22 | ||||
-rw-r--r-- | src/apm.h | 2 | ||||
-rw-r--r-- | src/apm_driver.c | 10 |
8 files changed, 220 insertions, 292 deletions
@@ -1,12 +1,45 @@ -This is a stub file. This package has not yet had its complete licensing -information compiled. Please see the individual source files for details on -your rights to use and modify this software. +Copyright (C) 1994-2003 The XFree86 Project, Inc. All Rights Reserved. -Please submit updated COPYING files to the Xorg bugzilla: +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: -https://bugs.freedesktop.org/enter_bug.cgi?product=xorg +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. -All licensing questions regarding this software should be directed at the -Xorg mailing list: +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 + +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. -http://lists.freedesktop.org/mailman/listinfo/xorg diff --git a/Makefile.am b/Makefile.am index 16b2f96..4c278ba 100644 --- a/Makefile.am +++ b/Makefile.am @@ -21,13 +21,6 @@ SUBDIRS = src man MAINTAINERCLEANFILES = ChangeLog INSTALL - -if BUILD_LINUXDOC -README: README.sgml - $(MAKE_TEXT) README.sgml && mv README.txt README -endif - -EXTRA_DIST = README.sgml .PHONY: ChangeLog INSTALL INSTALL: @@ -1,113 +1,148 @@ -$XFree86: xc/programs/Xserver/hw/xfree86/drivers/apm/README,v 1.5 2000/02/11 22:35:55 dawes Exp $ - -Note 1: This driver is work in progress. It might not work at all. -Want to help? Docs are at -ftp://beta.xfree86.org/pub/xf86/devel/Documentation/apm - -This is the Alliance Promotion driver for XFree86 4.0+. It currently only -supports the AT3D, AT25 chipsets (found on various Voodoo-Rush cards) and AT24. -There is incomplete support for the 6422. The 6422 chips are supported in the -XFree86 3.3.x series. - -What has worked on my computer : - - XAA for 8/16/24/32 bpp - - DGA and DGA2 - - DPMS - - glide2x - - using as a module - - shadow framebuffer - - AT3D - - AT24 - - AP6422 (although with problems, including locks) - - multi card setup (with and without Xinerama) - - Xv images, even with (slightly modified) glide2x ; note that there is - still a little problem with vertical offset. - -There is some support for PC-98 with the help of Isao Ohishi -(ohishi@aero.rim.or.jp). It's still under development. I hope that 8bpp -works correctly. - -What has not worked : - - I2C (I'm not sure my card, Hercules 128/3D, has proper cabling) - -What is untested : - -What should be done : - - overlays (with the video engine, everything should be overlayable - with everything) - - (why not) 3210 support - - - Loïc Grenié - -Authors: ------------------------------------------------------------------------ -Kent Hamilton Initial creation. -Henrik Harmsen Lots of additions and fixes. <hch@cd.chalmers.se> -Loic Grenie Conversion to 4.0. <grenie@lami.univ-evry.fr> - Additions and fixes. - - -History: ------------------------------------------------------------------------ -Created by Kent Hamilton for Xfree86 from source from Alliance - -Modified 1997-06 by Henrik Harmsen - - Added support for AT3D - - Acceleration added for 8,16,32bpp: (for AT3D and AT24) - - Filled rectangles - - Screen-screen bitblts - - Host-screen color expansion bitblts for text - - DPMS support - - Enabled hardware cursor code (also in 8bpp) - - Set to programmable VCLK clock - - Set MCLK to 57.3 MHz on AT3D. - - Various bugfixes and cleanups - -Modified 1997-07-06 by Henrik Harmsen - - Fixed bug that made the HW cursor screw up on VT switches - - Probably fixed bug that screwed up the screen when using - screen-screen bitblts. This forced me to put an ApmSync() at - the end of ApmSubsequentScreenToScreenCopy() which makes - me unhappy... But: Better it works than not... - -Modified 1997-10-19 by Henrik Harmsen - - HW line drawing. - - HW clipping. - - Added support for ROP's. - - Text acceleration now lots faster and support for accelerated - proportional text. (Uses SCANLINE_PAD_DWORD + clipping). - - Combined write for many register writes gives good - general speedup. (write x+y as a single 32 bit entity, rather - obvious, really...:-) - - Now waits for correct number of free slots in FIFO before - issuing writes to the card. - This seems to have eliminated the last instances of dropped - interrupts from serial IO and no more lost packets in PPP :-) - - Converted cursor support to use XAA interface. - - Fixed ApmSync(). Finally removed call to ApmSync at end of - ApmSubsequentScreenToScreenCopy() :-) - -Modified 1998-03-29 by Henrik Harmsen - - Added DGA support. - - Added accel support for AP6422. Fixed AT24 accel support. - - Fixed clock register calculation for AP6422 and AT24. - - DPMS support for AT24 & AP6422. - - 2% faster text accel for AT24/AT3D :-) - -Modified 1998-12-18 by Loic Grenie - - Converted to Xfree86 4.0 driver interface. (Only support for - AT25/AT3D chips). - -Modified 1999-03-14 by Henrik Harmsen - - Various fixes to bring it up to 3.9Pd. - - Added preliminary (completely untested) support for dynamic - loading. - -Modified 1999-07-07 by Loïc Grenié - - Converted to new RAC. Support for DGA and DGA2, I2C, Rush extension. - -Modified 2000-02-10 by Loïc Grenié - - Bug fixes - - AP6422 (bugged !) - - Xv driver + Information for Alliance Promotion chipset users + Loic Grenie ( <mailto:grenie@math.jussieu.fr>), Henrik + Harmsen ( <mailto:Henrik.Harmsen@erv.ericsson.se>) + 6 March 2000 + ____________________________________________________________ + + Table of Contents + + + 1. Support chipsets + 2. Acceleration + 3. DGA + 4. Video + 5. Shadow framebuffer + 6. Configuration + 7. glide2x + 8. Questions + + + ______________________________________________________________________ + + 1. Support chipsets + + The apm driver in the SVGA server is for Alliance Promotion graphics + chipsets. The following chipsets are supported: + + + o 6422 + + Old chipset. The driver is still very unstable and has computer + crashes. You should use XFree86 3.3.x for this chipset. + + + o AT24 + + As found in Diamond Stealth Video 2500. Quite similar to AT3D. + + o AT25, AT3D + + AT3D is found in Hercules Stingray 128/3D. Most other Voodoo Rush + based cards use the AT25 which is identical except it doesn't have + the 3D stuff in it. + + + 2. Acceleration + + The apm driver uses the XAA in the SVGA server. It has support for the + following acceleration: + + + o Bitblts (rectangle copy operation) + + o Lines (solid, single pixel) + + o Filled rectangles + + o CPU->Screen image transfers. + + o CPU->Screen colour expansion (text accel). + + o Screen->Screen colour expansion (cached text accel). + + o Mono 8x8 pattern fill. Not for 6422. + + o Colour 8x8 pattern fill (in 8bpp). Not for 6422. + + o Hardware cursor. + + o Pixmap caching. + + All in 8, 16 and 32 bpp modes. In 24bpp mode only Bitblts and Filled + rectangles is supported. Also VESA DPMS power save mode is fully + supported with "standby", "suspend" and "off" modes (set with with the + "xset dpms" command). + + + 3. DGA + + Full DGA 2.0 support with framebuffer access and drawing acceleration. + + + 4. Video + + It has limited hardware support for video decoding on the AT24 and + AT25/3D. It can also display an image in YUV colours inside the + desktop. There are some more exotic formats such as YUV 4.1.1, YUV + 4.0.0 and RGB 8,16.32bpp. + + + 5. Shadow framebuffer + + There is a mode, called shadow framebuffer, where the graphics are + used to display the images. All rendering is done in memory in a so- + called shadow framebuffer. This mode is useful if you need lots of + reading in the video memory and to use it you will have to put + + Option "ShadowFB" + + + + in your xorg.conf file. + + + 6. Configuration + + You can turn off hardware cursor by inserting the following line in + the Device section of the xorg.conf file: + + Option "SWcursor" + + + + Or turn off hardware acceleration: + + Option "noaccel" + + + + Or turn off MMIO + + + Option "nolinear" + + + + Do not specify either the amount of video RAM or which chipset in the + config file. It is better to let the driver probe for this. Also don't + put any "clocks" line in the device section since these chips have a + fully programmable clock that can almost take any modeline you throw + at it. It might though fail at some specific clock values but in that + case you should just try a slightly different clock and it should + work. + + + 7. glide2x + + There is support for the XF86Rush extension for use with the glide2x + library. + + + 8. Questions + + Any questions regarding this driver should be sent to Loic Grenie. It + should be possible to add support for the 3210 chipset if someone + needs it. + + + diff --git a/README.sgml b/README.sgml deleted file mode 100644 index d99a746..0000000 --- a/README.sgml +++ /dev/null @@ -1,122 +0,0 @@ -<!DOCTYPE linuxdoc PUBLIC "-//Xorg//DTD linuxdoc//EN" [ -<!ENTITY % defs SYSTEM "defs.ent"> %defs; -]> - -<article> -<title> Information for Alliance Promotion chipset users -<author> Loïc Grenié (<email>grenie@math.jussieu.fr</email>), - Henrik Harmsen (<email>Henrik.Harmsen@erv.ericsson.se</email>) -<date> 6 March 2000 -<ident> -$Id$ -</ident> -<toc> - -<sect> Support chipsets -<p> -The apm driver in the SVGA server is for Alliance Promotion -graphics chipsets. The following chipsets are supported: - -<itemize> -<item> 6422 - - Old chipset. The driver is still very unstable and has computer - crashes. You should use XFree86 3.3.x for this chipset. - - -<item> AT24 - - As found in Diamond Stealth Video 2500. Quite similar to AT3D. - -<item> AT25, AT3D - - AT3D is found in Hercules Stingray 128/3D. Most other Voodoo - Rush based cards use the AT25 which is identical except it - doesn't have the 3D stuff in it. -</itemize> - -<sect> Acceleration -<p> -The apm driver uses the XAA in the -SVGA server. It has support for the following acceleration: - -<itemize> -<item> Bitblts (rectangle copy operation) -<item> Lines (solid, single pixel) -<item> Filled rectangles -<item> CPU->Screen image transfers. -<item> CPU->Screen colour expansion (text accel). -<item> Screen->Screen colour expansion (cached text accel). -<item> Mono 8x8 pattern fill. Not for 6422. -<item> Colour 8x8 pattern fill (in 8bpp). Not for 6422. -<item> Hardware cursor. -<item> Pixmap caching. -</itemize> - -All in 8, 16 and 32 bpp modes. In 24bpp mode only Bitblts and Filled rectangles -is supported. Also VESA DPMS power save mode is fully supported with "standby", -"suspend" and "off" modes (set with with the "xset dpms" command). - -<sect> DGA -<p> -Full DGA 2.0 support with framebuffer access and drawing acceleration. - -<sect> Video -<p> -It has limited hardware support for video decoding on the AT24 and AT25/3D. It can -also display an image in YUV colours inside the desktop. There are some more exotic -formats such as YUV 4.1.1, YUV 4.0.0 and RGB 8,16.32bpp. - -<sect> Shadow framebuffer -<p> -There is a mode, called shadow framebuffer, where the graphics are used -to display the images. All rendering is done in memory in a so-called shadow -framebuffer. This mode is useful if you need lots of reading in the video -memory and to use it you will have to put -<verb> - Option "ShadowFB" -</verb> - -in your xorg.conf file. - -<sect> Configuration -<p> -First: Run the xorgconfig program to create a correct -configuration. - -You can turn off hardware cursor by inserting the following line in the -Device section of the xorg.conf file: -<verb> - Option "SWcursor" -</verb> - -Or turn off hardware acceleration: -<verb> - Option "noaccel" -</verb> - -Or turn off MMIO - -<verb> - Option "nolinear" -</verb> - -Do not specify either the amount of video RAM or which chipset -in the config file. It is better to let the driver probe for this. Also -don't put any "clocks" line in the device section since these chips have -a fully programmable clock that can almost take any modeline you throw -at it. It might though fail at some specific clock values but in that case -you should just try a slightly different clock and it should work. - -<sect> glide2x -<p> -There is support for the XF86Rush extension for use with the glide2x library. - -<sect> Questions -<p> -Any questions regarding this driver should be sent to Loïc -Grenié. It should be possible to add support for the 3210 chipset -if someone needs it. - - -</article> diff --git a/configure.ac b/configure.ac index cab6ca0..780b0a5 100644 --- a/configure.ac +++ b/configure.ac @@ -20,64 +20,61 @@ # # Process this file with autoconf to produce a configure script -AC_PREREQ(2.57) +# Initialize Autoconf +AC_PREREQ([2.60]) AC_INIT([xf86-video-apm], - 1.2.2, + [1.2.3], [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], - xf86-video-apm) - + [xf86-video-apm]) AC_CONFIG_SRCDIR([Makefile.am]) -AM_CONFIG_HEADER([config.h]) +AC_CONFIG_HEADERS([config.h]) AC_CONFIG_AUX_DIR(.) +# Initialize Automake AM_INIT_AUTOMAKE([foreign dist-bzip2]) - AM_MAINTAINER_MODE -# Require xorg-macros: XORG_DEFAULT_OPTIONS +# Require X.Org macros 1.8 or later for MAN_SUBSTS set by XORG_MANPAGE_SECTIONS m4_ifndef([XORG_MACROS_VERSION], - [m4_fatal([must install xorg-macros 1.3 or later before running autoconf/autogen])]) -XORG_MACROS_VERSION(1.3) + [m4_fatal([must install xorg-macros 1.8 or later before running autoconf/autogen])]) +XORG_MACROS_VERSION(1.8) XORG_DEFAULT_OPTIONS -# Checks for programs. +# Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL -AC_PROG_CC AH_TOP([#include "xorg-server.h"]) +# Define a configure option for an alternate module directory AC_ARG_WITH(xorg-module-dir, [ --with-xorg-module-dir=DIR ], [ moduledir="$withval" ], [ moduledir="$libdir/xorg/modules" ]) AC_SUBST(moduledir) -# Checks for extensions +# Store the list of server defined optional extensions in REQUIRED_MODULES XORG_DRIVER_CHECK_EXT(RANDR, randrproto) XORG_DRIVER_CHECK_EXT(RENDER, renderproto) XORG_DRIVER_CHECK_EXT(XV, videoproto) XORG_DRIVER_CHECK_EXT(DPMSExtension, xextproto) -# Checks for pkg-config packages +# Obtain compiler/linker options for the driver dependencies PKG_CHECK_MODULES(XORG, [xorg-server >= 1.0.99.901] xproto fontsproto $REQUIRED_MODULES) PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1], HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]), HAVE_XEXTPROTO_71="no") AM_CONDITIONAL(HAVE_XEXTPROTO_71, [ test "$HAVE_XEXTPROTO_71" = "yes" ]) -# Checks for header files. -AC_HEADER_STDC PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0]) DRIVER_NAME=apm AC_SUBST([DRIVER_NAME]) -XORG_CHECK_LINUXDOC - -AC_OUTPUT([ - Makefile - src/Makefile - man/Makefile +AC_CONFIG_FILES([ + Makefile + src/Makefile + man/Makefile ]) +AC_OUTPUT diff --git a/man/Makefile.am b/man/Makefile.am index 8f2454b..b3688ce 100644 --- a/man/Makefile.am +++ b/man/Makefile.am @@ -31,25 +31,11 @@ EXTRA_DIST = @DRIVER_NAME@.man CLEANFILES = $(driverman_DATA) -SED = sed - -# Strings to replace in man pages -XORGRELSTRING = @PACKAGE_STRING@ - XORGMANNAME = X Version 11 - -MAN_SUBSTS = \ - -e 's|__vendorversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xorgversion__|"$(XORGRELSTRING)" "$(XORGMANNAME)"|' \ - -e 's|__xservername__|Xorg|g' \ - -e 's|__xconfigfile__|xorg.conf|g' \ - -e 's|__projectroot__|$(prefix)|g' \ - -e 's|__appmansuffix__|$(APP_MAN_SUFFIX)|g' \ - -e 's|__drivermansuffix__|$(DRIVER_MAN_SUFFIX)|g' \ - -e 's|__adminmansuffix__|$(ADMIN_MAN_SUFFIX)|g' \ - -e 's|__miscmansuffix__|$(MISC_MAN_SUFFIX)|g' \ - -e 's|__filemansuffix__|$(FILE_MAN_SUFFIX)|g' + +# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure + SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man .man.$(DRIVER_MAN_SUFFIX): - sed $(MAN_SUBSTS) < $< > $@ + $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@ @@ -109,7 +109,7 @@ typedef struct { char *MemMap; pointer BltMap; Bool UnlockCalled; - IOADDRESS iobase, xport, xbase; + unsigned long iobase, xport, xbase; unsigned char savedSR10; CARD8 MiscOut; CARD8 c9, d9, db, Rush; diff --git a/src/apm_driver.c b/src/apm_driver.c index 8ee708f..4e548a4 100644 --- a/src/apm_driver.c +++ b/src/apm_driver.c @@ -418,8 +418,14 @@ ApmPreInit(ScrnInfoPtr pScrn, int flags) hwp = VGAHWPTR(pScrn); vgaHWGetIOBase(hwp); - pApm->iobase = hwp->PIOOffset; - pApm->xport = hwp->PIOOffset + 0x3C4; +#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12 +#define PIOOFFSET hwp->PIOOffset +#else +/* FIXME reintroduce domain support */ +#define PIOOFFSET 0 +#endif + pApm->iobase = PIOOFFSET; + pApm->xport = PIOOFFSET + 0x3C4; /* Set pScrn->monitor */ pScrn->monitor = pScrn->confScreen->monitor; |