xorg-x11-server/xserver-1.3.0-pci-bus-count.patch
Adam Jackson 115cc5d8ad * Mon Apr 09 2007 Adam Jackson <ajax@redhat.com> 1.2.99.905-2
- xserver-1.3.0-pci-bus-count.patch: Allocate the PCI bus array dynamically,
  so as not to run off the end of it.
- xserver-1.3.0-mmap-failure-check.patch: Check for failure when mmap'ing
  bus memory. (#234073)
- xserver-1.3.0-rom-search.patch: Look for the sysfs ROM file in the (flat)
  /sys/bus/pci/devices tree, instead of the (bus-topological) /sys/devices,
  so we don't fail to find ROMs merely because they're behind a bridge.
- xserver-1.3.0-no-pseudocolor-composite.patch: Refuse to initialize
  Composite when Render is missing or when the root window is using
  a pseudocolor visual. (#217388)
- xserver-1.3.0-xnest-exposures.patch: Fix Motif app redraw in Xnest. (#229350)
2007-04-09 23:09:52 +00:00

41 lines
1.3 KiB
Diff

--- xorg-server-1.1.1/hw/xfree86/os-support/bus/Pci.c.jx 2007-02-12 11:08:52.000000000 -0500
+++ xorg-server-1.1.1/hw/xfree86/os-support/bus/Pci.c 2007-03-30 12:20:08.000000000 -0400
@@ -231,14 +231,14 @@
int pciMaxBusNum = MAX_PCI_BUSES;
static Bool inProbe = FALSE;
-static pciConfigPtr pci_devp[MAX_PCI_DEVICES + 1] = {NULL, };
+static pciConfigPtr *pci_devp = NULL;
static int readPciBios( PCITAG Tag, CARD8* tmp, ADDRESS hostbase,
unsigned char * buf, int len, PciBiosType BiosType );
static int (*pciOSHandleBIOS)(PCITAG Tag, int basereg, unsigned char *buf, int len);
-int xf86MaxPciDevs = MAX_PCI_DEVICES;
+int xf86MaxPciDevs = 0;
/*
* Platform specific PCI function pointers.
@@ -271,6 +271,11 @@
if (pciNumBuses <= 0)
ARCH_PCI_OS_INIT();
#endif
+ if (xf86MaxPciDevs == 0)
+ xf86MaxPciDevs = MAX_PCI_DEVICES; /* XXX bogus */
+ if (pci_devp)
+ xfree(pci_devp);
+ pci_devp = xnfcalloc(xf86MaxPciDevs + 1, sizeof(pciConfigPtr));
}
void pciSetOSBIOSPtr(int (*bios_fn)(PCITAG Tag, int basereg, unsigned char * buf, int len))
@@ -913,7 +918,7 @@
* result in an endless recursion if platform/OS specific PCI
* bus probing code calls this function from with in it.
*/
- if (done || pci_devp[0])
+ if (done || pci_devp)
return pci_devp;
done = TRUE;