S3 ViRGE 4.0 devel notes rev: 26 Jun 1999 KJB Function Implemented -------- ----------- -required- S3VProbe; X S3VPreInit; X S3VScreenInit; X S3VSwitchMode; X S3VAdjustFrame; X S3VEnterVT; X S3VLeaveVT; X S3VFreeScreen; X S3VValidMode; X - dummy -private- S3VSave X S3VRestore X Status ------ 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 ---------- Put vgaHWUnlockmmio in S3VModeInit (see MGAModeInit for example)? ViRGE MX code appears to be in 3.3.2 tree only, port to 4.0. I have started to added the chipset info in the main driver code. (KJB) modes notes: move mode Private S3V settings to mode init function? 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.10 1999/06/27 14:08:11 dawes Exp $