aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Events.c7
-rw-r--r--xorg-server/hw/xfree86/common/xf86platformBus.c20
2 files changed, 19 insertions, 8 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c
index c06aaaee1..97a1f97b2 100644
--- a/xorg-server/hw/xfree86/common/xf86Events.c
+++ b/xorg-server/hw/xfree86/common/xf86Events.c
@@ -583,10 +583,11 @@ xf86VTEnter(void)
/* Turn screen saver off when switching back */
dixSaveScreens(serverClient, SCREEN_SAVER_FORCER, ScreenSaverReset);
- /* If we use systemd-logind it will enable input devices for us */
- if (!systemd_logind_controls_session())
- for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next)
+ for (pInfo = xf86InputDevs; pInfo; pInfo = pInfo->next) {
+ /* Devices with server managed fds get enabled on logind resume */
+ if (!(pInfo->flags & XI86_SERVER_FD))
xf86EnableInputDeviceForVTSwitch(pInfo);
+ }
for (ih = InputHandlers; ih; ih = ih->next) {
if (ih->is_input)
diff --git a/xorg-server/hw/xfree86/common/xf86platformBus.c b/xorg-server/hw/xfree86/common/xf86platformBus.c
index 15988b8b1..c1aaba41a 100644
--- a/xorg-server/hw/xfree86/common/xf86platformBus.c
+++ b/xorg-server/hw/xfree86/common/xf86platformBus.c
@@ -153,8 +153,10 @@ xf86_check_platform_slot(const struct xf86_platform_device *pd)
for (i = 0; i < xf86NumEntities; i++) {
const EntityPtr u = xf86Entities[i];
- if (pd->pdev && u->bus.type == BUS_PCI)
- return !MATCH_PCI_DEVICES(pd->pdev, u->bus.id.pci);
+ if (pd->pdev && u->bus.type == BUS_PCI &&
+ MATCH_PCI_DEVICES(pd->pdev, u->bus.id.pci)) {
+ return FALSE;
+ }
if ((u->bus.type == BUS_PLATFORM) && (pd == u->bus.id.plat)) {
return FALSE;
}
@@ -426,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))
@@ -449,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;
}
}