From c814894df7858fc34eba7a6a152a4aa317982580 Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Tue, 19 Jul 2016 13:53:19 -0400 Subject: [PATCH] xserver 1.18.4 --- ...-emulated-motion-events-for-non-emul.patch | 34 ----- ...nt-Improve-scaling-of-vblank-handler.patch | 89 ------------ ...nly-allow-slave-gpu-to-be-offload-so.patch | 30 ---- ...ear-resource-for-pixmap-on-unrealize.patch | 54 -------- ...to-the-xkb-indicator-update-after-a-.patch | 45 ------ ...ng-the-keymap-force-an-indicator-upd.patch | 90 ------------ ...driverPrivate-to-NULL-after-closing-.patch | 36 ----- ...x-presentation-of-flips-out-of-order.patch | 55 -------- ...et-the-root-window-property-on-slave.patch | 33 ----- ...capabilities-up-after-glamor-and-ena.patch | 65 --------- ...erly-cleanup-fb-for-reverse-prime-of.patch | 54 -------- ...lear-drmmode-fb_id-before-unflipping.patch | 46 ------- ...swapping-of-provider-sink-source-cap.patch | 39 ------ ...setting-Load-on-GPU-s-with-0-outputs.patch | 129 ------------------ exa-only-draw-valid-trapezoids.patch | 48 ------- sources | 2 +- xorg-x11-server.spec | 36 +---- xserver-1.4.99-ssh-isnt-local.patch | 48 ------- 18 files changed, 6 insertions(+), 927 deletions(-) delete mode 100644 0001-Xi-don-t-deliver-emulated-motion-events-for-non-emul.patch delete mode 100644 0001-present-Improve-scaling-of-vblank-handler.patch delete mode 100644 0001-randr-provider-only-allow-slave-gpu-to-be-offload-so.patch delete mode 100644 0001-wayland-clear-resource-for-pixmap-on-unrealize.patch delete mode 100644 0001-xkb-add-a-cause-to-the-xkb-indicator-update-after-a-.patch delete mode 100644 0001-xkb-after-changing-the-keymap-force-an-indicator-upd.patch delete mode 100644 0002-modesetting-set-driverPrivate-to-NULL-after-closing-.patch delete mode 100644 0002-present-Fix-presentation-of-flips-out-of-order.patch delete mode 100644 0003-xf86Crtc-don-t-set-the-root-window-property-on-slave.patch delete mode 100644 0004-modesetting-set-capabilities-up-after-glamor-and-ena.patch delete mode 100644 0005-modesetting-Properly-cleanup-fb-for-reverse-prime-of.patch delete mode 100644 0006-modesetting-Clear-drmmode-fb_id-before-unflipping.patch delete mode 100644 0007-modesetting-Fix-swapping-of-provider-sink-source-cap.patch delete mode 100644 0008-modesetting-Load-on-GPU-s-with-0-outputs.patch delete mode 100644 exa-only-draw-valid-trapezoids.patch delete mode 100644 xserver-1.4.99-ssh-isnt-local.patch diff --git a/0001-Xi-don-t-deliver-emulated-motion-events-for-non-emul.patch b/0001-Xi-don-t-deliver-emulated-motion-events-for-non-emul.patch deleted file mode 100644 index 840b1b2..0000000 --- a/0001-Xi-don-t-deliver-emulated-motion-events-for-non-emul.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 1f90ba995c8f22d4e69b347f2e3a49c2949024d8 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Wed, 9 Mar 2016 10:45:48 +1000 -Subject: [PATCH xserver] Xi: don't deliver emulated motion events for - non-emulating touches - -The touchpoint knows whether it should be emulating or not and we have a check -for that later. Check for this before we generate the event and try to deliver -it, lest we trigger a bug warning. - -https://bugzilla.redhat.com/show_bug.cgi?id=1282252 - -Signed-off-by: Peter Hutterer ---- - Xi/exevents.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/Xi/exevents.c b/Xi/exevents.c -index 74e49ed..5a0b68d 100644 ---- a/Xi/exevents.c -+++ b/Xi/exevents.c -@@ -1379,6 +1379,9 @@ DeliverTouchEmulatedEvent(DeviceIntPtr dev, TouchPointInfoPtr ti, - if (!TouchResourceIsOwner(ti, listener->listener)) - return !Success; - -+ if (!ti->emulate_pointer) -+ return !Success; -+ - nevents = TouchConvertToPointerEvent(ev, &motion, &button); - BUG_RETURN_VAL(nevents == 0, BadValue); - --- -2.5.0 - diff --git a/0001-present-Improve-scaling-of-vblank-handler.patch b/0001-present-Improve-scaling-of-vblank-handler.patch deleted file mode 100644 index a4679c0..0000000 --- a/0001-present-Improve-scaling-of-vblank-handler.patch +++ /dev/null @@ -1,89 +0,0 @@ -From e10c70e81c8371438093ea594eea20d31747bf71 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sat, 14 Feb 2015 09:58:43 +0000 -Subject: [PATCH xserver 1/2] present: Improve scaling of vblank handler - -With large numbers of queued vblank, the list iteration on every -interupt dominates processing time. If we reorder the list to be in -ascending event order, then not only is also likely to be in order for -notification queries (i.e. the notification will be near the start of -the list), we can also stop iterating when past the target event_id. - -Signed-off-by: Chris Wilson ---- - present/present.c | 24 +++++++++++++++--------- - 1 file changed, 15 insertions(+), 9 deletions(-) - -diff --git a/present/present.c b/present/present.c -index 55f6aa7..97ad783 100644 ---- a/present/present.c -+++ b/present/present.c -@@ -517,19 +517,22 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) - void - present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc) - { -- present_vblank_ptr vblank, tmp; -+ present_vblank_ptr vblank; - int s; - - if (!event_id) - return; - DebugPresent(("\te %lld ust %lld msc %lld\n", event_id, ust, msc)); -- xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { -- if (vblank->event_id == event_id) { -+ xorg_list_for_each_entry(vblank, &present_exec_queue, event_queue) { -+ int64_t match = event_id - vblank->event_id; -+ if (match == 0) { - present_execute(vblank, ust, msc); - return; - } -+ if (match < 0) -+ break; - } -- xorg_list_for_each_entry_safe(vblank, tmp, &present_flip_queue, event_queue) { -+ xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { - if (vblank->event_id == event_id) { - present_flip_notify(vblank, ust, msc); - return; -@@ -943,7 +946,7 @@ present_pixmap(WindowPtr window, - vblank->pixmap->drawable.id, vblank->window->drawable.id, - target_crtc, vblank->flip, vblank->sync_flip, vblank->serial)); - -- xorg_list_add(&vblank->event_queue, &present_exec_queue); -+ xorg_list_append(&vblank->event_queue, &present_exec_queue); - vblank->queued = TRUE; - if (msc_is_after(target_msc, crtc_msc)) { - ret = present_queue_vblank(screen, target_crtc, vblank->event_id, target_msc); -@@ -967,7 +970,7 @@ no_mem: - void - present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64_t msc) - { -- present_vblank_ptr vblank, tmp; -+ present_vblank_ptr vblank; - - if (crtc == NULL) - present_fake_abort_vblank(screen, event_id, msc); -@@ -978,14 +981,17 @@ present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64 - (*screen_priv->info->abort_vblank) (crtc, event_id, msc); - } - -- xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { -- if (vblank->event_id == event_id) { -+ xorg_list_for_each_entry(vblank, &present_exec_queue, event_queue) { -+ int64_t match = event_id - vblank->event_id; -+ if (match == 0) { - xorg_list_del(&vblank->event_queue); - vblank->queued = FALSE; - return; - } -+ if (match < 0) -+ break; - } -- xorg_list_for_each_entry_safe(vblank, tmp, &present_flip_queue, event_queue) { -+ xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { - if (vblank->event_id == event_id) { - xorg_list_del(&vblank->event_queue); - return; --- -2.5.0 - diff --git a/0001-randr-provider-only-allow-slave-gpu-to-be-offload-so.patch b/0001-randr-provider-only-allow-slave-gpu-to-be-offload-so.patch deleted file mode 100644 index bc5d8eb..0000000 --- a/0001-randr-provider-only-allow-slave-gpu-to-be-offload-so.patch +++ /dev/null @@ -1,30 +0,0 @@ -From fc1f61b75c9712e24ff665f95d62771f39eba1c7 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 29 Apr 2016 14:01:30 +1000 -Subject: [PATCH 1/4] randr/provider: only allow slave gpu to be offload - sources. - -The other way around makes no sense. - -Reviewed-by: Alex Deucher -Signed-off-by: Dave Airlie ---- - randr/rrprovider.c | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/randr/rrprovider.c b/randr/rrprovider.c -index bbb8e51..5329f41 100644 ---- a/randr/rrprovider.c -+++ b/randr/rrprovider.c -@@ -325,6 +325,8 @@ ProcRRSetProviderOffloadSink(ClientPtr client) - VERIFY_RR_PROVIDER(stuff->provider, provider, DixReadAccess); - if (!(provider->capabilities & RR_Capability_SourceOffload)) - return BadValue; -+ if (!provider->pScreen->isGPU) -+ return BadValue; - - if (stuff->sink_provider) { - VERIFY_RR_PROVIDER(stuff->sink_provider, sink_provider, DixReadAccess); --- -2.5.5 - diff --git a/0001-wayland-clear-resource-for-pixmap-on-unrealize.patch b/0001-wayland-clear-resource-for-pixmap-on-unrealize.patch deleted file mode 100644 index 266dcdc..0000000 --- a/0001-wayland-clear-resource-for-pixmap-on-unrealize.patch +++ /dev/null @@ -1,54 +0,0 @@ -From edd24aa50b17849b904a3ac5429e333bac9bac9c Mon Sep 17 00:00:00 2001 -From: Olivier Fourdan -Date: Mon, 6 Jun 2016 09:22:28 +0200 -Subject: [PATCH xserver] wayland: clear resource for pixmap on unrealize - -On cursor unrealize, the associated pixmap is destroyed, make sure we -clear the pointer from the private resource and check for the value -being non-null when setting or destroying the cursor. - -Signed-off-by: Olivier Fourdan -Reviewed-by: Adam Jackson -Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96246 ---- - hw/xwayland/xwayland-cursor.c | 15 +++++++++++++++ - 1 file changed, 15 insertions(+) - -diff --git a/hw/xwayland/xwayland-cursor.c b/hw/xwayland/xwayland-cursor.c -index 76729db..74dfe4e 100644 ---- a/hw/xwayland/xwayland-cursor.c -+++ b/hw/xwayland/xwayland-cursor.c -@@ -76,8 +76,20 @@ static Bool - xwl_unrealize_cursor(DeviceIntPtr device, ScreenPtr screen, CursorPtr cursor) - { - PixmapPtr pixmap; -+ struct xwl_seat *xwl_seat; - - pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key); -+ if (!pixmap) -+ return TRUE; -+ -+ dixSetPrivate(&cursor->devPrivates, &xwl_cursor_private_key, NULL); -+ -+ /* When called from FreeCursor(), device is always NULL */ -+ if (device) { -+ xwl_seat = device->public.devicePrivate; -+ if (xwl_seat && cursor == xwl_seat->x_cursor) -+ xwl_seat->x_cursor = NULL; -+ } - - return xwl_shm_destroy_pixmap(pixmap); - } -@@ -122,6 +134,9 @@ xwl_seat_set_cursor(struct xwl_seat *xwl_seat) - - cursor = xwl_seat->x_cursor; - pixmap = dixGetPrivate(&cursor->devPrivates, &xwl_cursor_private_key); -+ if (!pixmap) -+ return; -+ - stride = cursor->bits->width * 4; - if (cursor->bits->argb) - memcpy(pixmap->devPrivate.ptr, --- -2.7.4 - diff --git a/0001-xkb-add-a-cause-to-the-xkb-indicator-update-after-a-.patch b/0001-xkb-add-a-cause-to-the-xkb-indicator-update-after-a-.patch deleted file mode 100644 index 388af66..0000000 --- a/0001-xkb-add-a-cause-to-the-xkb-indicator-update-after-a-.patch +++ /dev/null @@ -1,45 +0,0 @@ -From ed4f5ebde487bda2b8bda4cb4a1455f41a7c2933 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Tue, 28 Jun 2016 11:42:41 +1000 -Subject: [PATCH xserver] xkb: add a cause to the xkb indicator update after a - keymap change - -Regression introduce by ac164e58870d which calls -XkbUpdateAllDeviceIndicators() with two NULL arguments. A few layers down into -the stack and we triggered a NULL-pointer dereference. In theory a NULL cause -is acceptable since we don't actually change modifier state here. Instead of -updating all places to check for NULL just set the cause to the client -request and go to the pub. - -https://bugs.freedesktop.org/show_bug.cgi?id=96384 - -Signed-off-by: Peter Hutterer ---- - xkb/xkb.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/xkb/xkb.c b/xkb/xkb.c -index 3a6ad65..678f823 100644 ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -5706,6 +5706,7 @@ ProcXkbGetKbdByName(ClientPtr client) - xkbGetGeometryReply grep = { 0 }; - XkbComponentNamesRec names = { 0 }; - XkbDescPtr xkb, new; -+ XkbEventCauseRec cause; - unsigned char *str; - char mapFile[PATH_MAX]; - unsigned len; -@@ -6016,7 +6017,8 @@ ProcXkbGetKbdByName(ClientPtr client) - new = NULL; - } - XkbFreeComponentNames(&names, FALSE); -- XkbUpdateAllDeviceIndicators(NULL, NULL); -+ XkbSetCauseXkbReq(&cause, X_kbGetKbdByName, client); -+ XkbUpdateAllDeviceIndicators(NULL, &cause); - - return Success; - } --- -2.7.4 - diff --git a/0001-xkb-after-changing-the-keymap-force-an-indicator-upd.patch b/0001-xkb-after-changing-the-keymap-force-an-indicator-upd.patch deleted file mode 100644 index 061aee5..0000000 --- a/0001-xkb-after-changing-the-keymap-force-an-indicator-upd.patch +++ /dev/null @@ -1,90 +0,0 @@ -From 0d2fea8a8ce5e1d2693c25dbeff00461c72427a2 Mon Sep 17 00:00:00 2001 -From: Peter Hutterer -Date: Fri, 29 Apr 2016 15:56:03 +1000 -Subject: [PATCH xserver] xkb: after changing the keymap, force an indicator - update - -When NumLock is on and a new keymap is applied, the next modifier state change -will turn off that LED (but leave the state enabled). The cause for this is a -bit convoluted: -* the SLI explicitState is copied from the current state in - ProcXkbGetKbdByName. Thus, if NumLock is on, that state is 0x2. -* on the next modifier key press (e.g. Shift), XkbApplyState() calls into - XkbUpdateIndicators() -> XkbUpdateLedAutoState() to update SLIs (if any) for - the currently changed modifier. But it does so with a mask only for the - changed modifier (i.e. for Shift). -* XkbUpdateLedAutoState() calculates the state based on this mask and - ends up with 0 because we don't have a Shift LED and we masked out the - others. -* XkbUpdateLedAutoState() compares that state with the previous state (which - is still 0x2) and then proceeds to turn the LED off - -This doesn't happen in the normal case because either the mask encompasses all -modifiers or the state matches of the masked-out modifiers matches the old -state. - -Avoid this issue by forcing an SLI update after changing the keymap. This -updates the sli->effectiveState and thus restores everything to happy working -order. - -https://bugzilla.redhat.com/show_bug.cgi?id=1047151 - -Signed-off-by: Peter Hutterer ---- - include/xkbsrv.h | 4 ++++ - xkb/xkb.c | 3 ++- - xkb/xkbLEDs.c | 2 +- - 3 files changed, 7 insertions(+), 2 deletions(-) - -diff --git a/include/xkbsrv.h b/include/xkbsrv.h -index cc6307a..7e71089 100644 ---- a/include/xkbsrv.h -+++ b/include/xkbsrv.h -@@ -496,6 +496,10 @@ extern _X_EXPORT void XkbUpdateIndicators(DeviceIntPtr /* keybd */ , - XkbEventCausePtr /* cause */ - ); - -+extern _X_EXPORT void XkbUpdateAllDeviceIndicators(XkbChangesPtr /* changes */, -+ XkbEventCausePtr /* cause */ -+ ); -+ - extern _X_EXPORT XkbSrvLedInfoPtr XkbAllocSrvLedInfo(DeviceIntPtr /* dev */ , - KbdFeedbackPtr /* kf */ , - LedFeedbackPtr /* lf */ , -diff --git a/xkb/xkb.c b/xkb/xkb.c -index 294cdf8..3a6ad65 100644 ---- a/xkb/xkb.c -+++ b/xkb/xkb.c -@@ -5692,7 +5692,6 @@ ProcXkbListComponents(ClientPtr client) - } - - /***====================================================================***/ -- - int - ProcXkbGetKbdByName(ClientPtr client) - { -@@ -6017,6 +6016,8 @@ ProcXkbGetKbdByName(ClientPtr client) - new = NULL; - } - XkbFreeComponentNames(&names, FALSE); -+ XkbUpdateAllDeviceIndicators(NULL, NULL); -+ - return Success; - } - -diff --git a/xkb/xkbLEDs.c b/xkb/xkbLEDs.c -index 4e16002..5792d9f 100644 ---- a/xkb/xkbLEDs.c -+++ b/xkb/xkbLEDs.c -@@ -304,7 +304,7 @@ XkbUpdateLedAutoState(DeviceIntPtr dev, - return; - } - --static void -+void - XkbUpdateAllDeviceIndicators(XkbChangesPtr changes, XkbEventCausePtr cause) - { - DeviceIntPtr edev; --- -2.7.4 - diff --git a/0002-modesetting-set-driverPrivate-to-NULL-after-closing-.patch b/0002-modesetting-set-driverPrivate-to-NULL-after-closing-.patch deleted file mode 100644 index 1201209..0000000 --- a/0002-modesetting-set-driverPrivate-to-NULL-after-closing-.patch +++ /dev/null @@ -1,36 +0,0 @@ -From a41a171bcbae9aeafac2865faa904f15d9b59925 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 29 Apr 2016 14:01:31 +1000 -Subject: [PATCH 2/4] modesetting: set driverPrivate to NULL after closing fd. - -Otherwise ms_ent_priv will return NULL and things will fall apart. - -Reviewed-by: Alex Deucher -Signed-off-by: Dave Airlie ---- - hw/xfree86/drivers/modesetting/driver.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c -index c97f33a..abf7e1a 100644 ---- a/hw/xfree86/drivers/modesetting/driver.c -+++ b/hw/xfree86/drivers/modesetting/driver.c -@@ -635,7 +635,6 @@ FreeRec(ScrnInfoPtr pScrn) - ms = modesettingPTR(pScrn); - if (!ms) - return; -- pScrn->driverPrivate = NULL; - - if (ms->fd > 0) { - modesettingEntPtr ms_ent; -@@ -656,6 +655,7 @@ FreeRec(ScrnInfoPtr pScrn) - ms_ent->fd = 0; - } - } -+ pScrn->driverPrivate = NULL; - free(ms->drmmode.Options); - free(ms); - --- -2.5.5 - diff --git a/0002-present-Fix-presentation-of-flips-out-of-order.patch b/0002-present-Fix-presentation-of-flips-out-of-order.patch deleted file mode 100644 index a99f5ad..0000000 --- a/0002-present-Fix-presentation-of-flips-out-of-order.patch +++ /dev/null @@ -1,55 +0,0 @@ -From c2794c826378e89c5914112a59f2ad939a38a262 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sat, 14 Feb 2015 09:58:44 +0000 -Subject: [PATCH xserver 2/2] present: Fix presentation of flips out of order - -The flip queue currently only holds events submitted to the driver for -flipping, awaiting the completion notifier. It is short. We therefore -can speed up interrupt processing by keeping the small number of events -ready to be flipped on the end of the flip queue. By appending the -events to the flip_queue in the order that they become ready, we also -resolve one issue causing Present to display frames out of order. - -Signed-off-by: Chris Wilson ---- - present/present.c | 9 ++++++--- - 1 file changed, 6 insertions(+), 3 deletions(-) - -diff --git a/present/present.c b/present/present.c -index 97ad783..43eeecb 100644 ---- a/present/present.c -+++ b/present/present.c -@@ -353,10 +353,10 @@ present_re_execute(present_vblank_ptr vblank) - static void - present_flip_try_ready(ScreenPtr screen) - { -- present_vblank_ptr vblank, tmp; -+ present_vblank_ptr vblank; - -- xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { -- if (vblank->flip_ready) { -+ xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { -+ if (vblank->queued) { - present_re_execute(vblank); - return; - } -@@ -656,6 +656,8 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) - DebugPresent(("\tr %lld %p (pending %p unflip %lld)\n", - vblank->event_id, vblank, - screen_priv->flip_pending, screen_priv->unflip_event_id)); -+ xorg_list_del(&vblank->event_queue); -+ xorg_list_append(&vblank->event_queue, &present_flip_queue); - vblank->flip_ready = TRUE; - return; - } -@@ -994,6 +996,7 @@ present_abort_vblank(ScreenPtr screen, RRCrtcPtr crtc, uint64_t event_id, uint64 - xorg_list_for_each_entry(vblank, &present_flip_queue, event_queue) { - if (vblank->event_id == event_id) { - xorg_list_del(&vblank->event_queue); -+ vblank->queued = FALSE; - return; - } - } --- -2.5.0 - diff --git a/0003-xf86Crtc-don-t-set-the-root-window-property-on-slave.patch b/0003-xf86Crtc-don-t-set-the-root-window-property-on-slave.patch deleted file mode 100644 index c7ca4f0..0000000 --- a/0003-xf86Crtc-don-t-set-the-root-window-property-on-slave.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 258588224d6b35de12f97d9092efa5cb3e426550 Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 29 Apr 2016 14:01:32 +1000 -Subject: [PATCH 3/4] xf86Crtc: don't set the root window property on slave - GPUs. - -Slave GPUs don't have a root window to set this on, so don't. - -This fixes some crashes I saw just playing around. - -Reviewed-by: Alex Deucher -Signed-off-by: Dave Airlie ---- - hw/xfree86/modes/xf86Crtc.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/hw/xfree86/modes/xf86Crtc.c b/hw/xfree86/modes/xf86Crtc.c -index 6091b5e..4a13c13 100644 ---- a/hw/xfree86/modes/xf86Crtc.c -+++ b/hw/xfree86/modes/xf86Crtc.c -@@ -3285,7 +3285,8 @@ xf86OutputSetEDID(xf86OutputPtr output, xf86MonPtr edid_mon) - } - - /* Set the DDC properties for the 'compat' output */ -- if (output == xf86CompatOutput(scrn)) -+ /* GPU screens don't have a root window */ -+ if (output == xf86CompatOutput(scrn) && !scrn->is_gpu) - xf86SetDDCproperties(scrn, edid_mon); - - #ifdef RANDR_12_INTERFACE --- -2.5.5 - diff --git a/0004-modesetting-set-capabilities-up-after-glamor-and-ena.patch b/0004-modesetting-set-capabilities-up-after-glamor-and-ena.patch deleted file mode 100644 index 9180a3c..0000000 --- a/0004-modesetting-set-capabilities-up-after-glamor-and-ena.patch +++ /dev/null @@ -1,65 +0,0 @@ -From 2378adde6770385c06f7efcd32f270d00d49ce3f Mon Sep 17 00:00:00 2001 -From: Dave Airlie -Date: Fri, 29 Apr 2016 14:01:33 +1000 -Subject: [PATCH 4/4] modesetting: set capabilities up after glamor and enable - offload caps. - -This moves the capabilites setting to after glamor is initialised, and -enables the offload caps in cases where they work. This enables DRI2 -PRIME support with modesetting. - -Reviewed-by: Alex Deucher -Signed-off-by: Dave Airlie ---- - hw/xfree86/drivers/modesetting/driver.c | 28 ++++++++++++++++------------ - 1 file changed, 16 insertions(+), 12 deletions(-) - -diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c -index abf7e1a..cd59c06 100644 ---- a/hw/xfree86/drivers/modesetting/driver.c -+++ b/hw/xfree86/drivers/modesetting/driver.c -@@ -820,18 +820,6 @@ PreInit(ScrnInfoPtr pScrn, int flags) - return FALSE; - ms->drmmode.fd = ms->fd; - -- pScrn->capabilities = 0; --#ifdef DRM_CAP_PRIME -- ret = drmGetCap(ms->fd, DRM_CAP_PRIME, &value); -- if (ret == 0) { -- if (value & DRM_PRIME_CAP_IMPORT) -- pScrn->capabilities |= RR_Capability_SinkOutput; --#if GLAMOR_HAS_GBM_LINEAR -- if (value & DRM_PRIME_CAP_EXPORT) -- pScrn->capabilities |= RR_Capability_SourceOutput; --#endif -- } --#endif - drmmode_get_default_bpp(pScrn, &ms->drmmode, &defaultdepth, &defaultbpp); - if (defaultdepth == 24 && defaultbpp == 24) - bppflags = SupportConvert32to24 | Support24bppFb; -@@ -907,6 +895,22 @@ PreInit(ScrnInfoPtr pScrn, int flags) - ms->drmmode.pageflip = FALSE; - } - -+ pScrn->capabilities = 0; -+#ifdef DRM_CAP_PRIME -+ ret = drmGetCap(ms->fd, DRM_CAP_PRIME, &value); -+ if (ret == 0) { -+ if (value & DRM_PRIME_CAP_IMPORT) { -+ pScrn->capabilities |= RR_Capability_SinkOutput; -+ if (ms->drmmode.glamor) -+ pScrn->capabilities |= RR_Capability_SourceOffload; -+ } -+#if GLAMOR_HAS_GBM_LINEAR -+ if (value & DRM_PRIME_CAP_EXPORT && ms->drmmode.glamor) -+ pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload; -+#endif -+ } -+#endif -+ - if (drmmode_pre_init(pScrn, &ms->drmmode, pScrn->bitsPerPixel / 8) == FALSE) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "KMS setup failed\n"); - goto fail; --- -2.5.5 - diff --git a/0005-modesetting-Properly-cleanup-fb-for-reverse-prime-of.patch b/0005-modesetting-Properly-cleanup-fb-for-reverse-prime-of.patch deleted file mode 100644 index 2231675..0000000 --- a/0005-modesetting-Properly-cleanup-fb-for-reverse-prime-of.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 9b70aebc609c98719095229befd1a56532aaaa1c Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Wed, 1 Jun 2016 14:59:38 +0200 -Subject: [PATCH xserver 5/8] modesetting: Properly cleanup fb for - reverse-prime-offload - -drmmode_set_scanout_pixmap_gpu(pix) adds drmmod->fb_id through a call -to drmmode_xf86crtc_resize(), but on a subsequent -drmmode_set_scanout_pixmap_gpu(NULL) it would not remove the fb. - -This keeps the crtc marked as busy, which causes the dgpu to not -being able to runtime suspend, after an output attached to the dgpu -has been used once. Which causes burning through an additional 10W -of power and the laptop to run quite hot. - -This commit adds the missing remove fb call, allowing the dgpu to runtime -suspend after an external monitor has been plugged into the laptop. - -Note this also makes drmmode_set_scanout_pixmap_gpu(NULL) match the -behavior of drmmode_set_scanout_pixmap_cpu(NULL) which was already -removing the fb. - -Signed-off-by: Hans de Goede -Reviewed-by: Dave Airlie ---- - hw/xfree86/drivers/modesetting/drmmode_display.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c -index bb5f56e..bc2ca3d 100644 ---- a/hw/xfree86/drivers/modesetting/drmmode_display.c -+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c -@@ -577,11 +577,17 @@ drmmode_set_scanout_pixmap_gpu(xf86CrtcPtr crtc, PixmapPtr ppix) - PixmapPtr screenpix = screen->GetScreenPixmap(screen); - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(crtc->scrn); - drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private; -+ drmmode_ptr drmmode = drmmode_crtc->drmmode; - int c, total_width = 0, max_height = 0, this_x = 0; - - if (!ppix) { -- if (crtc->randr_crtc->scanout_pixmap) -+ if (crtc->randr_crtc->scanout_pixmap) { - PixmapStopDirtyTracking(crtc->randr_crtc->scanout_pixmap, screenpix); -+ if (drmmode->fb_id) { -+ drmModeRmFB(drmmode->fd, drmmode->fb_id); -+ drmmode->fb_id = 0; -+ } -+ } - drmmode_crtc->prime_pixmap_x = 0; - return TRUE; - } --- -2.7.4 - diff --git a/0006-modesetting-Clear-drmmode-fb_id-before-unflipping.patch b/0006-modesetting-Clear-drmmode-fb_id-before-unflipping.patch deleted file mode 100644 index 4fbd942..0000000 --- a/0006-modesetting-Clear-drmmode-fb_id-before-unflipping.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 4565de368c4aecdd4f09fafd69ca59206744aabb Mon Sep 17 00:00:00 2001 -From: Lyude Paul -Date: Mon, 13 Jun 2016 15:31:02 -0400 -Subject: [PATCH xserver 6/8] modesetting: Clear drmmode->fb_id before - unflipping - -[fix copied from 40191d82370e in xf86-video-ati] - -Without this, we end up setting rotated CRTCs back to their previous -framebuffer right after we perform a rotation. Reproducer: - -- Have two monitors connected at the same resolution -- Rotate one monitor from normal straight to inverted -- Watch as the monitor you didn't rotate either freezes or shows intense - flickering - -Signed-off-by: Lyude -Reviewed-by: Hans de Goede -Signed-off-by: Hans de Goede ---- - hw/xfree86/drivers/modesetting/present.c | 9 +++++++++ - 1 file changed, 9 insertions(+) - -diff --git a/hw/xfree86/drivers/modesetting/present.c b/hw/xfree86/drivers/modesetting/present.c -index d65c8c8..9a596de 100644 ---- a/hw/xfree86/drivers/modesetting/present.c -+++ b/hw/xfree86/drivers/modesetting/present.c -@@ -626,6 +626,15 @@ ms_present_unflip(ScreenPtr screen, uint64_t event_id) - if (!crtc->enabled) - continue; - -+ /* info->drmmode.fb_id still points to the FB for the last flipped BO. -+ * Clear it, drmmode_set_mode_major will re-create it -+ */ -+ if (drmmode_crtc->drmmode->fb_id) { -+ drmModeRmFB(drmmode_crtc->drmmode->fd, -+ drmmode_crtc->drmmode->fb_id); -+ drmmode_crtc->drmmode->fb_id = 0; -+ } -+ - if (drmmode_crtc->dpms_mode == DPMSModeOn) - crtc->funcs->set_mode_major(crtc, &crtc->mode, crtc->rotation, - crtc->x, crtc->y); --- -2.7.4 - diff --git a/0007-modesetting-Fix-swapping-of-provider-sink-source-cap.patch b/0007-modesetting-Fix-swapping-of-provider-sink-source-cap.patch deleted file mode 100644 index 8cd2528..0000000 --- a/0007-modesetting-Fix-swapping-of-provider-sink-source-cap.patch +++ /dev/null @@ -1,39 +0,0 @@ -From be6e5f6c126602c499f8104e91c525cd938b4a97 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Thu, 16 Jun 2016 15:21:03 +0200 -Subject: [PATCH xserver 7/8] modesetting: Fix swapping of provider sink / - source capabilities - -When a card has import capability it can be an offload _sink_, not -a source and vice versa for export capability. - -This commit fixes the modesetting driver to properly set these -capabilities, this went unnoticed sofar because most gpus have both -import and export capability. - -Signed-off-by: Hans de Goede ---- - hw/xfree86/drivers/modesetting/driver.c | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c -index fb05e2e..e7f6e8d 100644 ---- a/hw/xfree86/drivers/modesetting/driver.c -+++ b/hw/xfree86/drivers/modesetting/driver.c -@@ -891,11 +891,11 @@ PreInit(ScrnInfoPtr pScrn, int flags) - if (value & DRM_PRIME_CAP_IMPORT) { - pScrn->capabilities |= RR_Capability_SinkOutput; - if (ms->drmmode.glamor) -- pScrn->capabilities |= RR_Capability_SourceOffload; -+ pScrn->capabilities |= RR_Capability_SinkOffload; - } - #if GLAMOR_HAS_GBM_LINEAR - if (value & DRM_PRIME_CAP_EXPORT && ms->drmmode.glamor) -- pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SinkOffload; -+ pScrn->capabilities |= RR_Capability_SourceOutput | RR_Capability_SourceOffload; - #endif - } - #endif --- -2.7.4 - diff --git a/0008-modesetting-Load-on-GPU-s-with-0-outputs.patch b/0008-modesetting-Load-on-GPU-s-with-0-outputs.patch deleted file mode 100644 index e917f16..0000000 --- a/0008-modesetting-Load-on-GPU-s-with-0-outputs.patch +++ /dev/null @@ -1,129 +0,0 @@ -From bf8084ac0e2e988ed985d6c151b1d7d74d6037d1 Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Tue, 14 Jun 2016 11:58:01 +0200 -Subject: [PATCH xserver 8/8] modesetting: Load on GPU-s with 0 outputs - -In newer laptops with switchable graphics, the GPU may have 0 outputs, -in this case the modesetting driver should still load if the GPU is -SourceOffload capable, so that it can be used as an offload source provider. - -Signed-off-by: Hans de Goede ---- - hw/xfree86/drivers/modesetting/driver.c | 29 ++++++++++++++++++------ - hw/xfree86/drivers/modesetting/drmmode_display.c | 6 ++--- - 2 files changed, 24 insertions(+), 11 deletions(-) - -diff --git a/hw/xfree86/drivers/modesetting/driver.c b/hw/xfree86/drivers/modesetting/driver.c -index e7f6e8d..b05ad81 100644 ---- a/hw/xfree86/drivers/modesetting/driver.c -+++ b/hw/xfree86/drivers/modesetting/driver.c -@@ -214,14 +214,26 @@ open_hw(const char *dev) - } - - static int --check_outputs(int fd) -+check_outputs(int fd, int *count) - { - drmModeResPtr res = drmModeGetResources(fd); - int ret; - - if (!res) - return FALSE; -+ -+ if (count) -+ *count = res->count_connectors; -+ - ret = res->count_connectors > 0; -+#if defined DRM_CAP_PRIME && GLAMOR_HAS_GBM_LINEAR -+ if (ret == FALSE) { -+ uint64_t value = 0; -+ if (drmGetCap(fd, DRM_CAP_PRIME, &value) == 0 && -+ (value & DRM_PRIME_CAP_EXPORT)) -+ ret = TRUE; -+ } -+#endif - drmModeFreeResources(res); - return ret; - } -@@ -236,13 +248,13 @@ probe_hw(const char *dev, struct xf86_platform_device *platform_dev) - fd = xf86_platform_device_odev_attributes(platform_dev)->fd; - if (fd == -1) - return FALSE; -- return check_outputs(fd); -+ return check_outputs(fd, NULL); - } - #endif - - fd = open_hw(dev); - if (fd != -1) { -- int ret = check_outputs(fd); -+ int ret = check_outputs(fd, NULL); - - close(fd); - return ret; -@@ -285,7 +297,7 @@ probe_hw_pci(const char *dev, struct pci_device *pdev) - devid = ms_DRICreatePCIBusID(pdev); - - if (id && devid && !strcmp(id, devid)) -- ret = check_outputs(fd); -+ ret = check_outputs(fd, NULL); - - close(fd); - free(id); -@@ -772,7 +784,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) - EntityInfoPtr pEnt; - uint64_t value = 0; - int ret; -- int bppflags; -+ int bppflags, connector_count; - int defaultdepth, defaultbpp; - - if (pScrn->numEntities != 1) -@@ -809,6 +821,9 @@ PreInit(ScrnInfoPtr pScrn, int flags) - return FALSE; - ms->drmmode.fd = ms->fd; - -+ if (!check_outputs(ms->fd, &connector_count)) -+ return FALSE; -+ - drmmode_get_default_bpp(pScrn, &ms->drmmode, &defaultdepth, &defaultbpp); - if (defaultdepth == 24 && defaultbpp == 24) - bppflags = SupportConvert32to24 | Support24bppFb; -@@ -888,7 +903,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) - #ifdef DRM_CAP_PRIME - ret = drmGetCap(ms->fd, DRM_CAP_PRIME, &value); - if (ret == 0) { -- if (value & DRM_PRIME_CAP_IMPORT) { -+ if (connector_count && (value & DRM_PRIME_CAP_IMPORT)) { - pScrn->capabilities |= RR_Capability_SinkOutput; - if (ms->drmmode.glamor) - pScrn->capabilities |= RR_Capability_SinkOffload; -@@ -916,7 +931,7 @@ PreInit(ScrnInfoPtr pScrn, int flags) - } - } - -- if (pScrn->modes == NULL) { -+ if (!(pScrn->is_gpu && connector_count == 0) && pScrn->modes == NULL) { - xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "No modes.\n"); - return FALSE; - } -diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c -index bc2ca3d..35a372c 100644 ---- a/hw/xfree86/drivers/modesetting/drmmode_display.c -+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c -@@ -1639,10 +1639,8 @@ static Bool - drmmode_xf86crtc_resize(ScrnInfoPtr scrn, int width, int height) - { - xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn); -- -- drmmode_crtc_private_ptr -- drmmode_crtc = xf86_config->crtc[0]->driver_private; -- drmmode_ptr drmmode = drmmode_crtc->drmmode; -+ modesettingPtr ms = modesettingPTR(scrn); -+ drmmode_ptr drmmode = &ms->drmmode; - drmmode_bo old_front; - Bool ret; - ScreenPtr screen = xf86ScrnToScreen(scrn); --- -2.7.4 - diff --git a/exa-only-draw-valid-trapezoids.patch b/exa-only-draw-valid-trapezoids.patch deleted file mode 100644 index 59cc5d6..0000000 --- a/exa-only-draw-valid-trapezoids.patch +++ /dev/null @@ -1,48 +0,0 @@ -From patchwork Wed Oct 2 13:47:54 2013 -Content-Type: text/plain; charset="utf-8" -MIME-Version: 1.0 -Content-Transfer-Encoding: 7bit -Subject: exa: only draw valid trapezoids -From: Maarten Lankhorst -X-Patchwork-Id: 14769 -Message-Id: <524C240A.9010607@canonical.com> -To: "X.Org Devel List" -Date: Wed, 02 Oct 2013 15:47:54 +0200 - -Fixes freedesktop.org bug https://bugs.freedesktop.org/show_bug.cgi?id=67484 - -If t->bottom is close to MIN_INT, removing top can wraparound, so do the check properly. -A similar fix should also be applied to pixman. - -Signed-off-by: Maarten Lankhorst - ---- - - -diff --git a/exa/exa_render.c b/exa/exa_render.c -index 172e2b5..807eeba 100644 ---- a/exa/exa_render.c -+++ b/exa/exa_render.c -@@ -1141,7 +1141,8 @@ exaTrapezoids(CARD8 op, PicturePtr pSrc, PicturePtr pDst, - - exaPrepareAccess(pPicture->pDrawable, EXA_PREPARE_DEST); - for (; ntrap; ntrap--, traps++) -- (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); -+ if (xTrapezoidValid(traps)) -+ (*ps->RasterizeTrapezoid) (pPicture, traps, -bounds.x1, -bounds.y1); - exaFinishAccess(pPicture->pDrawable, EXA_PREPARE_DEST); - - xRel = bounds.x1 + xSrc - xDst; -diff --git a/render/picture.h b/render/picture.h -index c85353a..fcd6401 100644 ---- a/render/picture.h -+++ b/render/picture.h -@@ -211,7 +211,7 @@ typedef pixman_fixed_t xFixed; - /* whether 't' is a well defined not obviously empty trapezoid */ - #define xTrapezoidValid(t) ((t)->left.p1.y != (t)->left.p2.y && \ - (t)->right.p1.y != (t)->right.p2.y && \ -- (int) ((t)->bottom - (t)->top) > 0) -+ ((t)->bottom > (t)->top)) - - /* - * Standard NTSC luminance conversions: diff --git a/sources b/sources index 802ec96..e415a3d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -043d720bf2472a65bb8f0daa97f83dfa xorg-server-1.18.3.tar.bz2 +d4842dfe3bd9a9d062f2fa1df9104a46 xorg-server-1.18.4.tar.bz2 diff --git a/xorg-x11-server.spec b/xorg-x11-server.spec index 857ae12..88c8520 100644 --- a/xorg-x11-server.spec +++ b/xorg-x11-server.spec @@ -44,8 +44,8 @@ Summary: X.Org X11 X server Name: xorg-x11-server -Version: 1.18.3 -Release: 8%{?gitdate:.%{gitdate}}%{dist} +Version: 1.18.4 +Release: 1%{?gitdate:.%{gitdate}}%{dist} URL: http://www.x.org License: MIT Group: User Interface/X @@ -77,19 +77,6 @@ Source31: xserver-sdk-abi-requires.git # maintainer convenience script Source40: driver-abi-rebuild.sh -# Trivial things to never merge upstream ever: -# This really could be done prettier. -Patch5002: xserver-1.4.99-ssh-isnt-local.patch - -Patch6000: 0001-randr-provider-only-allow-slave-gpu-to-be-offload-so.patch -Patch6001: 0002-modesetting-set-driverPrivate-to-NULL-after-closing-.patch -Patch6002: 0003-xf86Crtc-don-t-set-the-root-window-property-on-slave.patch -Patch6004: 0004-modesetting-set-capabilities-up-after-glamor-and-ena.patch -Patch6005: 0005-modesetting-Properly-cleanup-fb-for-reverse-prime-of.patch -Patch6006: 0006-modesetting-Clear-drmmode-fb_id-before-unflipping.patch -Patch6007: 0007-modesetting-Fix-swapping-of-provider-sink-source-cap.patch -Patch6008: 0008-modesetting-Load-on-GPU-s-with-0-outputs.patch - #Patch6044: xserver-1.6.99-hush-prerelease-warning.patch Patch7025: 0001-Always-install-vbe-and-int10-sdk-headers.patch @@ -97,25 +84,9 @@ Patch7025: 0001-Always-install-vbe-and-int10-sdk-headers.patch # do not upstream - do not even use here yet Patch7027: xserver-autobind-hotplug.patch -# submitted: http://lists.x.org/archives/xorg-devel/2013-October/037996.html -Patch9100: exa-only-draw-valid-trapezoids.patch - -# https://bugzilla.redhat.com/show_bug.cgi?id=1282252 -Patch9200: 0001-Xi-don-t-deliver-emulated-motion-events-for-non-emul.patch - # because the display-managers are not ready yet, do not upstream Patch10000: 0001-Fedora-hack-Make-the-suid-root-wrapper-always-start-.patch -Patch10002: 0001-present-Improve-scaling-of-vblank-handler.patch -Patch10003: 0002-present-Fix-presentation-of-flips-out-of-order.patch - -# Bug 1047151 - Numlock LED incorrect after keyboard map switch -Patch10004: 0001-xkb-after-changing-the-keymap-force-an-indicator-upd.patch -Patch10005: 0001-xkb-add-a-cause-to-the-xkb-indicator-update-after-a-.patch - -# Bug 1338979 - Xwayland: Segmentation fault in cursor update after unrealize -Patch10006: 0001-wayland-clear-resource-for-pixmap-on-unrealize.patch - %global moduledir %{_libdir}/xorg/modules %global drimoduledir %{_libdir}/dri %global sdkdir %{_includedir}/xorg @@ -653,6 +624,9 @@ find %{inst_srcdir}/hw/xfree86 -name \*.c -delete %changelog +* Tue Jul 19 2016 Adam Jackson - 1.18.4-1 +- xserver 1.18.4 + * Mon Jul 04 2016 Olivier Fourdan 1.18.3-8 - Fix segfault in Xwayland due to cursor update after unrealize (#1338979) diff --git a/xserver-1.4.99-ssh-isnt-local.patch b/xserver-1.4.99-ssh-isnt-local.patch deleted file mode 100644 index 2d33bed..0000000 --- a/xserver-1.4.99-ssh-isnt-local.patch +++ /dev/null @@ -1,48 +0,0 @@ -From 66a3b14e118e90db80f96fcab52af4df35bc2377 Mon Sep 17 00:00:00 2001 -From: Adam Jackson -Date: Mon, 10 Dec 2007 11:26:57 -0500 -Subject: [PATCH] Hack for proper MIT-SHM rejection for ssh-forwarded clients. - ---- - Xext/shm.c | 16 ++++++++++++++++ - 1 file changed, 16 insertions(+) - -diff --git a/Xext/shm.c b/Xext/shm.c -index de48020..c011210 100644 ---- a/Xext/shm.c -+++ b/Xext/shm.c -@@ -321,8 +321,21 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) - mode_t mask; - int uidset = 0, gidset = 0; - LocalClientCredRec *lcc; -+ Bool is_ssh = FALSE; - - if (GetLocalClientCreds(client, &lcc) != -1) { -+#ifdef linux -+ if (lcc->fieldsSet & LCC_PID_SET) { -+ /* ssh isn't actually a local client */ -+ char exe[64], buf[64]; -+ -+ memset(buf, 0, 64); -+ snprintf(exe, 64, "/proc/%d/exe", lcc->pid); -+ readlink(exe, buf, 63); -+ if (strstr(buf, "/ssh")) -+ is_ssh = TRUE; -+ } -+#endif - - if (lcc->fieldsSet & LCC_UID_SET) { - uid = lcc->euid; -@@ -342,6 +355,9 @@ shm_access(ClientPtr client, SHMPERM_TYPE * perm, int readonly) - #endif - FreeLocalClientCreds(lcc); - -+ if (is_ssh) -+ return -1; -+ - if (uidset) { - /* User id 0 always gets access */ - if (uid == 0) { --- -1.7.10.1 -