summaryrefslogtreecommitdiff
path: root/src/savage_driver.h
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2007-08-22 12:38:14 -0700
committerIan Romanick <idr@us.ibm.com>2007-08-22 12:38:14 -0700
commitffc5ba7f0b1cdefdcecf6bd47018b6a4924bfc44 (patch)
treeaef6fd28a77e250c740225ff496f006fb29d0984 /src/savage_driver.h
parent68ceead721aeb75b9faed6297407a320a83499e4 (diff)
Merge PCI-rework support and "classic" PCI interface support into one treepci-rework
First pass at merging both trees. So far, this has only been compile tested. I need to dig out a savage card to put in a system for testing, so it may take another hour or two.
Diffstat (limited to 'src/savage_driver.h')
-rw-r--r--src/savage_driver.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/savage_driver.h b/src/savage_driver.h
index 9286c1e..74eea5c 100644
--- a/src/savage_driver.h
+++ b/src/savage_driver.h
@@ -33,7 +33,18 @@
#include <string.h>
#include <math.h>
+#ifdef PCIACCESS
#include <pciaccess.h>
+#define VENDOR_ID(p) (p)->vendor_id
+#define DEVICE_ID(p) (p)->device_id
+#define SUBSYS_ID(p) (p)->subdevice_id
+#define CHIP_REVISION(p) (p)->revision
+#else
+#define VENDOR_ID(p) (p)->vendor
+#define DEVICE_ID(p) (p)->chipType
+#define SUBSYS_ID(p) (p)->subsysCard
+#define CHIP_REVISION(p) (p)->chipRev
+#endif
#define MODE_24 24
@@ -365,8 +376,12 @@ typedef struct _Savage {
int TVSizeY;
CloseScreenProcPtr CloseScreen;
+#ifdef PCIACCESS
struct pci_device * PciInfo;
+#else
+ pciVideoPtr PciInfo;
PCITAG PciTag;
+#endif
int Chipset;
int ChipId;
int ChipRev;