diff options
author | Aaron Plattner <aplattner@nvidia.com> | 2014-12-30 09:13:16 -0800 |
---|---|---|
committer | Aaron Plattner <aplattner@nvidia.com> | 2015-03-31 14:36:11 -0700 |
commit | e36236eade412dd3894f75f78a7b3d7c1037e6c3 (patch) | |
tree | 91549a69066d45e19ec98193dd95209e8822ab3b | |
parent | 4ecda362594d771f401de467c2d58c0f552227a8 (diff) |
xfree86: Add GPU screens even if there are no active GDevs
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@nvidia.com>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@ubuntu.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | hw/xfree86/common/xf86platformBus.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c index 387b5f1ad..c1aaba41a 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; } } |