[PATCH 2/2] xfree86: Add GPU screens even if there are no active GDevs
Aaron Plattner
aplattner at nvidia.com
Tue Dec 30 09:13:16 PST 2014
xf86platformProbeDev creates GPU screens for any platform devices that were not
matched by a GDev in the loop above, but only if there was at least one device.
This means that it's impossible to configure a device as a GPU screen if there
is only one platform device that matches that driver.
Instead, create a GPU screen (if possible) for any platform device that was not
claimed by the GDev loop.
Signed-off-by: Aaron Plattner <aplattner at nvidia.com>
---
hw/xfree86/common/xf86platformBus.c | 14 +++++++++++---
1 file changed, 11 insertions(+), 3 deletions(-)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 387b5f1adcc4..c1aaba41ae60 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -428,6 +428,10 @@ xf86platformProbeDev(DriverPtr drvp)
/* find the main device or any device specificed in xorg.conf */
for (i = 0; i < numDevs; i++) {
+ /* skip inactive devices */
+ if (!devList[i]->active)
+ continue;
+
for (j = 0; j < xf86_num_platform_devices; j++) {
if (devList[i]->busID && *devList[i]->busID) {
if (xf86PlatformDeviceCheckBusID(&xf86_platform_devices[j], devList[i]->busID))
@@ -451,10 +455,14 @@ xf86platformProbeDev(DriverPtr drvp)
continue;
}
- /* if autoaddgpu devices is enabled then go find a few more and add them as GPU screens */
- if (xf86Info.autoAddGPU && numDevs) {
+ /* if autoaddgpu devices is enabled then go find any unclaimed platform
+ * devices and add them as GPU screens */
+ if (xf86Info.autoAddGPU) {
for (j = 0; j < xf86_num_platform_devices; j++) {
- probeSingleDevice(&xf86_platform_devices[j], drvp, devList[0], PLATFORM_PROBE_GPU_SCREEN);
+ if (probeSingleDevice(&xf86_platform_devices[j], drvp,
+ devList ? devList[0] : NULL,
+ PLATFORM_PROBE_GPU_SCREEN))
+ foundScreen = TRUE;
}
}
--
2.2.1
More information about the xorg-devel
mailing list