[PATCH xf86-video-tdfx 7/7] Add more PCI IDs for supported chips
Guillem Jover
guillem at hadrons.org
Mon Oct 7 12:11:25 PDT 2013
Add support for Velocity and Voodoo4 chips.
Signed-off-by: Guillem Jover <guillem at hadrons.org>
---
src/tdfx.h | 2 ++
src/tdfx_driver.c | 15 ++++++++++++++-
2 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/tdfx.h b/src/tdfx.h
index d8a72db..38a7ad3 100644
--- a/src/tdfx.h
+++ b/src/tdfx.h
@@ -77,7 +77,9 @@
#define PCI_CHIP_VOODOO_GRAPHICS 0x0001
#define PCI_CHIP_VOODOO2 0x0002
#define PCI_CHIP_BANSHEE 0x0003
+#define PCI_CHIP_VELOCITY 0x0004
#define PCI_CHIP_VOODOO3 0x0005
+#define PCI_CHIP_VOODOO4 0x0007
#define PCI_CHIP_VOODOO5 0x0009
#define PCI_CARD_VOODOO3_2000 0x0036
diff --git a/src/tdfx_driver.c b/src/tdfx_driver.c
index bcd674f..624fc4f 100644
--- a/src/tdfx_driver.c
+++ b/src/tdfx_driver.c
@@ -154,12 +154,15 @@ static void TDFXDisplayPowerManagementSet(ScrnInfoPtr pScrn,
static const struct pci_id_match tdfx_device_match[] = {
TDFX_DEVICE_MATCH(PCI_CHIP_BANSHEE, PCI_MATCH_ANY, Banshee),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VELOCITY, PCI_MATCH_ANY, Voodoo3_Unknown),
+
/* There are *many* missing PCI IDs here.
*/
TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_2000, Voodoo3_2000),
TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_CARD_VOODOO3_3000, Voodoo3_3000),
TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO3, PCI_MATCH_ANY, Voodoo3_Unknown),
+ TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO4, PCI_MATCH_ANY, Voodoo5),
TDFX_DEVICE_MATCH(PCI_CHIP_VOODOO5, PCI_MATCH_ANY, Voodoo5),
{ 0, 0, 0 }
};
@@ -198,7 +201,9 @@ _X_EXPORT DriverRec TDFX = {
/* Chipsets */
static SymTabRec TDFXChipsets[] = {
{ PCI_CHIP_BANSHEE, "3dfx Banshee"},
+ { PCI_CHIP_VELOCITY, "3dfx Velocity"},
{ PCI_CHIP_VOODOO3, "3dfx Voodoo3"},
+ { PCI_CHIP_VOODOO4, "3dfx Voodoo4"},
{ PCI_CHIP_VOODOO5, "3dfx Voodoo5"},
{ -1, NULL }
};
@@ -206,7 +211,9 @@ static SymTabRec TDFXChipsets[] = {
#ifndef XSERVER_LIBPCIACCESS
static PciChipsets TDFXPciChipsets[] = {
{ PCI_CHIP_BANSHEE, PCI_CHIP_BANSHEE, RES_SHARED_VGA },
+ { PCI_CHIP_VELOCITY, PCI_CHIP_VELOCITY, RES_SHARED_VGA },
{ PCI_CHIP_VOODOO3, PCI_CHIP_VOODOO3, RES_SHARED_VGA },
+ { PCI_CHIP_VOODOO4, PCI_CHIP_VOODOO4, RES_SHARED_VGA },
{ PCI_CHIP_VOODOO5, PCI_CHIP_VOODOO5, RES_SHARED_VGA },
{ -1, -1, RES_UNDEFINED }
};
@@ -1050,6 +1057,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_BANSHEE:
pTDFX->MaxClock = 270000;
break;
+ case PCI_CHIP_VELOCITY:
case PCI_CHIP_VOODOO3:
switch(match->subsysCard) {
case PCI_CARD_VOODOO3_2000:
@@ -1063,6 +1071,7 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
break;
}
break;
+ case PCI_CHIP_VOODOO4:
case PCI_CHIP_VOODOO5:
pTDFX->MaxClock = 350000;
break;
@@ -1078,7 +1087,9 @@ TDFXPreInit(ScrnInfoPtr pScrn, int flags)
case PCI_CHIP_BANSHEE:
clockRanges->interlaceAllowed = FALSE;
break;
+ case PCI_CHIP_VELOCITY:
case PCI_CHIP_VOODOO3:
+ case PCI_CHIP_VOODOO4:
case PCI_CHIP_VOODOO5:
clockRanges->interlaceAllowed = TRUE;
break;
@@ -2267,7 +2278,7 @@ TDFXScreenInit(SCREEN_INIT_ARGS_DECL) {
}
scanlines = (pTDFX->backOffset - pTDFX->fbOffset) / pTDFX->stride;
- if(pTDFX->ChipType < PCI_CHIP_VOODOO5) {
+ if(pTDFX->ChipType < PCI_CHIP_VOODOO4) {
if (scanlines > 2047)
scanlines = 2047;
} else {
@@ -2588,7 +2599,9 @@ TDFXValidMode(SCRN_ARG_TYPE arg, DisplayModePtr mode, Bool verbose, int flags) {
switch (pTDFX->ChipType) {
case PCI_CHIP_BANSHEE:
return MODE_BAD;
+ case PCI_CHIP_VELOCITY:
case PCI_CHIP_VOODOO3:
+ case PCI_CHIP_VOODOO4:
case PCI_CHIP_VOODOO5:
return MODE_OK;
default:
--
1.8.4
More information about the xorg-devel
mailing list