diff options
author | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-05-30 19:12:31 +0300 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-09-14 18:42:54 +0300 |
commit | a7efeda8a56a540542e056a426e89cfc053a4162 (patch) | |
tree | fd164f73c8fb14476ee26f75f0dbe05b08f51589 | |
parent | c768cdda92696b636c10bb2df64167d5274b4b99 (diff) |
xfree86: use xf86PciIsolateDevice to get PCI config information
Make xf86IsolateDevice private on PCI common file.
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
-rw-r--r-- | hw/xfree86/common/xf86Config.c | 13 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Globals.c | 4 | ||||
-rw-r--r-- | hw/xfree86/common/xf86Priv.h | 3 | ||||
-rw-r--r-- | hw/xfree86/common/xf86pciBus.c | 5 |
4 files changed, 8 insertions, 17 deletions
diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 28786baa3..6743b1081 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -60,7 +60,7 @@ #include "configProcs.h" #include "globals.h" #include "extension.h" -#include "Pci.h" +#include "xf86pciBus.h" #include "xf86Xinput.h" extern DeviceAssocRec mouse_assoc; @@ -2535,18 +2535,11 @@ xf86HandleConfigFile(Bool autoconfig) scanptr = xf86ConfigLayout.screens->screen->device->busID; } if (scanptr) { - int bus, device, func; if (strncmp(scanptr, "PCI:", 4) != 0) { xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n" "\tIgnoring IsolateDevice option.\n"); - } else if (sscanf(scanptr, "PCI:%d:%d:%d", &bus, &device, &func) == 3) { - xf86IsolateDevice.domain = PCI_DOM_FROM_BUS(bus); - xf86IsolateDevice.bus = PCI_BUS_NO_DOMAIN(bus); - xf86IsolateDevice.dev = device; - xf86IsolateDevice.func = func; - xf86Msg(X_INFO, - "Isolating PCI bus \"%d:%d:%d\"\n", bus, device, func); - } + } else + xf86PciIsolateDevice(scanptr); } /* Now process everything else */ diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c index 43665d1b6..781ee49ca 100644 --- a/hw/xfree86/common/xf86Globals.c +++ b/hw/xfree86/common/xf86Globals.c @@ -198,7 +198,3 @@ Bool xf86VidModeAllowNonLocal = FALSE; RootWinPropPtr *xf86RegisteredPropertiesTable = NULL; Bool xf86inSuspend = FALSE; Bool xorgHWAccess = FALSE; - -struct pci_slot_match xf86IsolateDevice = { - PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0 -}; diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h index b5e7a45e5..08c0fa93a 100644 --- a/hw/xfree86/common/xf86Priv.h +++ b/hw/xfree86/common/xf86Priv.h @@ -35,8 +35,6 @@ #ifndef _XF86PRIV_H #define _XF86PRIV_H -#include <pciaccess.h> - #include "xf86Privstr.h" #include "propertyst.h" #include "input.h" @@ -72,7 +70,6 @@ extern _X_EXPORT rgb xf86Weight; extern _X_EXPORT Bool xf86FlipPixels; extern _X_EXPORT Gamma xf86Gamma; extern _X_EXPORT char *xf86ServerName; -extern _X_EXPORT struct pci_slot_match xf86IsolateDevice; /* Other parameters */ diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index 74016af8a..46aa23a1d 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/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) { |