diff options
author | marha <marha@users.sourceforge.net> | 2010-09-24 10:10:29 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2010-09-24 10:10:29 +0000 |
commit | 84b35d18d0b84909f7216fc6a7487ffa72bd3f18 (patch) | |
tree | a6a1cf67169f65d2b680c6d3f548d45901284aff /xorg-server/hw/xfree86/common/xf86pciBus.c | |
parent | 6a14682c40a85bbfdb5023a3330e95a3a3c0ad03 (diff) | |
download | vcxsrv-84b35d18d0b84909f7216fc6a7487ffa72bd3f18.tar.gz vcxsrv-84b35d18d0b84909f7216fc6a7487ffa72bd3f18.tar.bz2 vcxsrv-84b35d18d0b84909f7216fc6a7487ffa72bd3f18.zip |
xserver xkbcomp libxcb pixman git update 24/9/2010
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86pciBus.c')
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86pciBus.c | 49 |
1 files changed, 42 insertions, 7 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86pciBus.c b/xorg-server/hw/xfree86/common/xf86pciBus.c index 8729089cf..b5e8790b6 100644 --- a/xorg-server/hw/xfree86/common/xf86pciBus.c +++ b/xorg-server/hw/xfree86/common/xf86pciBus.c @@ -76,6 +76,11 @@ Bool pciSlotClaimed = FALSE; (((c) & 0x00ffff00) \
== ((PCI_CLASS_DISPLAY << 16) | (PCI_SUBCLASS_DISPLAY_VGA << 8)))
+
+static struct pci_slot_match xf86IsolateDevice = {
+ PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0
+};
+
void
xf86FormatPciBusNumber(int busnum, char *buffer)
{
@@ -1302,15 +1307,10 @@ xf86PciMatchDriver(char* matches[], int nmatches) { }
pci_iterator_destroy(iter);
-
- if (!info) {
- ErrorF("Primary device is not PCI\n");
- }
#ifdef __linux__
- else {
+ if (info)
matchDriverFromFiles(matches, info->vendor_id, info->device_id);
- }
-#endif /* __linux__ */
+#endif
for (i = 0; (i < nmatches) && (matches[i]); i++) {
/* find end of matches list */
@@ -1322,3 +1322,38 @@ xf86PciMatchDriver(char* matches[], int nmatches) { return i;
}
+
+Bool
+xf86PciConfigure(void *busData, struct pci_device *pDev)
+{
+ struct pci_device * pVideo = NULL;
+
+ pVideo = (struct pci_device *) busData;
+ if (pDev &&
+ (pDev->domain == pVideo->domain) &&
+ (pDev->bus == pVideo->bus) &&
+ (pDev->dev == pVideo->dev) &&
+ (pDev->func == pVideo->func))
+ return 0;
+
+ return 1;
+}
+
+void
+xf86PciConfigureNewDev(void *busData, struct pci_device *pVideo,
+ GDevRec *GDev, int *chipset)
+{
+ char busnum[8];
+
+ pVideo = (struct pci_device *) busData;
+
+ GDev->busID = xnfalloc(16);
+ xf86FormatPciBusNumber(pVideo->bus, busnum);
+ sprintf(GDev->busID, "PCI:%s:%d:%d", busnum, pVideo->dev, pVideo->func);
+
+ GDev->chipID = pVideo->device_id;
+ GDev->chipRev = pVideo->revision;
+
+ if (*chipset < 0)
+ *chipset = (pVideo->vendor_id << 16) | pVideo->device_id;
+}
|