summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/xf86.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2012-05-08 13:01:12 +0100
committerDave Airlie <airlied@redhat.com>2012-05-21 12:58:33 +0100
commit39f73e813f7d404498629f6104a9003d092af28d (patch)
treece0bae268dfc7b112fba6b5be0e6edcb6240ae40 /hw/xfree86/common/xf86.h
parent07dcc3f1a98dff2ee374a15ac5beac778d2ccc97 (diff)
xf86/pci: fix slot claiming counting.
Currently if we claim a slot for a PCI driver, we never let it go properly, this prevents the fallback probe from reusing the slot, even though it isn't claimed for that pci slot. So if you set the modesetting driver to point at a specific kms device, that isn't a PCI device (i.e. USB dongle), then the modesetting driver loads, the pci probe tries to bind the config slot to the primary PCI device, however we then check the kms device bus id to discover it isn't valid. However we don't remove the claim on the slot. Next the old probe function is called and there is no slots to claim. This patch fixes that and converts the pciSlotClaimed boolean into a counter, and changes the unclaim api to take a device pointer to remove from the entity. Reviewed-by: Adam Jackson <ajax@redhat.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'hw/xfree86/common/xf86.h')
-rw-r--r--hw/xfree86/common/xf86.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/xfree86/common/xf86.h b/hw/xfree86/common/xf86.h
index fc4c34e92..e6d41d64b 100644
--- a/hw/xfree86/common/xf86.h
+++ b/hw/xfree86/common/xf86.h
@@ -97,12 +97,12 @@ extern _X_EXPORT Bool VTSwitchEnabled; /* kbd driver */
/* PCI related */
#ifdef XSERVER_LIBPCIACCESS
#include <pciaccess.h>
-extern _X_EXPORT Bool pciSlotClaimed;
+extern _X_EXPORT int pciSlotClaimed;
extern _X_EXPORT Bool xf86CheckPciSlot(const struct pci_device *);
extern _X_EXPORT int xf86ClaimPciSlot(struct pci_device *, DriverPtr drvp,
int chipset, GDevPtr dev, Bool active);
-extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *);
+extern _X_EXPORT void xf86UnclaimPciSlot(struct pci_device *, GDevPtr dev);
extern _X_EXPORT Bool xf86ParsePciBusString(const char *busID, int *bus,
int *device, int *func);
extern _X_EXPORT Bool xf86ComparePciBusString(const char *busID, int bus,