summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThierry Reding <thierry.reding@avionic-design.de>2012-10-17 12:06:47 +0200
committerKeith Packard <keithp@keithp.com>2012-11-27 16:23:36 -0800
commit76d9c62eb2be2010a19bf36285012d086cdd180b (patch)
treeab8c00bd6f9bc5eac0dcde79a9bd9735c8cfc932
parentd50a94568e06a06df682a0028579d37a7b209d15 (diff)
xf86: Fix non-PCI configuration-less setups
For non-PCI video devices, such as those found on many ARM embedded systems, the X server currently requires the BusID option to specify the full path to the DRM device's sysfs node in order to properly match it against the probed platform devices. In order to allow X to start up properly if either the BusID option was omitted or no configuration is present at all, the first video device is used by default. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r--hw/xfree86/common/xf86platformBus.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 0525e39bc..599d84ac2 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -377,6 +377,14 @@ xf86platformProbeDev(DriverPtr drvp)
continue;
}
+ /*
+ * If all of the above fails, which can happen if X was started without
+ * configuration or if BusID wasn't set for non-PCI devices, use the first
+ * device by default.
+ */
+ if (!foundScreen && xf86_num_platform_devices > 0 && numDevs > 0)
+ foundScreen = probeSingleDevice(&xf86_platform_devices[0], drvp, devList[0], 0);
+
/* if autoaddgpu devices is enabled then go find a few more and add them as GPU screens */
if (xf86Info.autoAddGPU && numDevs) {
for (j = 0; j < xf86_num_platform_devices; j++) {