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>
(cherry picked from commit e36236eade
)
This commit is contained in:
parent
905126c66c
commit
2ce54b8139
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue