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>
This commit is contained in:
parent
c768cdda92
commit
a7efeda8a5
|
@ -60,7 +60,7 @@
|
||||||
#include "configProcs.h"
|
#include "configProcs.h"
|
||||||
#include "globals.h"
|
#include "globals.h"
|
||||||
#include "extension.h"
|
#include "extension.h"
|
||||||
#include "Pci.h"
|
#include "xf86pciBus.h"
|
||||||
|
|
||||||
#include "xf86Xinput.h"
|
#include "xf86Xinput.h"
|
||||||
extern DeviceAssocRec mouse_assoc;
|
extern DeviceAssocRec mouse_assoc;
|
||||||
|
@ -2535,18 +2535,11 @@ xf86HandleConfigFile(Bool autoconfig)
|
||||||
scanptr = xf86ConfigLayout.screens->screen->device->busID;
|
scanptr = xf86ConfigLayout.screens->screen->device->busID;
|
||||||
}
|
}
|
||||||
if (scanptr) {
|
if (scanptr) {
|
||||||
int bus, device, func;
|
|
||||||
if (strncmp(scanptr, "PCI:", 4) != 0) {
|
if (strncmp(scanptr, "PCI:", 4) != 0) {
|
||||||
xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n"
|
xf86Msg(X_WARNING, "Bus types other than PCI not yet isolable.\n"
|
||||||
"\tIgnoring IsolateDevice option.\n");
|
"\tIgnoring IsolateDevice option.\n");
|
||||||
} else if (sscanf(scanptr, "PCI:%d:%d:%d", &bus, &device, &func) == 3) {
|
} else
|
||||||
xf86IsolateDevice.domain = PCI_DOM_FROM_BUS(bus);
|
xf86PciIsolateDevice(scanptr);
|
||||||
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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now process everything else */
|
/* Now process everything else */
|
||||||
|
|
|
@ -198,7 +198,3 @@ Bool xf86VidModeAllowNonLocal = FALSE;
|
||||||
RootWinPropPtr *xf86RegisteredPropertiesTable = NULL;
|
RootWinPropPtr *xf86RegisteredPropertiesTable = NULL;
|
||||||
Bool xf86inSuspend = FALSE;
|
Bool xf86inSuspend = FALSE;
|
||||||
Bool xorgHWAccess = FALSE;
|
Bool xorgHWAccess = FALSE;
|
||||||
|
|
||||||
struct pci_slot_match xf86IsolateDevice = {
|
|
||||||
PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, PCI_MATCH_ANY, 0
|
|
||||||
};
|
|
||||||
|
|
|
@ -35,8 +35,6 @@
|
||||||
#ifndef _XF86PRIV_H
|
#ifndef _XF86PRIV_H
|
||||||
#define _XF86PRIV_H
|
#define _XF86PRIV_H
|
||||||
|
|
||||||
#include <pciaccess.h>
|
|
||||||
|
|
||||||
#include "xf86Privstr.h"
|
#include "xf86Privstr.h"
|
||||||
#include "propertyst.h"
|
#include "propertyst.h"
|
||||||
#include "input.h"
|
#include "input.h"
|
||||||
|
@ -72,7 +70,6 @@ extern _X_EXPORT rgb xf86Weight;
|
||||||
extern _X_EXPORT Bool xf86FlipPixels;
|
extern _X_EXPORT Bool xf86FlipPixels;
|
||||||
extern _X_EXPORT Gamma xf86Gamma;
|
extern _X_EXPORT Gamma xf86Gamma;
|
||||||
extern _X_EXPORT char *xf86ServerName;
|
extern _X_EXPORT char *xf86ServerName;
|
||||||
extern _X_EXPORT struct pci_slot_match xf86IsolateDevice;
|
|
||||||
|
|
||||||
/* Other parameters */
|
/* Other parameters */
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,11 @@ Bool pciSlotClaimed = FALSE;
|
||||||
(((c) & 0x00ffff00) \
|
(((c) & 0x00ffff00) \
|
||||||
== ((PCI_CLASS_DISPLAY << 16) | (PCI_SUBCLASS_DISPLAY_VGA << 8)))
|
== ((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
|
void
|
||||||
xf86FormatPciBusNumber(int busnum, char *buffer)
|
xf86FormatPciBusNumber(int busnum, char *buffer)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue