mirror of
https://github.com/X11Libre/xserver.git
synced 2026-11-12 04:55:49 +00:00
xfree86/common: omit unnecessary search for matching devices
It is patch 3/3 of a series that makes adding GPU screens more controllable. If AutoAddGPU is "off", matching devices for autoconfigured drivers are sought for anyway, and then the unused list is freed. This patch cancels an unnecessary search. Signed-off-by: Oleh Nykyforchyn <oleh.nyk@gmail.com>
This commit is contained in:
parent
1dea31ce5c
commit
3a367c5a47
1 changed files with 6 additions and 8 deletions
|
|
@ -640,20 +640,18 @@ xf86platformAddGPUDevices(DriverPtr drvp)
|
|||
GDevPtr *devList;
|
||||
int j;
|
||||
|
||||
if (!drvp->platformProbe)
|
||||
if (!drvp->platformProbe || !xf86Info.autoAddGPU)
|
||||
return FALSE;
|
||||
|
||||
xf86MatchDevice(drvp->driverName, &devList);
|
||||
|
||||
/* 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++) {
|
||||
if (probeSingleDevice(&xf86_platform_devices[j], drvp,
|
||||
devList ? devList[0] : NULL,
|
||||
PLATFORM_PROBE_GPU_SCREEN))
|
||||
foundScreen = TRUE;
|
||||
}
|
||||
for (j = 0; j < xf86_num_platform_devices; j++) {
|
||||
if (probeSingleDevice(&xf86_platform_devices[j], drvp,
|
||||
devList ? devList[0] : NULL,
|
||||
PLATFORM_PROBE_GPU_SCREEN))
|
||||
foundScreen = TRUE;
|
||||
}
|
||||
|
||||
free(devList);
|
||||
|
|
|
|||
Loading…
Reference in a new issue