diff options
author | Ville Skyttä <ville.skytta@iki.fi> | 2004-07-22 00:00:00 +0200 |
---|---|---|
committer | Tormod Volden <debian.tormod@gmail.com> | 2011-11-18 23:51:50 +0100 |
commit | 55ed0ba7abcf758330b1000cdd1d914cee93dce5 (patch) | |
tree | 7f22f52b9a953a93604421026fe6b502c3d5a6bd | |
parent | 1c57df5a09d39ca372436c34c12671daaaab59e5 (diff) |
Patch from GeeXboX 0.97 for ViRGE/GX2 support
Extracted from s3switch.tar.bz2 contained in the GeeXboX 0.97 source tarball
from http://www.geexbox.org/releases/0.97/geexbox-0.97-full.tar
The author seems to be "mADAR". Thanks!
-rw-r--r-- | s3switch.c | 16 |
1 files changed, 15 insertions, 1 deletions
@@ -2,6 +2,9 @@ // T. N. Roberts, 99-Aug-26. // Linux x86 only. +// Modified by mADAR +// added S3 Virge/GX2 support + #include <stdio.h> #include <stdlib.h> @@ -19,6 +22,7 @@ // Define the Savage chip classes. PCI id's stolen from xf86PciInfo.h +#define PCI_CHIP_VIRGEGX2 0x8A10 #define PCI_CHIP_SAVAGE3D 0x8A20 #define PCI_CHIP_SAVAGE3D_MV 0x8A21 #define PCI_CHIP_SAVAGE4 0x8A22 @@ -44,6 +48,7 @@ #define PCI_CHIP_SUPSAV_IXCDDR 0x8c2f enum { + S3_VIRGEGX2, S3_SAVAGE3D, S3_SAVAGE4, S3_SAVAGEMXIX, @@ -124,6 +129,9 @@ fetch_bios_data() gPCIid |= inb( 0x3d5 ); switch( gPCIid ) { + case PCI_CHIP_VIRGEGX2: + ChipClass = S3_VIRGEGX2; + break; case PCI_CHIP_SAVAGE3D: case PCI_CHIP_SAVAGE3D_MV: ChipClass = S3_SAVAGE3D; @@ -160,7 +168,7 @@ fetch_bios_data() ChipClass = S3_SUPERSAVAGE; break; default: - printf( "PCI id is not a recognized Savage: %04x\n", gPCIid ); + printf( "PCI id is not a recognized Savage or Virge GX2: %04x\n", gPCIid ); exit(-1); } @@ -189,6 +197,12 @@ fetch_bios_data() switch( ChipClass ) { + case S3_VIRGEGX2: + jDevices = (jDevices & 0x0f) + | CRT_ATTACHED + | TV_ATTACHED; + break; + case S3_SAVAGE3D: jDevices = (jDevices & 0x0f) | CRT_ATTACHED |