diff options
Diffstat (limited to 's3switch.c')
-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 |