xserver/hw/xfree86/common
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
..
.gitignore .gitignore: use common defaults with custom section #24239 2009-11-11 21:40:20 -08:00
Makefile.am xfree86: drop double-typedef of DBusConnection 2014-11-12 10:25:00 +10:00
compiler.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
dgaproc.h hw/xfree86: Lots of constant string support 2014-01-12 10:14:48 -08:00
extramodes Remove some default modes that really shouldn't be in the default set. 2008-06-24 10:40:36 -04:00
fourcc.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
modeline2c.awk Remove some OS/2 leftovers. 2009-04-06 10:58:47 -04:00
vesamodes Fix standard VESA modes. 2006-11-03 14:06:32 -08:00
vidmodeproc.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xaarop.h xfree86: Drop some dead XAA decls from SDK headers 2012-07-25 14:03:31 -07:00
xf86.h xfree86: Remove xf86ConfigActivePciEntity 2014-07-29 09:52:27 -04:00
xf86AutoConfig.c Solaris: Move shared declarations to xf86_OSlib.h 2014-12-19 18:16:19 -08:00
xf86Build.h.in Print the build time as well as the date if we can. 2007-06-04 02:03:44 -04:00
xf86Bus.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Bus.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86Config.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Config.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86Configure.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Cursor.c xfree86: Remove unused HardEdges 2014-07-29 09:53:19 -04:00
xf86DGA.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86DPMS.c xfree86: don't force the screensaver off on DPMS unblank, merely suggest it 2014-07-14 08:39:50 +10:00
xf86Events.c Drop valuator mask argument from GetKeyboardEvents 2015-03-13 12:31:21 +10:00
xf86Extensions.c miinitext: introduce LoadExtensionList() to replace over LoadExtension() 2014-03-25 16:00:17 -07:00
xf86Extensions.h xf86: Re-export extension disable flags 2012-07-16 18:24:49 -07:00
xf86Globals.c xfree86: Remove xf86Info.log (v2) 2014-09-26 15:27:18 -04:00
xf86Helper.c xf86LogInit: log to XDG_DATA_HOME when not running as root 2014-04-03 14:17:35 +10:00
xf86InPriv.h xfree86/common: Warning fixes. Mostly const string handling. 2014-01-12 10:14:48 -08:00
xf86Init.c xfree86: Remove some can't-happen printf from xf86CreateRootWindow 2014-10-08 10:10:39 +02:00
xf86Mode.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Module.h Drop valuator mask argument from GetKeyboardEvents 2015-03-13 12:31:21 +10:00
xf86Opt.h xfree86/common: Warning fixes. Mostly const string handling. 2014-01-12 10:14:48 -08:00
xf86Option.c xfree86/common: Warning fixes. Mostly const string handling. 2014-01-12 10:14:48 -08:00
xf86Optionstr.h hw/xfree86: Lots of constant string support 2014-01-12 10:14:48 -08:00
xf86PM.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86PciInfo.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86Priv.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86Privstr.h xfree86: Remove unused xf86Info.useDefaultFontPathFrom 2014-09-26 15:27:18 -04:00
xf86RandR.c xfree86: Remove pointless xf86RandRCreateScreenResources 2014-07-29 09:53:01 -04:00
xf86VGAarbiter.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86VGAarbiter.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86VGAarbiterPriv.h hw/xfree86: Fix VGA arbiter screen proc wrapping 2014-07-17 11:17:22 -07:00
xf86VidMode.c Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86Xinput.c Drop valuator mask argument from GetKeyboardEvents 2015-03-13 12:31:21 +10:00
xf86Xinput.h Drop valuator mask argument from GetKeyboardEvents 2015-03-13 12:31:21 +10:00
xf86cmap.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86cmap.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86fbBus.c xfree86: use udev to provide device enumeration for kms devices (v10) 2012-07-06 10:20:19 +01:00
xf86fbman.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86fbman.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86noBus.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xf86pciBus.c xfree86: Remove unused xf86{Map,Unmap}LegacyIO 2014-07-29 09:52:52 -04:00
xf86pciBus.h xfree86: Make driver matching consistent 2014-07-07 16:11:00 -07:00
xf86platformBus.c xfree86: Fix xf86_check_platform_slot's handling of PCI 2015-03-31 14:36:00 -07:00
xf86platformBus.h xfree86: Fallback to first platform device as primary 2014-08-21 20:03:48 -05:00
xf86sbusBus.c xf86SbusCmapLoadPalette: Delay malloc until needed, avoiding leak on error 2013-04-24 14:22:36 -07:00
xf86sbusBus.h Replace 'pointer' type with 'void *' 2014-01-12 10:24:11 -08:00
xf86str.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86vmode.c Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86xv.c dix: Always store GC client clip as a region (v2) 2014-10-27 15:46:05 -04:00
xf86xv.h xfree86: Remove xv clip notify driver hook 2014-09-26 15:27:18 -04:00
xf86xvmc.c xf86XvMCScreenInit: Avoid leak if dixRegisterPrivateKey fails 2013-02-05 18:34:57 -08:00
xf86xvmc.h Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
xf86xvpriv.h xfree86: Remove xv clip notify driver hook 2014-09-26 15:27:18 -04:00
xisb.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xisb.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorgHelper.c Introduce a consistent coding style 2012-03-21 13:54:42 -07:00
xorgVersion.h Introduce a consistent coding style 2012-03-21 13:54:42 -07:00