Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / xfree86_allow_fallback_to_pci_bus_probe_for_non_seat0.patch
1 From 29b1484bb9555e45067669cbfe68a3c40596f4ff Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?La=C3=A9rcio=20de=20Sousa?= <lbsousajr@gmail.com>
3 Date: Thu, 3 Apr 2014 11:19:13 -0300
4 Subject: [PATCH] xfree86: allow fallback to PCI bus probe for graphics devices
5 on non-seat0 X servers (#66851)
6 MIME-Version: 1.0
7 Content-Type: text/plain; charset=UTF-8
8 Content-Transfer-Encoding: 8bit
9
10 Currently non-seat0 X servers only probe platform bus for graphics devices,
11 which is OK for most KMS-compliant drivers. However, for non-KMS drivers
12 (like NVIDIA proprietary ones), graphics devices can't be reached
13 by platform bus probe, resulting in a "No devices detected" error.
14
15 This patch allows a fallback to PCI bus probe for non-seat0 X servers
16 in case no platform bus graphics device is found.
17
18 Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=66851
19
20 Signed-off-by: LaƩrcio de Sousa <lbsousajr@gmail.com>
21 Reviewed-by: Hans de Goede <hdegoede@redhat.com>
22 Reviewed-by: Dave Airlie <airlied@redhat.com>
23 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
24 ---
25 hw/xfree86/common/xf86Bus.c | 4 ++--
26 1 file changed, 2 insertions(+), 2 deletions(-)
27
28 diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c
29 index 507c57d..b3b3f8c 100644
30 --- a/hw/xfree86/common/xf86Bus.c
31 +++ b/hw/xfree86/common/xf86Bus.c
32 @@ -81,7 +81,7 @@ xf86CallDriverProbe(DriverPtr drv, Bool detect_only)
33 if (drv->platformProbe != NULL) {
34 foundScreen = xf86platformProbeDev(drv);
35 }
36 - if (ServerIsNotSeat0())
37 + if (ServerIsNotSeat0() && foundScreen)
38 return foundScreen;
39 #endif
40
41 @@ -201,7 +201,7 @@ xf86BusProbe(void)
42 {
43 #ifdef XSERVER_PLATFORM_BUS
44 xf86platformProbe();
45 - if (ServerIsNotSeat0())
46 + if (ServerIsNotSeat0() && xf86_num_platform_devices > 0)
47 return;
48 #endif
49 #ifdef XSERVER_LIBPCIACCESS
50 --
51 2.0.4
52