xserver/hw/xfree86
Aaron Plattner 4ecda36259 xfree86: Fix xf86_check_platform_slot's handling of PCI
If a PCI entity is found, xf86_check_platform_slot performs a device ID check
against the xf86_platform_device passed in.  However, it just returns
immediately without checking the rest of the entities first.  This leads to this
situation happening:

1. The nvidia driver creates an entity 0 with bus.type == BUS_PCI
2. The intel driver creates entity 1 for its platform device, opening
   /dev/dri/card0
3. xf86platformProbeDev calls probeSingleDevice on the Intel platform device,
   which calls doPlatformProbe, which calls xf86_check_platform_slot.
4. xf86_check_platform_slot compares the Intel platform device against the
   NVIDIA PCI entity.  Since they don't have the same device ID, it returns
   TRUE.
5. doPlatformProbe calls xf86ClaimPlatformSlot, which creates a duplicate entity
   for the Intel one.

Fix this by only returning FALSE if the PCI ID matches, and continuing the loop
otherwise.  In the scenario above, this allows it to continue on to find the
Intel platform device that matches the second entity.

Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
2015-03-31 14:36:00 -07:00
..
common xfree86: Fix xf86_check_platform_slot's handling of PCI 2015-03-31 14:36:00 -07:00
ddc Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
dixmods Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
doc xfree86: Remove the memory of MTRR awareness 2014-09-16 11:58:53 -04:00
dri Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
dri2 dri2: Set vdpau driver name if ddx does not provide any driver name 2015-01-26 10:42:26 -08:00
drivers glamor: Eliminate GLAMOR_USE_SCREEN and GLAMOR_USE_PICTURE_SCREEN 2015-03-24 12:01:39 -07:00
exa xfree86/exa: xf86GetOptValString returns const char * now 2014-01-12 10:14:50 -08:00
fbdevhw Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
glamor_egl glamor: Share code for put_image handling. 2014-06-15 23:20:09 +01:00
i2c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
int10 int10: Fix error check for pci_device_map_legacy 2015-03-13 12:31:21 +10:00
loader Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
man xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
modes xf86Crtc: add tile prop setting 2015-03-31 12:31:51 +10:00
os-support int10: Fix error check for pci_device_map_legacy 2015-03-13 12:31:21 +10:00
parser Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
ramdac Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
shadowfb Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
utils Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
vbe Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
vgahw Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
x86emu Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
Xorg.sh.in xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
sdksyms.sh symbols: Fix sdksyms.sh to cope with gcc5 2015-03-13 12:31:21 +10:00
xorg-wrapper.c xfree86: rename Xorg.bin to Xorg 2015-01-05 09:53:58 +10:00
xorgconf.cpp xfree86: fix wrong DontZap documentation (#71113) 2014-05-24 20:02:56 +10:00