xserver-multidpi/hw/xfree86
Laszlo Ersek ca8d88e503 xfree86: recognize primary BUS_PCI device in xf86IsPrimaryPlatform()
The new platform bus code and the old PCI bus code overlap. Platform bus
can handle any type of device, including PCI devices, whereas the PCI code
can only handle PCI devices. Some drivers only support the old style
PCI-probe methods, but the primary device detection code is server based,
not driver based; so we might end up with a primary device which only has
a PCI bus-capable driver, but was detected as primary by the platform
code, or the other way around.

(The above paragraph was shamelessly stolen from Hans de Goede, and
customized.)

The latter case applies to QEMU's virtio-gpu-pci device: it is detected as
a BUS_PCI primary device, but we actually probe it first (with the
modesetting driver) through xf86platformProbeDev(). The
xf86IsPrimaryPlatform() function doesn't recognize the device as primary
(it bails out as soon as it sees BUS_PCI); instead, we add the device as a
secondary graphics card under "autoAddGPU". In turn, the success of this
automatic probing-as-GPU prevents xf86CallDriverProbe() from proceeding to
the PCI probing.

The result is that the server exits with no primary devices detected.

Commit cf66471353 ("xfree86: use udev to provide device enumeration for
kms devices (v10)") added "cross-bus" matching to xf86IsPrimaryPci(). Port
that now to xf86IsPrimaryPlatform(), so that we can probe virtio-gpu-pci
as a primary card in platform bus code.

Cc: Adam Jackson <ajax@redhat.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Keith Packard <keithp@keithp.com>
Cc: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Tested-By: Marcin Juszkiewicz <mjuszkiewicz@redhat.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-09-28 14:53:39 -04:00
..
common xfree86: recognize primary BUS_PCI device in xf86IsPrimaryPlatform() 2016-09-28 14:53:39 -04:00
ddc xfree86: small memory leaks fixes 2016-09-28 14:53:39 -04:00
dixmods Also dump passive grabs on XF86LogGrabInfo 2015-11-10 15:12:21 +10:00
doc xfree86: Unexport xf86Initialising, remove xf86ServerIsInitialising 2016-04-18 11:22:58 -04:00
dri Remove fd_set from Block/Wakeup handler API 2016-07-18 15:27:51 -04:00
dri2 xrandrprovider: Do not use separate lists for unbound / source / offload slaves 2016-06-17 11:35:58 +02:00
drivers xfree86: small memory leaks fixes 2016-09-28 14:53:39 -04:00
exa build: Remove stale miext/cw include paths 2015-10-27 13:46:13 -04:00
fbdevhw fbdevhw: Fix a const qualifier warning 2015-09-23 15:18:24 -04:00
glamor_egl glamor: Share code for put_image handling. 2014-06-15 23:20:09 +01:00
i2c xfree86: Fix null pointer dereference 2016-09-28 14:53:39 -04:00
int10 x86emu: Change include order to avoid conflict with system header 2016-04-29 11:05:38 -04:00
loader xfree86: print the module name together with the load failure message 2016-08-24 08:30:10 +10:00
man xfree86: Undocument UseSIGIO in xorg.conf 2016-06-08 11:36:32 -04:00
modes xf86RandR12: Fix XF86VidModeSetGamma triggering a BadImplementation error 2016-09-28 14:53:39 -04:00
os-support Switch poll() users to xserver_poll() 2016-07-21 15:04:36 -04:00
parser dix: Use OsSignal() not signal() 2016-06-08 11:36:31 -04:00
ramdac xf86Cursor: Add hw cursor support for prime 2016-09-13 10:27:19 +02:00
shadowfb Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
utils xfree86: small memory leaks fixes 2016-09-28 14:53:39 -04:00
vbe xfree86: Change VBE version early-out to 1.2. (#22672) 2016-03-14 11:44:10 -04:00
vgahw Drop trailing whitespaces 2014-11-12 10:25:00 +10:00
x86emu x86emu: Change include order to avoid conflict with system header 2016-04-29 11:05:38 -04:00
.gitignore Xorg: Add Xorg.wrap to hw/xfree86/.gitignore 2014-04-18 11:39:16 +02:00
Makefile.am vidmode: move to a separate library of its own 2016-02-29 16:29:01 -05:00
sdksyms.sh dix: Switch to the libXfont2 API (v2) 2016-07-18 15:25:59 -04:00
xorg-wrapper.c Xorg.wrap: activate libdrm based detection for KMS drivers 2015-12-03 11:05:37 -05:00
Xorg.sh.in 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