summaryrefslogtreecommitdiff
path: root/extra/xf86-video-s3virge/git-fixes.patch
diff options
context:
space:
mode:
Diffstat (limited to 'extra/xf86-video-s3virge/git-fixes.patch')
-rw-r--r--extra/xf86-video-s3virge/git-fixes.patch1644
1 files changed, 0 insertions, 1644 deletions
diff --git a/extra/xf86-video-s3virge/git-fixes.patch b/extra/xf86-video-s3virge/git-fixes.patch
deleted file mode 100644
index 4cf0a5637..000000000
--- a/extra/xf86-video-s3virge/git-fixes.patch
+++ /dev/null
@@ -1,1644 +0,0 @@
-diff --git a/COPYING b/COPYING
-index 7f33cbf..727ca51 100644
---- a/COPYING
-+++ b/COPYING
-@@ -1,12 +1,60 @@
--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-2000 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, FIT-
-+NESS 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.
-+
-+Written by Jake Richter Copyright (c) 1989, 1990 Panacea Inc., Londonderry,
-+NH - All Rights Reserved
-+
-+This code may be freely incorporated in any program without royalty, as long
-+as the copyright notice stays intact.
-+
-+Additions by Kevin E. Martin (martin@cs.unc.edu)
-+
-+KEVIN E. MARTIN DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
-+INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
-+EVENT SHALL KEVIN E. MARTIN BE LIABLE FOR ANY SPECIAL, INDIRECT OR
-+CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
-+USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
-+OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
-+PERFORMANCE OF THIS SOFTWARE.
-+
-+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/ChangeLog b/ChangeLog
-deleted file mode 100644
-index 8ef0a7c..0000000
---- a/ChangeLog
-+++ /dev/null
-@@ -1,69 +0,0 @@
--2006-04-07 Adam Jackson <ajax@freedesktop.org>
--
-- * configure.ac:
-- * src/s3v_driver.c:
-- Bump to 1.9.1 for Xv changes.
--
--2006-04-07 Aaron Plattner <aplattner@nvidia.com>
--
-- * src/s3v_xv.c:
-- Add a DrawablePtr argument to the XV functions to pave the way for
-- redirected video.
--
--2006-04-07 Adam Jackson <ajax@freedesktop.org>
--
-- * configure.ac:
-- * src/s3v.h:
-- * src/s3v_dga.c:
-- * src/s3v_driver.c:
-- * src/s3v_i2c.c:
-- * src/s3v_shadow.c:
-- Unlibcwrap. Bump server version requirement. Bump to 1.9.0.
--
--2006-02-08 Luc Verhaegen <libv@skynet.be>
--
-- * src/s3v.h:
-- * src/s3v_driver.c: (S3VPreInit):
--
-- Remove another insane use of pScrn->clock. Code ended up being ignored
-- anyway.
--
--2005-12-20 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * configure.ac:
-- Update package version for X11R7 release.
--
--2005-12-14 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * configure.ac:
-- Update package version number for final X11R7 release candidate.
--
--2005-12-06 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * man/Makefile.am:
-- Change *man_SOURCES ==> *man_PRE to fix autotools warnings.
--
--2005-12-03 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * configure.ac:
-- Update package version number for X11R7 RC3 release.
--
--2005-12-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * configure.ac:
-- Remove extraneous AC_MSG_RESULT.
--
--2005-11-29 Adam Jackson <ajax@freedesktop.org>
--
-- * configure.ac:
-- Only build dlloader modules by default.
--
--2005-11-09 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * configure.ac:
-- Update package version number for X11R7 RC2 release.
--
--2005-11-01 Kevin E. Martin <kem-at-freedesktop-dot-org>
--
-- * configure.ac:
-- Update pkgcheck dependencies to work with separate build roots.
-diff --git a/Makefile.am b/Makefile.am
-index 4443535..8467821 100644
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -18,12 +18,17 @@
- # 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.
-
--AUTOMAKE_OPTIONS = foreign
- SUBDIRS = src man
-+MAINTAINERCLEANFILES = ChangeLog INSTALL
-
--if BUILD_LINUXDOC
--README: README.sgml
-- $(MAKE_TEXT) README.sgml && mv README.txt README
--endif
-+EXTRA_DIST = CALLMAP
-
--EXTRA_DIST = CALLMAP TODO_NOTES README.sgml
-+.PHONY: ChangeLog INSTALL
-+
-+INSTALL:
-+ $(INSTALL_CMD)
-+
-+ChangeLog:
-+ $(CHANGELOG_CMD)
-+
-+dist-hook: ChangeLog INSTALL
-diff --git a/README b/README
-index 72b75b2..036eec8 100644
---- a/README
-+++ b/README
-@@ -1,112 +1,88 @@
--xf86-video-s3virge - S3 ViRGE video driver for the Xorg X server
--
--Please submit bugs & patches to the Xorg bugzilla:
--
-- https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
--
--All questions regarding this software should be directed at the
--Xorg mailing list:
--
-- http://lists.freedesktop.org/mailman/listinfo/xorg
--
--The master development code repository can be found at:
--
-- git://anongit.freedesktop.org/git/xorg/driver/xf86-video-s3virge
--
-- http://cgit.freedesktop.org/xorg/driver/xf86-video-s3virge
--
--For more information on the git code manager, see:
--
-- http://wiki.x.org/wiki/GitPage
--
--------------------------------------------------------------------------
--What works:
--- Supports 8bpp, 15/16bpp, 24bpp and 32bpp. Heavy testing on ViRGE DX.
--- There is some known instability in ViRGE GX2, please report problems.
--- Silken Mouse is enabled by default, use the generic server option of
-- -nosilk to disable it.
--
--XCONFIG options:
--
--The driver supports quite a few different XConfig options, which can
--be used to tune the driver and improve performance. Without any options,
--the driver will use conservative settings which should work on most
--hardware. Large improvements in performance are possible by selecting
--the proper options, which will probably work on most systems.
--
--Cursor:
--
--- "hwcursor" "off" behaves exactly like "swcursor". Default: "on"
--- "swcursor" will disable the HW Cursor. HW Cursor is used by default and
-- no option is needed to enable it.
--
--Display:
--- "ShadowFB" Use shadow framebuffer. Disables HW acceleration. Default: off.
--- "Rotate" " cw "|" ccw " Rotate the screen CW - clockwise or CCW - counter
-- clockwise. Disables HW Acceleration and HW Cursor, uses ShadowFB.
-- Default: no rotation.
--- "XVideo" Disable XVideo support by using the off option. This changes FIFO
-- settings which prevent screen noise for high-res modes. Default: on
--
--Video memory:
--
--- "slow_edodram" will switch the standard ViRGE to 2-cycle edo mode. Try this
-- if you encounter pixel corruption on the ViRGE. Using this option will
-- cause a large decrease in performance.
--- "fpm_vram" will switch the ViRGE/VX to fast page mode vram mode
--- "slow_dram " | " fast_dram" Change Trio 3D and 3D/2X memory options.
-- Default: Use BIOS defaults.
--- "early_ras_precharge", "late_ras_precharge" adjust memory parameters. One
-- of these will us the same settings as your video card defaults, and
-- using neither in the config file does the same.
--- "set_mclk" sets the memory clock, format is:
-- Option "set_mclk" "50000"
-- in the XF86Config file. Valid values are any
-- integer <= 100000, where 100000 == 100 MHz.
--- "set_refclk" sets the ref clock for ViRGE MX, format is:
-- Option "set_refclk" "50000"
--
--Acceleration and graphic engine:
--
--- "NoAccel" turns off all acceleration
--- "fifo_aggressive", "fifo_moderate" and "fifo_conservative" alter the settings
-- for the threshold at which the pixel FIFO takes over the internal
-- memory bus to refill itself. The smaller this threshold, the better
-- the acceleration performance of the card. You may try the fastest
-- setting ("aggressive") and move down if you encounter pixel corruption.
-- The optimal setting will probably depend on dot-clock and on color
-- depth. Note that specifying any of these options will also alter other
-- memory settings which should increase performance, so you should at
-- least use "fifo_conservative" (this uses the chip defaults).
--- Common XAA acceleration options to disable primitives for test purposes:
-- "XaaNoScreenToScreenCopy"
-- "XaaNoSolidFillRect"
-- "XaaNoColor8x8PatternFillRect"
-- "XaaNoImageWriteRect"
-- "XaaNoPixmapCache"
--
--PCI bus:
--- "pci_burst" will enable PCI burst mode. This should work on all but a
-- few "broken" PCI chipsets, and will increase performance. Option may
-- take a parameter "on", "off", "yes", etc...
--- "pci_retry" will allow the driver to rely on PCI Retry to program the
-- ViRGE registers. "pci_burst" must be enabled for this to work.
-- This will increase performance, especially for small fills/blits,
-- because the driver does not have to poll the ViRGE before sending it
-- commands to make sure it is ready. It should work on most
-- recent PCI chipsets.
--
--ViRGE MX LCD options:
--- "lcd_center"
--- "set_lcdclk" allows setting the clock for a ViRGE MX LCD display. Format is:
-- Option "set_lcdclk" "30000"
-- in the config file. Valid values are ?
--
--Debug:
--- "ShowCache" Enable or disable viewing offscreen cache memory. A
-- development debug option. Default: off.
--- "mx_cr3a_fix" Enable or disable a cr3a fix added for ViRGE MX.
-- Default: on.
--
--
--$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/README,v 1.9 2000/06/14 21:57:54 dawes Exp $
-+ Information for S3 ViRGE Users
-+ The XFree86 Project Inc.
-+ 19 Dec 2001
-+ ____________________________________________________________
-+
-+ Table of Contents
-+
-+
-+ 1. Supported hardware
-+ 2. Features:
-+ 3. Configuration:
-+ 4. Documentation:
-+ 5. Support:
-+ 6. Authors
-+
-+
-+ ______________________________________________________________________
-+
-+ 1. Supported hardware
-+
-+ The s3virge driver in X11R7.5 supports the S3 ViRGE, ViRGE DX, GX,
-+ GX2, MX, MX+, and VX chipsets. It also supports Trio3D and Trio3D/2x
-+ chips. A majority of testing is done on ViRGE DX chips, making them
-+ the most stable to date. This release has added support for doublescan
-+ modes on DX.
-+
-+ This driver is moderately stable, however please use caution with any
-+ new install. Please report any problems to bugzilla.freedesktop.org,
-+ using the xorg component.
-+
-+
-+ 2. Features:
-+
-+
-+
-+ o Fully accelerated support for S3 ViRGE family video adapters
-+
-+ o uses linear frame buffer
-+
-+ o supports resolutions up to 2048x2048
-+
-+ o supports color depths of 8, 15, 16 and 24
-+
-+ o full use of video card memory for acceleration caching when visible
-+ framebuffer leaves extra memory
-+
-+ o XVideo on DX, GX, GX2, MX, MX+ and Trio3D/2X at depth 16 and 24
-+
-+ o Doublescan modes on DX, possibly others (untested)
-+
-+
-+ 3. Configuration:
-+
-+
-+ The driver auto-detects RAM size, RAMDAC and ClockChip. Do not bother
-+ putting these in your "Device" section.
-+
-+
-+ 4. Documentation:
-+
-+
-+ The driver has several supported options which are documented in the
-+ s3virge man page. Please refer to it for additional details about
-+ configuration options.
-+
-+
-+ 5. Support:
-+
-+ For support with X11R7.5 video drivers please refer to our web site at
-+ wiki.x.org <http://wiki.x.org>.
-+
-+
-+ 6. Authors
-+
-+
-+
-+ o Mark Vojkovich <mailto:mvojkovich@nvidia.com>
-+
-+ o Sebastien Marineau
-+
-+ o Harald Koenig <mailto:koenig@tat.physik.uni-tuebingen.de>
-+
-+ o Matt Grossman <mailto:mattg@oz.net>
-+
-+ o Kevin Brosius <mailto:cobra@compuserve.com>
-+
-+
-+
-diff --git a/README.sgml b/README.sgml
-deleted file mode 100644
-index e47b8c4..0000000
---- a/README.sgml
-+++ /dev/null
-@@ -1,61 +0,0 @@
--<!DOCTYPE linuxdoc PUBLIC "-//Xorg//DTD linuxdoc//EN" [
--<!ENTITY % defs SYSTEM "defs.ent"> %defs;
--]>
--
--<article>
--<title> Information for S3 ViRGE Users
--<author>The XFree86 Project Inc.
--<date>19 Dec 2001
--
--<ident>
--</ident>
--
--<toc>
--
--<sect> Supported hardware
--<p>
--The s3virge driver in X11R&relvers; supports the S3 ViRGE, ViRGE DX, GX, GX2, MX, MX+, and VX chipsets. It also supports Trio3D and Trio3D/2x chips. A majority of testing is done on ViRGE DX chips, making them the most stable to date. This release has added support for doublescan modes on DX.
--
--This driver is moderately stable, however please use caution with any new install. Please report any problems to bugzilla.freedesktop.org, using the xorg component.
--
--<sect>Features:
--<p>
--
--<itemize>
--<item>Fully accelerated support for S3 ViRGE family video adapters
--<item>uses linear frame buffer
--<item>supports resolutions up to 2048x2048
--<item>supports color depths of 8, 15, 16 and 24
--<item>full use of video card memory for acceleration caching when visible framebuffer leaves extra memory
--<item>XVideo on DX, GX, GX2, MX, MX+ and Trio3D/2X at depth 16 and 24
--<item>Doublescan modes on DX, possibly others (untested)
--</itemize>
--
--<sect>Configuration:
--<p>
--
--The driver auto-detects RAM size, RAMDAC and ClockChip. Do not bother putting
--these in your "Device" section.
--
--<sect>Documentation:
--<p>
--
--The driver has several supported options which are documented in the s3virge man
--page. Please refer to it for additional details about configuration options.
--
--<sect>Support:
--<p>
--For support with X11R&relvers video drivers please refer to our web site at <url name="wiki.x.org" url="http://wiki.x.org">.
--
--<sect>Authors
--<p>
--
--<itemize>
--<item>Mark Vojkovich <email>mvojkovich@nvidia.com</email>
--<item>Sebastien Marineau
--<item>Harald Koenig <email>koenig@tat.physik.uni-tuebingen.de</email>
--<item>Matt Grossman <email>mattg@oz.net</email>
--<item>Kevin Brosius <email>cobra@compuserve.com</email>
--</itemize>
--
--</article>
-diff --git a/TODO b/TODO
-new file mode 100644
-index 0000000..de5920b
---- /dev/null
-+++ b/TODO
-@@ -0,0 +1,326 @@
-+S3 ViRGE 4.0 devel notes
-+
-+
-+
-+Status
-+------
-+1/26/2003
-+Ver 1.8.6
-+Pre-4.3.0 release. 320x240 doublescan support w/mouse adjust,
-+power management printouts, DAC error printout fix, log XVideo status based
-+on chipset, preliminary support for disabling XV when a mode doesn't
-+support it.
-+
-+5/18/2002
-+Ver 1.8.5
-+320x240 mode support (doublescan).
-+
-+2/2/02
-+Ver 1.8.4
-+Make 320x240 mode work in depth 15 & 16.
-+Testing, need to switch streams on/off based on dblscan_v flag and mode.
-+Virge MX panel_on test (doesn't work.)
-+
-+1/10/02
-+Ver 1.8.3
-+DGA fix, buffer pointer used wrong value. Submitted for 4.2.0 (late).
-+
-+Ver 1.8.2
-+DPMS testing (display DPMS status, disable MX LCD panel), DGA testing.
-+
-+11/11/01 KJB
-+Ver 1.8.1
-+ViRGE MX (& GX2) fix to CR63 for problems with modes < 1024x768 from
-+max <sunmax@libero.it>. Submitted for 4.2.0.
-+
-+11/5/01 KJB
-+Ver 1.8.0
-+ViRGE MX & GX2 XVideo changes. Fix overlap/color keying on MX, fix
-+and enable GX2 XVideo.
-+Submitted for 4.2.0.
-+
-+11/4/01 KJB
-+Ver 1.7.0
-+Bump version for 4.2.0. Update man and README.
-+
-+11/3/01 KJB
-+Ver 1.6.16
-+Pre-4.2.0 patch. cr3a fix, virge mx xvideo support, xvideo disable option
-+(helps with high res modes on dx and screen noise), remove accel solid
-+fill rect for trio3d, bring over some trio3d and mx fixes from 4.0.3 test
-+drivers. Includes VERBLEV bump to 5 to remove register dumps in log file.
-+
-+Ver 1.6.15
-+Experimental - Scanline color expand - GX2
-+
-+9/21/01 KJB
-+Ver 1.6.14
-+ModeInit - cr3a for MX/GX2, don't clear reserved bit 0x40 (revert change).
-+Back out previous cr3a patch for testing.
-+
-+9/18/01 KJB
-+Ver 1.6.13
-+Option "xvideo" added. Add patch provided by Sven Menke
-+<Menke@SLAC.Stanford.EDU> for XV support on MX (slight changes to logic).
-+
-+Ver 1.6.12
-+Adam J. Richter's cr3a fix (possibly temporary).
-+
-+5/30/01 KJB
-+Ver 1.6.10
-+Disable MaxHValue & MaxVValue setting.
-+
-+1/03/01 KJB
-+Ver 1.6.0
-+Revert ViRGE to pre-Xv changes. ViRGE DX still supports Xv, but changes
-+added for Xv and ViRGE caused problems with normal display.
-+
-+11/27/00 KJB
-+Ver 1.5.0
-+Clean up, bump version for 4.0.2 submission.
-+CR3A, bit 0x40 (reserved) cleared for MX/GX2. Update man page.
-+
-+11/24/00 KJB
-+Disable CPU to screen color expansion on GX2, causes lockups on GX2 with
-+'locate html' in an xterm. Add WaitCmd code to prevent accelerator and
-+reg command path activity at the same time on GX2.
-+XVideo fixes, left side clipping fixed for video windows extending off left
-+side of screen. Add horizontal filtering modes for 1-2x and >3x scaling.
-+
-+11/7/00 KJB
-+Ver 1.4.0
-+Enable MX fixes, testing with accel BLT_BUG set is worse on GX2, so left
-+it out. BLT_BUG wasn't being enabled on ViRGE & VX because of case usage,
-+enabled now. Re-enable silken mouse for GX2. Add Render/fbPicture support.
-+Fix a few compiler warnings.
-+
-+11/5/00 KJB
-+Continued work on GX2, much stabler now, but I think there is a lockup case
-+left if you enable pci_burst and pci_retry with accel. I still see screen
-+flashes with vertical bars once in a while, and the log reports a GEReset.
-+Added fbPicture (render) support, untested. XV code for GX2 is added,
-+but not working yet.
-+
-+10/29/00 KJB
-+Much work on GX2, now SWCursor locks up but HWCursor is stable, go figure.
-+Loading Netscape a couple times with the mail window was enough to lock it
-+up twice in a row. Server was locked but not a box (PCI) lock. Also,
-+vertical barring still occurred a couple times, so HW cursor wasn't causing
-+that. Try blt_bug flag again for lock up case. And attach to debug server
-+and bt... Sleep now...
-+
-+10/21/00 KJB
-+Ver 1.3.0
-+Depth 16 Xv support added. Testing on ViRGE DX. 1280x1024x24 is noisy, so
-+needs FIFO tuning.
-+
-+9/27/00 KJB
-+Initial Xv support in depth 24.
-+
-+9/10/00 KJB
-+Convert to FB. Add option "UseFB", default true. Added
-+VerticalRetraceWait timeout back as default. #if0 out the line accel
-+code in s3v_accel.c. The Subsequent...Bresenham line code causes a lockup
-+when used with fb. We didn't have any hardware accel in there anyway...
-+
-+7/25/00 KJB
-+Started Xv additions.
-+
-+6/26/00 KJB
-+GX2 seems to have an accel bug. I see the entire screen go solid color or
-+a wide stripe pattern for about 1 second. The S3VGEReset gets called twice,
-+and then everything is okay. Unless SilkenMouse is enabled... That seems to
-+get you a server lock instead. Short term is to disable SilkenMouse for GX2
-+only. SilkenMouse isn't really the problem of course, it just happens that if
-+we move the mouse during the 1 second engine lockup we appear more likely to
-+never recover.
-+
-+6/23/00 KJB
-+Ver 1.2.0 - Fix console corruption on GX2 caused by reserved bit use in CR3A.
-+Fix GX2 noise on screen in hi-res depth 24 by increasing FIFO fill threshold.
-+
-+6/12/00 KJB
-+Ver 1.1.0 - Add Init for SilkenMouse, add xf86SetBackingStore call, move
-+int10Symbols[] to remove warnings.
-+
-+3/3/00 KJB
-+Ver 1.0.0 - S3VProbeDDC code for X -configure option added, add timeout to
-+WAITIDLE macro in s3v_macros.h, change ImageWriteFlags adding NO_GXCOPY.
-+Start of GX2 fixes, use CR regs for FIFO settings. Update copyrights.
-+
-+2/11/00 KJB
-+Ver 0.11.0 - Add cfb16/24BresS to module symbols to remove warnings.
-+Fix viewport restore problem after EnterVT in 24 bpp.
-+Clean up log output, removing register dumps from normal console log.
-+
-+6/26/99 KJB
-+Make the memory settings for fifo_conservative the default, 'fifo_conservative'
-+does nothing additional now. Patch includes DGA2 additions below, non-working.
-+Expected to be included in 3.9Pu.
-+
-+Changes in 3.9Pt by others include additions for newer RAC support. Some reports
-+say multi-head works now with ViRGE.
-+
-+6/17/99 KJB
-+Ver 0.9.0 - Prelim DGA2 support modeled after MGA.
-+
-+5/28/99 KJB
-+Ver 0.8.0 - Changes to 3.9Po - Cleaned up debug register printing function, minor
-+changes to man page, remove S3V.sgml and add new s3virge.sgml in doc/sgml, also
-+remove README.S3V from doc directory.
-+
-+
-+4/5/99 KJB
-+3.9Ph - Ver 0.7.0 - Virge man page added, HW Cursor fixed, rename chipsets removing
-+slashes in the names.
-+
-+03/27/99 KJB
-+Ver 0.6.0 - hwcursor additions, added s3v_hwcurs.c and Option "swcursor".
-+Default is hwcursor, Option "swcursor" will disable it.
-+
-+Ver 0.5.0 - patch against 3.9Pf (seq 2615), fix depth 24 and Accel flags, sync pci_burst option to previous changes, remove s3v_comp.h and s3v_pio.c and merge as needed.
-+
-+03/21/99 KJB
-+3.9Pf has Matt Grossman's Alpha changes.
-+For next patch - remove s3v_pio.c and s3v_comp.h. Include the EnableMMIO and
-+DisableMMIO functions from s3v_pio.c in s3v_driver.c.
-+
-+03/02/99 KJB
-+3.9Pc - depth 24 doesn't work on my ViRGE DX. NoAccel doesn't start, accel does
-+but has blocky noise.
-+
-+03/01/99 KJB
-+Macro change done, VGAIN/VGAOUT for register access, INREG/OUTREG for s3v_accel.c.
-+Added Mark Vojkovich's re-write of the accel code. It may only be clean for ViRGE DX
-+at the moment. x11perf showed a couple artifacts in 'move window via parent'.
-+In progress, attempt to call cfbScreenInit() functions after MapMem/EnterVT. Not
-+working yet. Version stamped 0.4.0.
-+
-+02/22/99 KJB
-+Macro change coming to add Mark's accel update. VGAOUT for old stuff and MEMOUT
-+for new stuff? That way there's no confusion with the old INREG/OUTREG macros.
-+Or maybe just stick with INREG/OUTREG for new stuff.
-+
-+01/30/99 KJB
-+Version stamp 0.3.0. Changed Chipset flags to use PCI IDs exclusively, also use
-+common/xf86PciInfo.h for PCI IDs rather than coding them in regs3v.h.
-+
-+11/28/98 KJB
-+Bumped version stamp to 0.2, expect code in 3.9No. Cleaned up s3v.h and
-+s3v_driver.c by removing unused definition & code sections. Added
-+options set_mclk (from 3.3.2) and set_lcdclk (3.3.3 MX). Code support
-+from 3.3.3 for ViRGE GX2 and MX+ is included.
-+Disabled call to 32 bpp AccelInit to get -depth 24 -bpp 32 working again.
-+
-+11/27/98 KJB
-+More 3.3.3 import.
-+New registers saved, CR40,CR45,SR8,(for MX) SR29,SR45,SR55,SR56,SR57.
-+Reviewed s3vdriver.h, rehs3v.h, newmmio.h, s3v_accel.c, s3v_driver.c.
-+Added ViRGE MX, MX+ & GX2 support. Re-synced parts of mode save and init
-+with 3.3.3 versions. Added timeout ability for WaitIdle() and friends.
-+Added chipnames and numbers to Chipsets struct.
-+
-+11/26/98 KJB
-+Import additions from 3.3.3, newmmio.h, regs3v.h,
-+
-+Trap fills disabled because they don't match cfb, pixmap cache & ImageWrite
-+working, fixed depth 8 color loss on VT switches, INREG & OUTREG modified to
-+use a single offset value instead of adding the base and offset together.
-+
-+11/18/98 KJB
-+3.9Nn
-+Acceleration working for Bitblt, ScreenToScreenCopy, Color 8x8 Rect fills,
-+and Rect/Trap fills.
-+Trap fills do not support transparency, so that needs to be exported to XAA.
-+
-+
-+10/31/98 KJB
-+Working depth 8, discolored dep 16 but runs, dep 24 screen goes black,
-+C-A-Bkspc restores text console. At 3.9Nk tree level, module would not
-+load in Loader server. why? Static server tested.
-+
-+10/29/98 KJB
-+ModeInit() needs work, options are heavily #if'd to try and get 8bpp
-+working.
-+
-+10/16/98 KJB
-+General 4.0 architecture is setup. Presently at 3.9Nc level, if moved
-+to a newer tree you will need to add the resource handling functions from
-+Egbert (I haven't tackled that yet).
-+
-+At the moment the ScreenInit() function is coded to return FALSE. On my
-+ViRGE DX card this version does not lock up, but it does destroy the
-+video mode. Make sure you have an external terminal or network connection
-+if you run it (or blindly do a restart from your main terminal). I make
-+no guarantees that it won't hard lock other versions of ViRGE.
-+
-+I've left out the Alpha memory mapping, along with all option processing.
-+Those will need to be done once the driver is minimally working.
-+
-+Note that everything in s3v_driver.c is MMIO only. There are a pair of
-+PIO functions in s3v_pio.c, but that is the only place. See notes below
-+about my ViRGE DX BIOS and why I needed to do this on my hardware.
-+
-+Other stuff...
-+Some test stuff is assuming 8bpp, so 16 & 24 are broken.
-+On my hardware, I am presently trying to get the Save/Restore sequence to
-+recover the video mode. At the moment, when I run this driver, I get:
-+ScreenInit() runs to completion.
-+It returns FALSE, so the Server aborts.
-+LeaveVT() is called, and runs to completion.
-+The Server exits gracefully, but my monitor goes powersaver and the video
-+mode is not recovered.
-+
-+
-+
-+TODO items
-+----------
-+1/30/03 General option "videoram" is ignored by the virge driver.
-+ (Meelis Roos)
-+3/24/02 Xv reported to not work as secondary in Xinerama multihead.
-+ (xav on irc)
-+3/24/02 DPMS doesn't fully disable the screen. Blue line across the
-+ center in all modes. (xav on irc)
-+3/25/02 Secondary reports primary BIOS during int10 detection. ie:
-+
-+(II) S3VIRGE(1): VESA BIOS detected
-+(II) S3VIRGE(1): VESA VBE Version 2.0
-+(II) S3VIRGE(1): VESA VBE Total Mem: 4194240 kB
-+(II) S3VIRGE(1): VESA VBE OEM: ATI RAGE128
-+(II) S3VIRGE(1): VESA VBE OEM Software Rev: 1.0
-+(II) S3VIRGE(1): VESA VBE OEM Vendor: ATI Technologies Inc.
-+(II) S3VIRGE(1): VESA VBE OEM Product: R128
-+(II) S3VIRGE(1): VESA VBE OEM Product Rev: 01.00
-+
-+(xav on irc)
-+
-+
-+Check CR65 usage, bit 2 set based on S3_EARLY_SC? In my manual bit 2 is
-+enable MMIO to RAMDAC registers.
-+
-+Notes:
-+----------
-+
-+/config/cf/xfree86.cf
-+
-+have to add s3v to XF86CardDrivers for imake to make the
-+drivers/s3v Makefile.
-+
-+To remake makefiles, after editing Imakefile, go to dir above drivers/s3v
-+and do a 'make Makefiles'.
-+
-+For debug, make CDEBUGFLAGS='-g -DDEBUG', adding -DMetroLink enables
-+timeout for VerticalRetraceWait().
-+
-+
-+
-+S3 ViRGE DX stuff:
-+
-+Card seems to power up (or BIOS forces) with MMIO disabled. All flavors are
-+disabled, because CR53 comes up as 0. This may preclude using this card
-+as the second device in a multi-head situation although David D. says that
-+the new config. management stuff may help here.
-+
-+
-+
-+$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES,v 1.23 2003/02/13 03:21:33 dawes Exp $
-diff --git a/TODO_NOTES b/TODO_NOTES
-deleted file mode 100644
-index de5920b..0000000
---- a/TODO_NOTES
-+++ /dev/null
-@@ -1,326 +0,0 @@
--S3 ViRGE 4.0 devel notes
--
--
--
--Status
--------
--1/26/2003
--Ver 1.8.6
--Pre-4.3.0 release. 320x240 doublescan support w/mouse adjust,
--power management printouts, DAC error printout fix, log XVideo status based
--on chipset, preliminary support for disabling XV when a mode doesn't
--support it.
--
--5/18/2002
--Ver 1.8.5
--320x240 mode support (doublescan).
--
--2/2/02
--Ver 1.8.4
--Make 320x240 mode work in depth 15 & 16.
--Testing, need to switch streams on/off based on dblscan_v flag and mode.
--Virge MX panel_on test (doesn't work.)
--
--1/10/02
--Ver 1.8.3
--DGA fix, buffer pointer used wrong value. Submitted for 4.2.0 (late).
--
--Ver 1.8.2
--DPMS testing (display DPMS status, disable MX LCD panel), DGA testing.
--
--11/11/01 KJB
--Ver 1.8.1
--ViRGE MX (& GX2) fix to CR63 for problems with modes < 1024x768 from
--max <sunmax@libero.it>. Submitted for 4.2.0.
--
--11/5/01 KJB
--Ver 1.8.0
--ViRGE MX & GX2 XVideo changes. Fix overlap/color keying on MX, fix
--and enable GX2 XVideo.
--Submitted for 4.2.0.
--
--11/4/01 KJB
--Ver 1.7.0
--Bump version for 4.2.0. Update man and README.
--
--11/3/01 KJB
--Ver 1.6.16
--Pre-4.2.0 patch. cr3a fix, virge mx xvideo support, xvideo disable option
--(helps with high res modes on dx and screen noise), remove accel solid
--fill rect for trio3d, bring over some trio3d and mx fixes from 4.0.3 test
--drivers. Includes VERBLEV bump to 5 to remove register dumps in log file.
--
--Ver 1.6.15
--Experimental - Scanline color expand - GX2
--
--9/21/01 KJB
--Ver 1.6.14
--ModeInit - cr3a for MX/GX2, don't clear reserved bit 0x40 (revert change).
--Back out previous cr3a patch for testing.
--
--9/18/01 KJB
--Ver 1.6.13
--Option "xvideo" added. Add patch provided by Sven Menke
--<Menke@SLAC.Stanford.EDU> for XV support on MX (slight changes to logic).
--
--Ver 1.6.12
--Adam J. Richter's cr3a fix (possibly temporary).
--
--5/30/01 KJB
--Ver 1.6.10
--Disable MaxHValue & MaxVValue setting.
--
--1/03/01 KJB
--Ver 1.6.0
--Revert ViRGE to pre-Xv changes. ViRGE DX still supports Xv, but changes
--added for Xv and ViRGE caused problems with normal display.
--
--11/27/00 KJB
--Ver 1.5.0
--Clean up, bump version for 4.0.2 submission.
--CR3A, bit 0x40 (reserved) cleared for MX/GX2. Update man page.
--
--11/24/00 KJB
--Disable CPU to screen color expansion on GX2, causes lockups on GX2 with
--'locate html' in an xterm. Add WaitCmd code to prevent accelerator and
--reg command path activity at the same time on GX2.
--XVideo fixes, left side clipping fixed for video windows extending off left
--side of screen. Add horizontal filtering modes for 1-2x and >3x scaling.
--
--11/7/00 KJB
--Ver 1.4.0
--Enable MX fixes, testing with accel BLT_BUG set is worse on GX2, so left
--it out. BLT_BUG wasn't being enabled on ViRGE & VX because of case usage,
--enabled now. Re-enable silken mouse for GX2. Add Render/fbPicture support.
--Fix a few compiler warnings.
--
--11/5/00 KJB
--Continued work on GX2, much stabler now, but I think there is a lockup case
--left if you enable pci_burst and pci_retry with accel. I still see screen
--flashes with vertical bars once in a while, and the log reports a GEReset.
--Added fbPicture (render) support, untested. XV code for GX2 is added,
--but not working yet.
--
--10/29/00 KJB
--Much work on GX2, now SWCursor locks up but HWCursor is stable, go figure.
--Loading Netscape a couple times with the mail window was enough to lock it
--up twice in a row. Server was locked but not a box (PCI) lock. Also,
--vertical barring still occurred a couple times, so HW cursor wasn't causing
--that. Try blt_bug flag again for lock up case. And attach to debug server
--and bt... Sleep now...
--
--10/21/00 KJB
--Ver 1.3.0
--Depth 16 Xv support added. Testing on ViRGE DX. 1280x1024x24 is noisy, so
--needs FIFO tuning.
--
--9/27/00 KJB
--Initial Xv support in depth 24.
--
--9/10/00 KJB
--Convert to FB. Add option "UseFB", default true. Added
--VerticalRetraceWait timeout back as default. #if0 out the line accel
--code in s3v_accel.c. The Subsequent...Bresenham line code causes a lockup
--when used with fb. We didn't have any hardware accel in there anyway...
--
--7/25/00 KJB
--Started Xv additions.
--
--6/26/00 KJB
--GX2 seems to have an accel bug. I see the entire screen go solid color or
--a wide stripe pattern for about 1 second. The S3VGEReset gets called twice,
--and then everything is okay. Unless SilkenMouse is enabled... That seems to
--get you a server lock instead. Short term is to disable SilkenMouse for GX2
--only. SilkenMouse isn't really the problem of course, it just happens that if
--we move the mouse during the 1 second engine lockup we appear more likely to
--never recover.
--
--6/23/00 KJB
--Ver 1.2.0 - Fix console corruption on GX2 caused by reserved bit use in CR3A.
--Fix GX2 noise on screen in hi-res depth 24 by increasing FIFO fill threshold.
--
--6/12/00 KJB
--Ver 1.1.0 - Add Init for SilkenMouse, add xf86SetBackingStore call, move
--int10Symbols[] to remove warnings.
--
--3/3/00 KJB
--Ver 1.0.0 - S3VProbeDDC code for X -configure option added, add timeout to
--WAITIDLE macro in s3v_macros.h, change ImageWriteFlags adding NO_GXCOPY.
--Start of GX2 fixes, use CR regs for FIFO settings. Update copyrights.
--
--2/11/00 KJB
--Ver 0.11.0 - Add cfb16/24BresS to module symbols to remove warnings.
--Fix viewport restore problem after EnterVT in 24 bpp.
--Clean up log output, removing register dumps from normal console log.
--
--6/26/99 KJB
--Make the memory settings for fifo_conservative the default, 'fifo_conservative'
--does nothing additional now. Patch includes DGA2 additions below, non-working.
--Expected to be included in 3.9Pu.
--
--Changes in 3.9Pt by others include additions for newer RAC support. Some reports
--say multi-head works now with ViRGE.
--
--6/17/99 KJB
--Ver 0.9.0 - Prelim DGA2 support modeled after MGA.
--
--5/28/99 KJB
--Ver 0.8.0 - Changes to 3.9Po - Cleaned up debug register printing function, minor
--changes to man page, remove S3V.sgml and add new s3virge.sgml in doc/sgml, also
--remove README.S3V from doc directory.
--
--
--4/5/99 KJB
--3.9Ph - Ver 0.7.0 - Virge man page added, HW Cursor fixed, rename chipsets removing
--slashes in the names.
--
--03/27/99 KJB
--Ver 0.6.0 - hwcursor additions, added s3v_hwcurs.c and Option "swcursor".
--Default is hwcursor, Option "swcursor" will disable it.
--
--Ver 0.5.0 - patch against 3.9Pf (seq 2615), fix depth 24 and Accel flags, sync pci_burst option to previous changes, remove s3v_comp.h and s3v_pio.c and merge as needed.
--
--03/21/99 KJB
--3.9Pf has Matt Grossman's Alpha changes.
--For next patch - remove s3v_pio.c and s3v_comp.h. Include the EnableMMIO and
--DisableMMIO functions from s3v_pio.c in s3v_driver.c.
--
--03/02/99 KJB
--3.9Pc - depth 24 doesn't work on my ViRGE DX. NoAccel doesn't start, accel does
--but has blocky noise.
--
--03/01/99 KJB
--Macro change done, VGAIN/VGAOUT for register access, INREG/OUTREG for s3v_accel.c.
--Added Mark Vojkovich's re-write of the accel code. It may only be clean for ViRGE DX
--at the moment. x11perf showed a couple artifacts in 'move window via parent'.
--In progress, attempt to call cfbScreenInit() functions after MapMem/EnterVT. Not
--working yet. Version stamped 0.4.0.
--
--02/22/99 KJB
--Macro change coming to add Mark's accel update. VGAOUT for old stuff and MEMOUT
--for new stuff? That way there's no confusion with the old INREG/OUTREG macros.
--Or maybe just stick with INREG/OUTREG for new stuff.
--
--01/30/99 KJB
--Version stamp 0.3.0. Changed Chipset flags to use PCI IDs exclusively, also use
--common/xf86PciInfo.h for PCI IDs rather than coding them in regs3v.h.
--
--11/28/98 KJB
--Bumped version stamp to 0.2, expect code in 3.9No. Cleaned up s3v.h and
--s3v_driver.c by removing unused definition & code sections. Added
--options set_mclk (from 3.3.2) and set_lcdclk (3.3.3 MX). Code support
--from 3.3.3 for ViRGE GX2 and MX+ is included.
--Disabled call to 32 bpp AccelInit to get -depth 24 -bpp 32 working again.
--
--11/27/98 KJB
--More 3.3.3 import.
--New registers saved, CR40,CR45,SR8,(for MX) SR29,SR45,SR55,SR56,SR57.
--Reviewed s3vdriver.h, rehs3v.h, newmmio.h, s3v_accel.c, s3v_driver.c.
--Added ViRGE MX, MX+ & GX2 support. Re-synced parts of mode save and init
--with 3.3.3 versions. Added timeout ability for WaitIdle() and friends.
--Added chipnames and numbers to Chipsets struct.
--
--11/26/98 KJB
--Import additions from 3.3.3, newmmio.h, regs3v.h,
--
--Trap fills disabled because they don't match cfb, pixmap cache & ImageWrite
--working, fixed depth 8 color loss on VT switches, INREG & OUTREG modified to
--use a single offset value instead of adding the base and offset together.
--
--11/18/98 KJB
--3.9Nn
--Acceleration working for Bitblt, ScreenToScreenCopy, Color 8x8 Rect fills,
--and Rect/Trap fills.
--Trap fills do not support transparency, so that needs to be exported to XAA.
--
--
--10/31/98 KJB
--Working depth 8, discolored dep 16 but runs, dep 24 screen goes black,
--C-A-Bkspc restores text console. At 3.9Nk tree level, module would not
--load in Loader server. why? Static server tested.
--
--10/29/98 KJB
--ModeInit() needs work, options are heavily #if'd to try and get 8bpp
--working.
--
--10/16/98 KJB
--General 4.0 architecture is setup. Presently at 3.9Nc level, if moved
--to a newer tree you will need to add the resource handling functions from
--Egbert (I haven't tackled that yet).
--
--At the moment the ScreenInit() function is coded to return FALSE. On my
--ViRGE DX card this version does not lock up, but it does destroy the
--video mode. Make sure you have an external terminal or network connection
--if you run it (or blindly do a restart from your main terminal). I make
--no guarantees that it won't hard lock other versions of ViRGE.
--
--I've left out the Alpha memory mapping, along with all option processing.
--Those will need to be done once the driver is minimally working.
--
--Note that everything in s3v_driver.c is MMIO only. There are a pair of
--PIO functions in s3v_pio.c, but that is the only place. See notes below
--about my ViRGE DX BIOS and why I needed to do this on my hardware.
--
--Other stuff...
--Some test stuff is assuming 8bpp, so 16 & 24 are broken.
--On my hardware, I am presently trying to get the Save/Restore sequence to
--recover the video mode. At the moment, when I run this driver, I get:
--ScreenInit() runs to completion.
--It returns FALSE, so the Server aborts.
--LeaveVT() is called, and runs to completion.
--The Server exits gracefully, but my monitor goes powersaver and the video
--mode is not recovered.
--
--
--
--TODO items
------------
--1/30/03 General option "videoram" is ignored by the virge driver.
-- (Meelis Roos)
--3/24/02 Xv reported to not work as secondary in Xinerama multihead.
-- (xav on irc)
--3/24/02 DPMS doesn't fully disable the screen. Blue line across the
-- center in all modes. (xav on irc)
--3/25/02 Secondary reports primary BIOS during int10 detection. ie:
--
--(II) S3VIRGE(1): VESA BIOS detected
--(II) S3VIRGE(1): VESA VBE Version 2.0
--(II) S3VIRGE(1): VESA VBE Total Mem: 4194240 kB
--(II) S3VIRGE(1): VESA VBE OEM: ATI RAGE128
--(II) S3VIRGE(1): VESA VBE OEM Software Rev: 1.0
--(II) S3VIRGE(1): VESA VBE OEM Vendor: ATI Technologies Inc.
--(II) S3VIRGE(1): VESA VBE OEM Product: R128
--(II) S3VIRGE(1): VESA VBE OEM Product Rev: 01.00
--
--(xav on irc)
--
--
--Check CR65 usage, bit 2 set based on S3_EARLY_SC? In my manual bit 2 is
--enable MMIO to RAMDAC registers.
--
--Notes:
------------
--
--/config/cf/xfree86.cf
--
--have to add s3v to XF86CardDrivers for imake to make the
--drivers/s3v Makefile.
--
--To remake makefiles, after editing Imakefile, go to dir above drivers/s3v
--and do a 'make Makefiles'.
--
--For debug, make CDEBUGFLAGS='-g -DDEBUG', adding -DMetroLink enables
--timeout for VerticalRetraceWait().
--
--
--
--S3 ViRGE DX stuff:
--
--Card seems to power up (or BIOS forces) with MMIO disabled. All flavors are
--disabled, because CR53 comes up as 0. This may preclude using this card
--as the second device in a multi-head situation although David D. says that
--the new config. management stuff may help here.
--
--
--
--$XFree86: xc/programs/Xserver/hw/xfree86/drivers/s3virge/TODO_NOTES,v 1.23 2003/02/13 03:21:33 dawes Exp $
-diff --git a/configure.ac b/configure.ac
-index 317b5bf..1c7e9f7 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -20,46 +20,51 @@
- #
- # Process this file with autoconf to produce a configure script
-
--AC_PREREQ(2.57)
-+# Initialize Autoconf
-+AC_PREREQ([2.60])
- AC_INIT([xf86-video-s3virge],
-- 1.10.4,
-+ [1.10.4],
- [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg],
-- xf86-video-s3virge)
--
-+ [xf86-video-s3virge])
- AC_CONFIG_SRCDIR([Makefile.am])
--AM_CONFIG_HEADER([config.h])
-+AC_CONFIG_HEADERS([config.h])
- AC_CONFIG_AUX_DIR(.)
-
--AM_INIT_AUTOMAKE([dist-bzip2])
--
-+# Initialize Automake
-+AM_INIT_AUTOMAKE([foreign dist-bzip2])
- AM_MAINTAINER_MODE
-
--# Checks for programs.
-+# 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.8 or later before running autoconf/autogen])])
-+XORG_MACROS_VERSION(1.8)
-+XORG_DEFAULT_OPTIONS
-+
-+# 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,
-- AC_HELP_STRING([--with-xorg-module-dir=DIR],
-+ AS_HELP_STRING([--with-xorg-module-dir=DIR],
- [Default xorg module directory [[default=$libdir/xorg/modules]]]),
- [moduledir="$withval"],
- [moduledir="$libdir/xorg/modules"])
-
--# 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" ])
--sdkdir=$(pkg-config --variable=sdkdir xorg-server)
-
- # Checks for libraries.
- SAVE_CPPFLAGS="$CPPFLAGS"
-@@ -69,8 +74,6 @@ AC_CHECK_DECL(XSERVER_LIBPCIACCESS,
- [#include "xorg-server.h"])
- CPPFLAGS="$SAVE_CPPFLAGS"
-
--# Checks for header files.
--AC_HEADER_STDC
-
- if test "x$XSERVER_LIBPCIACCESS" = xyes; then
- PKG_CHECK_MODULES([PCIACCESS], [pciaccess >= 0.8.0])
-@@ -78,20 +81,14 @@ if test "x$XSERVER_LIBPCIACCESS" = xyes; then
- fi
- AM_CONDITIONAL(XSERVER_LIBPCIACCESS, test "x$XSERVER_LIBPCIACCESS" = xyes)
-
--
--AC_SUBST([XORG_CFLAGS])
- AC_SUBST([moduledir])
-
- DRIVER_NAME=s3virge
- AC_SUBST([DRIVER_NAME])
-
--XORG_MANPAGE_SECTIONS
--XORG_RELEASE_VERSION
--
--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 f0eb29b..b3688ce 100644
---- a/man/Makefile.am
-+++ b/man/Makefile.am
-@@ -1,27 +1,24 @@
- #
- # Copyright 2005 Sun Microsystems, Inc. All rights reserved.
--#
--# Permission to use, copy, modify, distribute, and sell this software and its
--# documentation for any purpose is hereby granted without fee, provided that
--# the above copyright notice appear in all copies and that both that
--# copyright notice and this permission notice appear in supporting
--# documentation.
--#
--# 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 OPEN GROUP 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 copyright holders 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 copyright holders.
-+#
-+# 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.
- #
-
- drivermandir = $(DRIVER_MAN_DIR)
-@@ -34,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
-+# String replacements in MAN_SUBSTS now come from xorg-macros.m4 via configure
-
--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'
-
- SUFFIXES = .$(DRIVER_MAN_SUFFIX) .man
-
- .man.$(DRIVER_MAN_SUFFIX):
-- sed $(MAN_SUBSTS) < $< > $@
-+ $(AM_V_GEN)$(SED) $(MAN_SUBSTS) < $< > $@
-diff --git a/src/s3v.h b/src/s3v.h
-index 42b1f83..f4976ca 100644
---- a/src/s3v.h
-+++ b/src/s3v.h
-@@ -40,9 +40,6 @@ in this Software without prior written authorization from the XFree86 Project.
- /* Everything using inb/outb, etc needs "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 */
- #include "xf86Pci.h"
-
-diff --git a/src/s3v_accel.c b/src/s3v_accel.c
-index 528ab8a..7837e4a 100644
---- a/src/s3v_accel.c
-+++ b/src/s3v_accel.c
-@@ -28,7 +28,9 @@ in this Software without prior written authorization from the XFree86 Project.
- #include "config.h"
- #endif
-
-+#include <unistd.h>
- #include "s3v.h"
-+#include "s3v_pciids.h"
-
- #include "miline.h"
- /* fb includes are in s3v.h */
-diff --git a/src/s3v_dga.c b/src/s3v_dga.c
-index 7ad42db..ecf8571 100644
---- a/src/s3v_dga.c
-+++ b/src/s3v_dga.c
-@@ -62,7 +62,6 @@ in this Software without prior written authorization from the XFree86 Project.
- #include "xf86.h"
- #include "xf86_OSproc.h"
- #include "xf86Pci.h"
--#include "xf86PciInfo.h"
- #include "xaa.h"
- #include "xaalocal.h"
- #include "s3v.h"
-@@ -116,15 +115,15 @@ S3VDGAInit(ScreenPtr pScreen)
- to be rewritten to accommodate depth changes in DGA mode */
-
- if(0 /*pScrn->displayWidth != pMode->HDisplay*/) {
-- newmodes = xrealloc(modes, (num + 2) * sizeof(DGAModeRec));
-+ newmodes = realloc(modes, (num + 2) * sizeof(DGAModeRec));
- oneMore = TRUE;
- } else {
-- newmodes = xrealloc(modes, (num + 1) * sizeof(DGAModeRec));
-+ newmodes = realloc(modes, (num + 1) * sizeof(DGAModeRec));
- oneMore = FALSE;
- }
-
- if(!newmodes) {
-- xfree(modes);
-+ free(modes);
- return FALSE;
- }
- modes = newmodes;
-diff --git a/src/s3v_driver.c b/src/s3v_driver.c
-index 0928a7f..7064b1e 100644
---- a/src/s3v_driver.c
-+++ b/src/s3v_driver.c
-@@ -57,8 +57,9 @@ in this Software without prior written authorization from the XFree86 Project.
- */
-
-
-- /* Most xf86 commons are already in s3v.h */
--#include "s3v.h"
-+/* Most xf86 commons are already in s3v.h */
-+#include "s3v.h"
-+#include "s3v_pciids.h"
-
-
- #include "globals.h"
-@@ -383,7 +384,7 @@ S3VFreeRec(ScrnInfoPtr pScrn)
- PVERB5(" S3VFreeRec\n");
- if (pScrn->driverPrivate == NULL)
- return;
-- xfree(pScrn->driverPrivate);
-+ free(pScrn->driverPrivate);
- pScrn->driverPrivate = NULL;
- }
-
-@@ -435,7 +436,7 @@ S3VProbe(DriverPtr drv, int flags)
- numDevSections, drv, &usedChips);
-
- /* Free it since we don't need that list after this */
-- xfree(devSections);
-+ free(devSections);
- if (numUsed <= 0)
- return FALSE;
-
-@@ -463,7 +464,7 @@ S3VProbe(DriverPtr drv, int flags)
- foundScreen = TRUE;
- }
- }
-- xfree(usedChips);
-+ free(usedChips);
- PVERB5(" S3VProbe end\n");
- return foundScreen;
- }
-@@ -519,7 +520,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
- */
- if (!vgaHWGetHWRec(pScrn))
- return FALSE;
--
-+ vgaHWSetStdFuncs(VGAHWPTR(pScrn));
-
- /* Set pScrn->monitor */
- pScrn->monitor = pScrn->confScreen->monitor;
-@@ -601,7 +602,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
- }
-
- /* Process the options */
-- if (!(ps3v->Options = xalloc(sizeof(S3VOptions))))
-+ if (!(ps3v->Options = malloc(sizeof(S3VOptions))))
- return FALSE;
- memcpy(ps3v->Options, S3VOptions, sizeof(S3VOptions));
- xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, ps3v->Options);
-@@ -797,7 +798,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
-
- #ifndef XSERVER_LIBPCIACCESS
- if (pEnt->resources) {
-- xfree(pEnt);
-+ free(pEnt);
- S3VFreeRec(pScrn);
- return FALSE;
- }
-@@ -851,7 +852,7 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
- } else {
- ps3v->ChipRev = PCI_DEV_REVISION(ps3v->PciInfo);
- }
-- xfree(pEnt);
-+ free(pEnt);
-
- /*
- * This shouldn't happen because such problems should be caught in
-@@ -1328,8 +1329,11 @@ S3VPreInit(ScrnInfoPtr pScrn, int flags)
- /* Load XAA if needed */
- if (!ps3v->NoAccel || ps3v->hwcursor ) {
- if (!xf86LoadSubModule(pScrn, "xaa")) {
-- S3VFreeRec(pScrn);
-- return FALSE;
-+ xf86DrvMsgVerb(pScrn->scrnIndex, X_INFO, VERBLEV,
-+ "Falling back to shadowfb\n");
-+ ps3v->NoAccel = 1;
-+ ps3v->hwcursor = 0;
-+ ps3v->shadowFB = 1;
- }
- }
-
-@@ -2326,8 +2330,6 @@ S3VScreenInit(int scrnIndex, ScreenPtr pScreen, int argc, char **argv)
- pScrn = xf86Screens[pScreen->myNum];
- /* Get S3V rec */
- ps3v = S3VPTR(pScrn);
-- /* Make sure we have card access */
--/* xf86EnableAccess(pScrn);*/
- /* Map MMIO regs and framebuffer */
- if( !S3VMapMem(pScrn) )
- return FALSE;
-@@ -2525,7 +2527,7 @@ S3VInternalScreenInit( int scrnIndex, ScreenPtr pScreen)
-
- if(ps3v->shadowFB) {
- ps3v->ShadowPitch = BitmapBytePad(pScrn->bitsPerPixel * width);
-- ps3v->ShadowPtr = xalloc(ps3v->ShadowPitch * height);
-+ ps3v->ShadowPtr = malloc(ps3v->ShadowPitch * height);
- displayWidth = ps3v->ShadowPitch / (pScrn->bitsPerPixel >> 3);
- FBStart = ps3v->ShadowPtr;
- } else {
-@@ -3309,7 +3311,7 @@ S3VCloseScreen(int scrnIndex, ScreenPtr pScreen)
- if (ps3v->AccelInfoRec)
- XAADestroyInfoRec(ps3v->AccelInfoRec);
- if (ps3v->DGAModes)
-- xfree(ps3v->DGAModes);
-+ free(ps3v->DGAModes);
-
- pScrn->vtSema = FALSE;
-
-@@ -3518,11 +3520,17 @@ S3VEnableMmio(ScrnInfoPtr pScrn)
- S3VPtr ps3v;
- IOADDRESS vgaCRIndex, vgaCRReg;
- unsigned char val;
--
-+ unsigned int PIOOffset = 0;
-+
- PVERB5(" S3VEnableMmio\n");
-
- hwp = VGAHWPTR(pScrn);
- ps3v = S3VPTR(pScrn);
-+
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
-+ PIOOffset = hwp->PIOOffset;
-+#endif
-+
- /*
- * enable chipset (seen on uninitialized secondary cards)
- * might not be needed once we use the VGA softbooter
-@@ -3535,17 +3543,17 @@ S3VEnableMmio(ScrnInfoPtr pScrn)
- * to be set correctly already and MMIO _has_ to be
- * enabled.
- */
-- val = inb(hwp->PIOOffset + 0x3C3); /*@@@EE*/
-- outb(hwp->PIOOffset + 0x3C3, val | 0x01);
-+ val = inb(PIOOffset + 0x3C3); /*@@@EE*/
-+ outb(PIOOffset + 0x3C3, val | 0x01);
- /*
- * set CR registers to color mode
- * in mono mode extended CR registers
- * are not accessible. (EE 05/04/99)
- */
-- val = inb(hwp->PIOOffset + VGA_MISC_OUT_R); /*@@@EE*/
-- outb(hwp->PIOOffset + VGA_MISC_OUT_W, val | 0x01);
-+ val = inb(PIOOffset + VGA_MISC_OUT_R); /*@@@EE*/
-+ outb(PIOOffset + VGA_MISC_OUT_W, val | 0x01);
- vgaHWGetIOBase(hwp); /* Get VGA I/O base */
-- vgaCRIndex = hwp->PIOOffset + hwp->IOBase + 4;
-+ vgaCRIndex = PIOOffset + hwp->IOBase + 4;
- vgaCRReg = vgaCRIndex + 1;
- #if 1
- /*
-@@ -3564,7 +3572,7 @@ S3VEnableMmio(ScrnInfoPtr pScrn)
- /* Enable new MMIO, if TRIO mmio is already */
- /* enabled, then it stays enabled. */
- outb(vgaCRReg, ps3v->EnableMmioCR53 | 0x08);
-- outb(hwp->PIOOffset + VGA_MISC_OUT_W, val);
-+ outb(PIOOffset + VGA_MISC_OUT_W, val);
- if (S3_TRIO_3D_SERIES(ps3v->Chipset)) {
- outb(vgaCRIndex, 0x40);
- val = inb(vgaCRReg);
-@@ -3586,7 +3594,10 @@ S3VDisableMmio(ScrnInfoPtr pScrn)
- hwp = VGAHWPTR(pScrn);
- ps3v = S3VPTR(pScrn);
-
-- vgaCRIndex = hwp->PIOOffset + hwp->IOBase + 4;
-+ vgaCRIndex = hwp->IOBase + 4;
-+#if GET_ABI_MAJOR(ABI_VIDEODRV_VERSION) < 12
-+ vgaCRIndex += hwp->PIOOffset;
-+#endif
- vgaCRReg = vgaCRIndex + 1;
- outb(vgaCRIndex, 0x53);
- /* Restore register's original state */
-diff --git a/src/s3v_hwcurs.c b/src/s3v_hwcurs.c
-index 53c539f..58e8fd9 100644
---- a/src/s3v_hwcurs.c
-+++ b/src/s3v_hwcurs.c
-@@ -39,6 +39,7 @@ in this Software without prior written authorization from the XFree86 Project.
-
-
- #include "s3v.h"
-+#include "s3v_pciids.h"
-
- /* protos */
-
-diff --git a/src/s3v_i2c.c b/src/s3v_i2c.c
-index cbac21f..6bbfd1e 100644
---- a/src/s3v_i2c.c
-+++ b/src/s3v_i2c.c
-@@ -58,7 +58,6 @@ in this Software without prior written authorization from the XFree86 Project.
- #include "compiler.h"
-
- #include "xf86Pci.h"
--#include "xf86PciInfo.h"
-
- #include "vgaHW.h"
-
-diff --git a/src/s3v_pciids.h b/src/s3v_pciids.h
-new file mode 100644
-index 0000000..5d11333
---- /dev/null
-+++ b/src/s3v_pciids.h
-@@ -0,0 +1,18 @@
-+#ifndef S3V_PCIIDS_H
-+#define S3V_PCIIDS_H
-+
-+#define PCI_VENDOR_S3 0x5333
-+#define PCI_CHIP_VIRGE 0x5631
-+#define PCI_CHIP_TRIO 0x8811
-+#define PCI_CHIP_TRIO64UVP 0x8814
-+#define PCI_CHIP_VIRGE_VX 0x883D
-+#define PCI_CHIP_TRIO64V2_DXGX 0x8901
-+#define PCI_CHIP_Trio3D 0x8904
-+#define PCI_CHIP_VIRGE_DXGX 0x8A01
-+#define PCI_CHIP_VIRGE_GX2 0x8A10
-+#define PCI_CHIP_Trio3D_2X 0x8A13
-+#define PCI_CHIP_VIRGE_MX 0x8C01
-+#define PCI_CHIP_VIRGE_MXPLUS 0x8C02
-+#define PCI_CHIP_VIRGE_MXP 0x8C03
-+
-+#endif /* S3V_PCIIDS_H */
-diff --git a/src/s3v_shadow.c b/src/s3v_shadow.c
-index e2e1269..82b763f 100644
---- a/src/s3v_shadow.c
-+++ b/src/s3v_shadow.c
-@@ -60,7 +60,6 @@ in this Software without prior written authorization from the XFree86 Project.
-
- #include "xf86.h"
- #include "xf86_OSproc.h"
--#include "xf86PciInfo.h"
- #include "xf86Pci.h"
- #include "shadowfb.h"
- #include "servermd.h"
-diff --git a/src/s3v_xv.c b/src/s3v_xv.c
-index 7e7c243..2466789 100644
---- a/src/s3v_xv.c
-+++ b/src/s3v_xv.c
-@@ -40,8 +40,9 @@ in this Software without prior written authorization from the XFree86 Project.
- #include "config.h"
- #endif
-
-- /* Most xf86 commons are already in s3v.h */
--#include "s3v.h"
-+/* Most xf86 commons are already in s3v.h */
-+#include "s3v.h"
-+#include "s3v_pciids.h"
-
- #if 0
- #define OFF_DELAY 250 /* milliseconds */
-@@ -137,7 +138,7 @@ void S3VInitVideo(ScreenPtr pScreen)
- adaptors = &newAdaptor;
- } else {
- newAdaptors = /* need to free this someplace */
-- xalloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
-+ malloc((num_adaptors + 1) * sizeof(XF86VideoAdaptorPtr*));
- if(newAdaptors) {
- memcpy(newAdaptors, adaptors, num_adaptors *
- sizeof(XF86VideoAdaptorPtr));
-@@ -152,7 +153,7 @@ void S3VInitVideo(ScreenPtr pScreen)
- xf86XVScreenInit(pScreen, adaptors, num_adaptors);
-
- if(newAdaptors)
-- xfree(newAdaptors);
-+ free(newAdaptors);
- }
-
- /* client libraries expect an encoding */
-@@ -301,10 +302,10 @@ S3VAllocAdaptor(ScrnInfoPtr pScrn)
- if(!(adapt = xf86XVAllocateVideoAdaptorRec(pScrn)))
- return NULL;
-
-- if(!(pPriv = xcalloc(1, sizeof(S3VPortPrivRec) +
-+ if(!(pPriv = calloc(1, sizeof(S3VPortPrivRec) +
- (sizeof(DevUnion) * S3V_MAX_PORTS))))
- {
-- xfree(adapt);
-+ free(adapt);
- return NULL;
- }
-