diff options
Diffstat (limited to 'xorg-server')
-rw-r--r-- | xorg-server/config/udev.c | 8 | ||||
-rw-r--r-- | xorg-server/dix/dispatch.c | 4 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/common/xf86Events.c | 11 | ||||
-rw-r--r-- | xorg-server/hw/xfree86/modes/xf86Crtc.c | 2 | ||||
-rw-r--r-- | xorg-server/include/hotplug.h | 2 |
5 files changed, 23 insertions, 4 deletions
diff --git a/xorg-server/config/udev.c b/xorg-server/config/udev.c index 03aca2854..c2d00bbda 100644 --- a/xorg-server/config/udev.c +++ b/xorg-server/config/udev.c @@ -339,7 +339,7 @@ config_udev_pre_init(void) #endif #ifdef HAVE_UDEV_MONITOR_FILTER_ADD_MATCH_TAG - if (SeatId && strcmp(SeatId, "seat0")) + if (ServerIsNotSeat0()) udev_monitor_filter_add_match_tag(udev_monitor, SeatId); #endif if (udev_monitor_enable_receiving(udev_monitor)) { @@ -368,7 +368,7 @@ config_udev_init(void) #endif #ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG - if (SeatId && strcmp(SeatId, "seat0")) + if (ServerIsNotSeat0()) udev_enumerate_add_match_tag(enumerate, SeatId); #endif @@ -454,6 +454,10 @@ config_udev_odev_probe(config_odev_probe_proc_ptr probe_callback) udev_enumerate_add_match_subsystem(enumerate, "drm"); udev_enumerate_add_match_sysname(enumerate, "card[0-9]*"); +#ifdef HAVE_UDEV_ENUMERATE_ADD_MATCH_TAG + if (ServerIsNotSeat0()) + udev_enumerate_add_match_tag(enumerate, SeatId); +#endif udev_enumerate_scan_devices(enumerate); devices = udev_enumerate_get_list_entry(enumerate); udev_list_entry_foreach(device, devices) { diff --git a/xorg-server/dix/dispatch.c b/xorg-server/dix/dispatch.c index 9b9aa3552..1221f044d 100644 --- a/xorg-server/dix/dispatch.c +++ b/xorg-server/dix/dispatch.c @@ -3946,6 +3946,10 @@ RemoveGPUScreen(ScreenPtr pScreen) }
screenInfo.numGPUScreens--;
+ /* this gets freed later in the resource list, but without
+ * the screen existing it causes crashes - so remove it here */
+ if (pScreen->defColormap)
+ FreeResource(pScreen->defColormap, RT_COLORMAP);
free(pScreen);
}
diff --git a/xorg-server/hw/xfree86/common/xf86Events.c b/xorg-server/hw/xfree86/common/xf86Events.c index 47429ecfe..3ad34b543 100644 --- a/xorg-server/hw/xfree86/common/xf86Events.c +++ b/xorg-server/hw/xfree86/common/xf86Events.c @@ -460,6 +460,8 @@ xf86VTSwitch(void) OsBlockSIGIO(); for (i = 0; i < xf86NumScreens; i++) xf86Screens[i]->LeaveVT(xf86Screens[i]); + for (i = 0; i < xf86NumGPUScreens; i++) + xf86GPUScreens[i]->LeaveVT(xf86GPUScreens[i]); xf86AccessLeave(); /* We need this here, otherwise */ @@ -474,6 +476,10 @@ xf86VTSwitch(void) if (!xf86Screens[i]->EnterVT(xf86Screens[i])) FatalError("EnterVT failed for screen %d\n", i); } + for (i = 0; i < xf86NumGPUScreens; i++) { + if (!xf86GPUScreens[i]->EnterVT(xf86GPUScreens[i])) + FatalError("EnterVT failed for gpu screen %d\n", i); + } if (!(dispatchException & DE_TERMINATE)) { for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) @@ -530,6 +536,11 @@ xf86VTSwitch(void) if (!xf86Screens[i]->EnterVT(xf86Screens[i])) FatalError("EnterVT failed for screen %d\n", i); } + for (i = 0; i < xf86NumGPUScreens; i++) { + xf86GPUScreens[i]->vtSema = TRUE; + if (!xf86GPUScreens[i]->EnterVT(xf86GPUScreens[i])) + FatalError("EnterVT failed for gpu screen %d\n", i); + } for (i = 0; i < xf86NumScreens; i++) { if (xf86Screens[i]->EnableDisableFBAccess) (*xf86Screens[i]->EnableDisableFBAccess) (xf86Screens[i], TRUE); diff --git a/xorg-server/hw/xfree86/modes/xf86Crtc.c b/xorg-server/hw/xfree86/modes/xf86Crtc.c index 1947c5be9..e3eaf5f4c 100644 --- a/xorg-server/hw/xfree86/modes/xf86Crtc.c +++ b/xorg-server/hw/xfree86/modes/xf86Crtc.c @@ -728,8 +728,6 @@ xf86CrtcCloseScreen(ScreenPtr screen) xf86RandR12CloseScreen(screen); - free(config->name); - screen->CloseScreen(screen); for (o = 0; o < config->num_output; o++) { diff --git a/xorg-server/include/hotplug.h b/xorg-server/include/hotplug.h index 96b078d48..2a95b4524 100644 --- a/xorg-server/include/hotplug.h +++ b/xorg-server/include/hotplug.h @@ -69,4 +69,6 @@ void config_odev_probe(config_odev_probe_proc_ptr probe_callback); void NewGPUDeviceRequest(struct OdevAttributes *attribs); void DeleteGPUDeviceRequest(struct OdevAttributes *attribs); #endif + +#define ServerIsNotSeat0() (SeatId && strcmp(SeatId, "seat0")) #endif /* HOTPLUG_H */ |