.gitignore | 1 Xext/xres.c | 4 Xext/xselinux_hooks.c | 4 Xi/exevents.c | 20 composite/compwindow.c | 1 config/10-quirks.conf | 16 config/config.c | 6 config/dbus-core.c | 4 configure.ac | 16 dix/devices.c | 12 dix/dixfonts.c | 2 dix/dixutils.c | 25 dix/events.c | 8 fb/fbpict.c | 2 fb/fbscreen.c | 2 glamor/Makefile.am | 6 glamor/glamor.c | 25 glamor/glamor.h | 3 glamor/glamor_context.h | 9 glamor/glamor_copyarea.c | 18 glamor/glamor_core.c | 11 glamor/glamor_egl.c | 61 - glamor/glamor_fbo.c | 42 glamor/glamor_fill.c | 13 glamor/glamor_font.c | 7 glamor/glamor_getimage.c | 96 - glamor/glamor_glx.c | 26 glamor/glamor_glyphblt.c | 10 glamor/glamor_glyphs.c | 3 glamor/glamor_gradient.c | 24 glamor/glamor_image.c | 180 +++ glamor/glamor_pixmap.c | 22 glamor/glamor_points.c | 5 glamor/glamor_priv.h | 31 glamor/glamor_putimage.c | 161 -- glamor/glamor_rects.c | 4 glamor/glamor_render.c | 64 - glamor/glamor_segment.c | 11 glamor/glamor_spans.c | 10 glamor/glamor_text.c | 46 glamor/glamor_tile.c | 13 glamor/glamor_transfer.c | 6 glamor/glamor_trapezoid.c | 20 glamor/glamor_utils.h | 13 glamor/glamor_vbo.c | 17 glamor/glamor_xv.c | 7 glx/glxcmds.c | 22 glx/glxdri2.c | 124 +- glx/glxdriswrast.c | 10 glx/glxext.c | 48 glx/glxserver.h | 1 hw/dmx/config/xdmxconfig.c | 3 hw/dmx/dmxfont.c | 2 hw/dmx/glxProxy/glxcmds.c | 2 hw/kdrive/linux/linux.c | 7 hw/kdrive/src/kdrive.c | 9 hw/xfree86/.gitignore | 1 hw/xfree86/common/compiler.h | 10 hw/xfree86/common/xf86Bus.c | 4 hw/xfree86/common/xf86Config.c | 36 hw/xfree86/common/xf86Module.h | 2 hw/xfree86/common/xf86Xinput.c | 9 hw/xfree86/common/xf86platformBus.c | 3 hw/xfree86/dri/dri.c | 14 hw/xfree86/dri2/dri2.c | 29 hw/xfree86/int10/stub.c | 2 hw/xfree86/int10/xf86x86emu.c | 1 hw/xfree86/loader/loadmod.c | 6 hw/xfree86/man/Makefile.am | 2 hw/xfree86/man/Xorg.wrap.man | 4 hw/xfree86/man/Xwrapper.config.man | 2 hw/xfree86/man/xorg.conf.man | 24 hw/xfree86/modes/xf86Crtc.h | 8 hw/xfree86/modes/xf86Cursors.c | 56 hw/xfree86/modes/xf86RandR12.c | 7 hw/xfree86/os-support/linux/lnx_platform.c | 2 hw/xfree86/os-support/linux/lnx_video.c | 4 hw/xfree86/os-support/linux/systemd-logind.c | 7 hw/xfree86/parser/Device.c | 6 hw/xfree86/parser/Layout.c | 6 hw/xfree86/parser/Screen.c | 6 hw/xfree86/parser/xf86Parser.h | 3 hw/xfree86/parser/xf86tokens.h | 1 hw/xfree86/ramdac/IBM.c | 4 hw/xfree86/ramdac/TI.c | 2 hw/xfree86/ramdac/xf86Cursor.h | 36 hw/xfree86/ramdac/xf86HWCurs.c | 14 hw/xfree86/shadowfb/shadow.c | 1592 +-------------------------- hw/xfree86/xorg-wrapper.c | 75 - hw/xfree86/xorgconf.cpp | 2 hw/xquartz/X11Controller.m | 5 hw/xquartz/bundle/Info.plist.cpp | 4 hw/xquartz/darwin.c | 16 hw/xquartz/xpr/xprScreen.c | 16 hw/xwayland/xwayland.c | 10 hw/xwin/glx/indirect.c | 13 include/dix.h | 2 include/misc.h | 18 include/opaque.h | 1 include/servermd.h | 27 include/systemd-logind.h | 4 include/xwin-config.h.in | 3 man/Xserver.man | 5 mi/mieq.c | 4 mi/miwindow.c | 2 os/busfault.c | 1 os/connection.c | 7 os/log.c | 75 - os/utils.c | 12 present/present.c | 126 +- present/present_priv.h | 1 randr/randr.c | 2 randr/rrcrtc.c | 7 randr/rrprovider.c | 4 randr/rrsdispatch.c | 138 ++ render/render.c | 2 test/.gitignore | 3 test/Makefile.am | 8 test/input.c | 14 test/signal-logging.c | 11 xfixes/cursor.c | 2 xfixes/region.c | 6 xkb/xkmread.c | 6 123 files changed, 1378 insertions(+), 2472 deletions(-)
New commits: commit 08820f03768e904f1746ef93ca01660330dc5406 Author: Keith Packard <[email protected]> Date: Wed Jun 4 22:28:57 2014 -0700 Update to version 1.15.99.903 Signed-off-by: Keith Packard <[email protected]> diff --git a/configure.ac b/configure.ac index e3d991d..0a6e772 100644 --- a/configure.ac +++ b/configure.ac @@ -26,9 +26,9 @@ dnl dnl Process this file with autoconf to create configure. AC_PREREQ(2.60) -AC_INIT([xorg-server], 1.15.99.902, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) -RELEASE_DATE="2014-04-08" -RELEASE_NAME="Glacier Blue" +AC_INIT([xorg-server], 1.15.99.903, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], xorg-server) +RELEASE_DATE="2014-06-04" +RELEASE_NAME="Strawberry Shortcake" AC_CONFIG_SRCDIR([Makefile.am]) AC_CONFIG_MACRO_DIR([m4]) AM_INIT_AUTOMAKE([foreign dist-bzip2]) commit 9fb08310b51b46736f3ca8dbc04efdf502420403 Author: Peter Hutterer <[email protected]> Date: Wed May 21 10:07:31 2014 +1000 mi: don't process events from disabled devices (#77884) Once a device is disabled, it doesn't have a sprite pointer anymore. If an event is still in the queue and processed after DisableDevice finished, a dereference causes a crash. Example backtrace (crash forced by injecting an event at the right time): (EE) 0: /opt/xorg/bin/Xorg (OsSigHandler+0x3c) [0x48d334] (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0) [0x37fcc0f74f] (EE) 2: /opt/xorg/bin/Xorg (mieqMoveToNewScreen+0x38) [0x609240] (EE) 3: /opt/xorg/bin/Xorg (mieqProcessDeviceEvent+0xd4) [0x609389] (EE) 4: /opt/xorg/bin/Xorg (mieqProcessInputEvents+0x206) [0x609720] (EE) 5: /opt/xorg/bin/Xorg (ProcessInputEvents+0xd) [0x4aeb58] (EE) 6: /opt/xorg/bin/Xorg (xf86VTSwitch+0x1a6) [0x4af457] (EE) 7: /opt/xorg/bin/Xorg (xf86Wakeup+0x2bf) [0x4af0a7] (EE) 8: /opt/xorg/bin/Xorg (WakeupHandler+0x83) [0x4445cb] (EE) 9: /opt/xorg/bin/Xorg (WaitForSomething+0x3fe) [0x491bf6] (EE) 10: /opt/xorg/bin/Xorg (Dispatch+0x97) [0x435748] (EE) 11: /opt/xorg/bin/Xorg (dix_main+0x61d) [0x4438a9] (EE) 12: /opt/xorg/bin/Xorg (main+0x28) [0x49ba28] (EE) 13: /lib64/libc.so.6 (__libc_start_main+0xf5) [0x37fc821d65] (EE) 14: /opt/xorg/bin/Xorg (_start+0x29) [0x425e69] (EE) 15: ? (?+0x29) [0x29] xf86VTSwitch() calls ProcessInputEvents() before disabling a device, and DisableDevice() calls mieqProcessInputEvents() again when flushing touches and button events. Between that and disabling the device (which causes new events to be refused) there is a window where events may be triggered and enqueued. On the next call to PIE that event is processed on a now defunct device, causing the crash. The simplest fix to this is to discard events from disabled devices. We flush the queue often enough before disabling that when we get here, we really don't care about the events from this device. X.Org Bug 77884 <http://bugs.freedesktop.org/show_bug.cgi?id=77884> Signed-off-by: Peter Hutterer <[email protected]> Reported-by: Maarten Lankhorst <[email protected]> Tested-by: Maarten Lankhorst <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/mi/mieq.c b/mi/mieq.c index 36aa213..0e27405 100644 --- a/mi/mieq.c +++ b/mi/mieq.c @@ -515,6 +515,10 @@ mieqProcessDeviceEvent(DeviceIntPtr dev, InternalEvent *event, ScreenPtr screen) verify_internal_event(event); + /* refuse events from disabled devices */ + if (!dev->enabled) + return 0; + /* Custom event handler */ handler = miEventQueue.handlers[event->any.type]; diff --git a/test/input.c b/test/input.c index 9b5db89..a4615c9 100644 --- a/test/input.c +++ b/test/input.c @@ -1712,6 +1712,18 @@ mieq_test_event_handler(int screenNum, InternalEvent *ie, DeviceIntPtr dev) static void _mieq_test_generate_events(uint32_t start, uint32_t count) { + static DeviceIntRec dev; + static SpriteInfoRec spriteInfo; + static SpriteRec sprite; + + memset(&dev, 0, sizeof(dev)); + memset(&spriteInfo, 0, sizeof(spriteInfo)); + memset(&sprite, 0, sizeof(sprite)); + dev.spriteInfo = &spriteInfo; + spriteInfo.sprite = &sprite; + + dev.enabled = 1; + count += start; while (start < count) { RawDeviceEvent e = { 0 }; @@ -1721,7 +1733,7 @@ _mieq_test_generate_events(uint32_t start, uint32_t count) e.time = GetTimeInMillis(); e.flags = start; - mieqEnqueue(NULL, (InternalEvent *) &e); + mieqEnqueue(&dev, (InternalEvent *) &e); start++; } commit e6f5d9d7b7efdacea0f22f1808efca849bcede4c Author: Keith Packard <[email protected]> Date: Mon Jan 27 11:23:58 2014 -0800 present: Queue flips for later execution When a flip (or unflip) is pending and a flip request comes in, leave it queued until the pending flip completes and then execute it. This fixes a bug where an application submitting back-to-back present_pixmap requests for sequential frames would alternate between flipping and copying as the pending flip would cause the new present_pixmap request to not use a flip. Signed-off-by: Keith Packard <[email protected]> Reviewed-by: Chris Wilson <[email protected]> Tested-by: Frank Binns <[email protected]> diff --git a/present/present.c b/present/present.c index 73d5f69..1bf3a58 100644 --- a/present/present.c +++ b/present/present.c @@ -42,6 +42,9 @@ static struct xorg_list present_flip_queue; #define DebugPresent(x) #endif +static void +present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc); + /* * Copies the update region from a pixmap to the target drawable */ @@ -78,6 +81,20 @@ present_copy_region(DrawablePtr drawable, FreeScratchGC(gc); } +static inline PixmapPtr +present_flip_pending_pixmap(ScreenPtr screen) +{ + present_screen_priv_ptr screen_priv = present_screen_priv(screen); + + if (!screen_priv) + return NULL; + + if (!screen_priv->flip_pending) + return NULL; + + return screen_priv->flip_pending->pixmap; +} + static Bool present_check_flip(RRCrtcPtr crtc, WindowPtr window, @@ -88,6 +105,7 @@ present_check_flip(RRCrtcPtr crtc, int16_t y_off) { ScreenPtr screen = window->drawable.pScreen; + PixmapPtr window_pixmap; WindowPtr root = screen->root; present_screen_priv_ptr screen_priv = present_screen_priv(screen); @@ -104,19 +122,11 @@ present_check_flip(RRCrtcPtr crtc, if (!screen_priv->info->flip) return FALSE; - /* Can't pend a flip while unflipping */ - if (screen_priv->unflip_event_id) { - return FALSE; - } - - /* Can't have two pending flips at the same time */ - if (screen_priv->flip_pending) { - return FALSE; - } - /* Make sure the window hasn't been redirected with Composite */ - if (screen->GetWindowPixmap(window) != screen->GetScreenPixmap(screen) && - screen->GetWindowPixmap(window) != screen_priv->flip_pixmap) + window_pixmap = screen->GetWindowPixmap(window); + if (window_pixmap != screen->GetScreenPixmap(screen) && + window_pixmap != screen_priv->flip_pixmap && + window_pixmap != present_flip_pending_pixmap(screen)) return FALSE; /* Check for full-screen window */ @@ -147,6 +157,7 @@ present_check_flip(RRCrtcPtr crtc, /* Ask the driver for permission */ if (screen_priv->info->check_flip) { if (!(*screen_priv->info->check_flip) (crtc, window, pixmap, sync_flip)) { + DebugPresent(("\td %08lx -> %08lx\n", window->drawable.id, pixmap ? pixmap->drawable.id : 0)); return FALSE; } } @@ -188,8 +199,10 @@ present_pixmap_idle(PixmapPtr pixmap, WindowPtr window, CARD32 serial, struct pr { if (present_fence) present_fence_set_triggered(present_fence); - if (window) + if (window) { + DebugPresent(("\ti %08lx\n", pixmap ? pixmap->drawable.id : 0)); present_send_idle_notify(window, serial, pixmap, present_fence); + } } RRCrtcPtr @@ -227,9 +240,8 @@ present_query_capabilities(RRCrtcPtr crtc) } static int -present_get_ust_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc) +present_get_ust_msc(ScreenPtr screen, RRCrtcPtr crtc, uint64_t *ust, uint64_t *msc) { - ScreenPtr screen = window->drawable.pScreen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); if (crtc == NULL) @@ -283,7 +295,7 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc * we'll just use whatever previous MSC we'd seen from this CRTC */ - if (present_get_ust_msc(window, window_priv->crtc, &old_ust, &old_msc) != Success) + if (present_get_ust_msc(window->drawable.pScreen, window_priv->crtc, &old_ust, &old_msc) != Success) old_msc = window_priv->msc; window_priv->msc_offset += new_msc - old_msc; @@ -293,6 +305,34 @@ present_window_to_crtc_msc(WindowPtr window, RRCrtcPtr crtc, uint64_t window_msc return window_msc + window_priv->msc_offset; } +/* + * When the wait fence or previous flip is completed, it's time + * to re-try the request + */ +static void +present_re_execute(present_vblank_ptr vblank) +{ + uint64_t ust = 0, crtc_msc = 0; + + if (vblank->crtc) + (void) present_get_ust_msc(vblank->screen, vblank->crtc, &ust, &crtc_msc); + + present_execute(vblank, ust, crtc_msc); +} + +static void +present_flip_try_ready(ScreenPtr screen) +{ + present_vblank_ptr vblank, tmp; + + xorg_list_for_each_entry_safe(vblank, tmp, &present_exec_queue, event_queue) { + if (vblank->flip_ready) { + present_re_execute(vblank); + return; + } + } +} + static void present_flip_idle(ScreenPtr screen) { @@ -369,16 +409,14 @@ present_unflip(ScreenPtr screen) } static void -present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc); - -static void present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) { ScreenPtr screen = vblank->screen; present_screen_priv_ptr screen_priv = present_screen_priv(screen); - DebugPresent(("\tn %p %8lld: %08lx -> %08lx\n", vblank, vblank->target_msc, - vblank->pixmap ? vblank->pixmap->drawable.id : 0, + DebugPresent(("\tn %lld %p %8lld: %08lx -> %08lx\n", + vblank->event_id, vblank, vblank->target_msc, + vblank->pixmap ? vblank->pixmap->drawable.id : 0, vblank->window->drawable.id)); assert (vblank == screen_priv->flip_pending); @@ -404,6 +442,8 @@ present_flip_notify(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) present_vblank_notify(vblank, PresentCompleteKindPixmap, PresentCompleteModeFlip, ust, crtc_msc); present_vblank_destroy(vblank); + + present_flip_try_ready(screen); } void @@ -436,6 +476,7 @@ present_event_notify(uint64_t event_id, uint64_t ust, uint64_t msc) DebugPresent(("\tun %lld\n", event_id)); screen_priv->unflip_event_id = 0; present_flip_idle(screen); + present_flip_try_ready(screen); return; } } @@ -498,15 +539,7 @@ static void present_wait_fence_triggered(void *param) { present_vblank_ptr vblank = param; - WindowPtr window = vblank->window; - uint64_t ust = 0, crtc_msc = 0; - - if (window) { - present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); - if (window_priv) - (void) present_get_ust_msc(window, window_priv->crtc, &ust, &crtc_msc); - } - present_execute(vblank, ust, crtc_msc); + present_re_execute(vblank); } /* @@ -534,14 +567,27 @@ present_execute(present_vblank_ptr vblank, uint64_t ust, uint64_t crtc_msc) } } + if (vblank->flip && vblank->pixmap && vblank->window) { + if (screen_priv->flip_pending || screen_priv->unflip_event_id) { + DebugPresent(("\tr %lld %p (pending %p unflip %lld)\n", + vblank->event_id, vblank, + screen_priv->flip_pending, screen_priv->unflip_event_id)); + vblank->flip_ready = TRUE; + return; + } + } + xorg_list_del(&vblank->event_queue); vblank->queued = FALSE; if (vblank->pixmap && vblank->window) { - if (vblank->flip && screen_priv->flip_pending == NULL && !screen_priv->unflip_event_id) { + if (vblank->flip) { + + DebugPresent(("\tf %lld %p %8lld: %08lx -> %08lx\n", + vblank->event_id, vblank, crtc_msc, + vblank->pixmap->drawable.id, vblank->window->drawable.id)); - DebugPresent(("\tf %p %8lld: %08lx -> %08lx\n", vblank, crtc_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id)); /* Prepare to flip by placing it in the flip queue and * and sticking it into the flip_pending field */ @@ -644,7 +690,7 @@ present_pixmap(WindowPtr window, uint64_t target_msc; uint64_t crtc_msc; int ret; - present_vblank_ptr vblank; + present_vblank_ptr vblank, tmp; ScreenPtr screen = window->drawable.pScreen; present_window_priv_ptr window_priv = present_get_window_priv(window, TRUE); present_screen_priv_ptr screen_priv = present_screen_priv(screen); @@ -664,7 +710,7 @@ present_pixmap(WindowPtr window, target_crtc = present_get_crtc(window); } - present_get_ust_msc(window, target_crtc, &ust, &crtc_msc); + present_get_ust_msc(screen, target_crtc, &ust, &crtc_msc); target_msc = present_window_to_crtc_msc(window, target_crtc, window_msc, crtc_msc); @@ -698,7 +744,7 @@ present_pixmap(WindowPtr window, */ if (!update) { - xorg_list_for_each_entry(vblank, &window_priv->vblank, window_list) { + xorg_list_for_each_entry_safe(vblank, tmp, &window_priv->vblank, window_list) { if (!vblank->pixmap) continue; @@ -706,11 +752,11 @@ present_pixmap(WindowPtr window, if (!vblank->queued) continue; - if (vblank->crtc != target_crtc || vblank->target_msc != target_msc) + if (vblank->crtc != target_crtc || vblank->target_msc > target_msc) continue; DebugPresent(("\tx %lld %p %8lld: %08lx -> %08lx (crtc %p)\n", - vblank->event_id, vblank, target_msc, + vblank->event_id, vblank, vblank->target_msc, vblank->pixmap->drawable.id, vblank->window->drawable.id, vblank->crtc)); @@ -720,6 +766,9 @@ present_pixmap(WindowPtr window, vblank->pixmap = NULL; vblank->idle_fence = NULL; + vblank->flip = FALSE; + if (vblank->flip_ready) + present_re_execute(vblank); } } @@ -875,7 +924,8 @@ present_vblank_destroy(present_vblank_ptr vblank) /* Remove vblank from window and screen lists */ xorg_list_del(&vblank->window_list); - DebugPresent(("\td %p %8lld: %08lx -> %08lx\n", vblank, vblank->target_msc, + DebugPresent(("\td %lld %p %8lld: %08lx -> %08lx\n", + vblank->event_id, vblank, vblank->target_msc, vblank->pixmap ? vblank->pixmap->drawable.id : 0, vblank->window->drawable.id)); diff --git a/present/present_priv.h b/present/present_priv.h index 8d3e007..d8569a2 100644 --- a/present/present_priv.h +++ b/present/present_priv.h @@ -71,6 +71,7 @@ struct present_vblank { int num_notifies; Bool queued; /* on present_exec_queue */ Bool flip; /* planning on using flip */ + Bool flip_ready; /* wants to flip, but waiting for previous flip or unflip */ Bool sync_flip; /* do flip synchronous to vblank */ Bool abort_flip; /* aborting this flip */ }; commit 2f5cf9ff9a0f713b7e038636484c77f113a5f10a Author: Frank Binns <[email protected]> Date: Thu Apr 24 11:37:48 2014 +0100 xfixes: disable cursor on X server reset The initial state of the cursor is set to disabled but this was never be re-disabled during X server reset. This meant any application run after an X server reset would have the cursor displayed even if it hadn't requested this to be the case. Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/xfixes/cursor.c b/xfixes/cursor.c index 2c4b57c..31a408f 100644 --- a/xfixes/cursor.c +++ b/xfixes/cursor.c @@ -1056,6 +1056,8 @@ XFixesCursorInit(void) if (party_like_its_1989) CursorVisible = EnableCursor; + else + CursorVisible = FALSE; if (!dixRegisterPrivateKey(&CursorScreenPrivateKeyRec, PRIVATE_SCREEN, 0)) return FALSE; commit b92d86a982504af2605042c19ef796d135074ee1 Author: Brendan King <[email protected]> Date: Thu Apr 24 11:37:47 2014 +0100 dix: fix pixmap leak on server reset The server is leaking a pixmap (created by CreateDefaultStipple()) on reset. The leak is caused by some X Server graphics contexts not being freed on reset by the machine independent cursor code in the server, which in turn is caused by the cursor cleanup code (miSpriteDeviceCursorCleanup()) not being called. Ensures the DeviceCursorCleanup() function is called when the associated input device is closed on server reset. Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/dix/devices.c b/dix/devices.c index 73f60f4..7f079ff 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -946,8 +946,9 @@ CloseDevice(DeviceIntPtr dev) if (dev->inited) (void) (*dev->deviceProc) (dev, DEVICE_CLOSE); - /* free sprite memory */ - if (IsMaster(dev) && dev->spriteInfo->sprite) + FreeSprite(dev); + + if (IsMaster(dev)) screen->DeviceCursorCleanup(dev, screen); /* free acceleration info */ @@ -968,8 +969,6 @@ CloseDevice(DeviceIntPtr dev) free(classes); } - FreeSprite(dev); - /* a client may have the device set as client pointer */ for (j = 0; j < currentMaxClients; j++) { if (clients[j] && clients[j]->clientPtr == dev) { commit a99c061aafd4aaa5728c776dca7d0a1789ac739a Author: Brendan King <[email protected]> Date: Thu Apr 24 11:37:46 2014 +0100 dix: reference the cursor just once in InitializeSprite() The new current cursor was being referenced twice, resulting in a memory leak when the current server generation ended. Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/dix/events.c b/dix/events.c index 7e7a1c9..b8c67fd 100644 --- a/dix/events.c +++ b/dix/events.c @@ -3237,7 +3237,7 @@ InitializeSprite(DeviceIntPtr pDev, WindowPtr pWin) pCursor = RefCursor(pCursor); if (pSprite->current) FreeCursor(pSprite->current, None); - pSprite->current = RefCursor(pCursor); + pSprite->current = pCursor; if (pScreen) { (*pScreen->RealizeCursor) (pDev, pScreen, pSprite->current); commit 444a1f7a8802999e27ecf5f6eb598df2206f7277 Author: Brendan King <[email protected]> Date: Thu Apr 24 11:37:45 2014 +0100 fb: fix screen pixmap leak on server reset Call FreePixmap() instead of free() to destroy the screen pixmap in fbCloseScreen(). Signed-off-by: Frank Binns <[email protected]> Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/fb/fbscreen.c b/fb/fbscreen.c index b2b9739..1f91089 100644 --- a/fb/fbscreen.c +++ b/fb/fbscreen.c @@ -37,7 +37,7 @@ fbCloseScreen(ScreenPtr pScreen) free(depths[d].vids); free(depths); free(pScreen->visuals); - free(pScreen->devPrivate); + FreePixmap((PixmapPtr)pScreen->devPrivate); return TRUE; } commit 7ca458493aa2f0aa091c989ea0768611e0730bf5 Author: Chris Wilson <[email protected]> Date: Wed May 28 08:14:00 2014 +0100 xfree86: Report Present as a built-in module This is so that drivers can do a runtime check that Present is available, similar to existing runtime checks performed by the drivers for DRI. Signed-off-by: Chris Wilson <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index f92ad8d..e1f649a 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -841,6 +841,9 @@ static const char *compiled_in_modules[] = { #if DRI3 "dri3", #endif +#if PRESENT + "present", +#endif NULL }; commit 746be5a03ebbda4ab411ca3efb2ed95f99e9ea46 Author: Chris Wilson <[email protected]> Date: Wed May 28 08:13:59 2014 +0100 xfree86: Report DRI3 as a built-in module This is so that drivers can do a runtime check that DRI3 is available, similar to existing runtime checks performed by the drivers for DRI and DRI2. v2: Only add DRI3 to the list if the module was actually built into the server (Mark Kettenis). Signed-off-by: Chris Wilson <[email protected]> Cc: Mark Kettenis <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/hw/xfree86/loader/loadmod.c b/hw/xfree86/loader/loadmod.c index 092bf57..f92ad8d 100644 --- a/hw/xfree86/loader/loadmod.c +++ b/hw/xfree86/loader/loadmod.c @@ -838,6 +838,9 @@ static const char *compiled_in_modules[] = { "extmod", "dri", "dri2", +#if DRI3 + "dri3", +#endif NULL }; commit dc8d0688471695ec5a8db5fef93fbcfc064891d5 Author: Max Filippov <[email protected]> Date: Mon Jun 2 01:17:31 2014 +0400 xtensa: add support for xtensa architecture Signed-off-by: Max Filippov <[email protected]> Reviewed-by: Adam Jackson <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/hw/xfree86/common/compiler.h b/hw/xfree86/common/compiler.h index 0319de0..1bd8def 100644 --- a/hw/xfree86/common/compiler.h +++ b/hw/xfree86/common/compiler.h @@ -1352,7 +1352,10 @@ stl_u(unsigned long val, unsigned int *p) #else /* ix86 */ #if !defined(__SUNPRO_C) -#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) +#if !defined(FAKEIT) && !defined(__mc68000__) && !defined(__arm__) && \ + !defined(__sh__) && !defined(__hppa__) && !defined(__s390__) && \ + !defined(__m32r__) && !defined(__aarch64__) && !defined(__arc__) && \ + !defined(__xtensa__) #ifdef GCCUSESGAS /* diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c index 40765fc..652f963 100644 --- a/hw/xfree86/os-support/linux/lnx_video.c +++ b/hw/xfree86/os-support/linux/lnx_video.c @@ -60,7 +60,8 @@ static Bool ExtendedEnabled = FALSE; !defined(__nds32__) && \ !defined(__arm__) && \ !defined(__aarch64__) && \ - !defined(__arc__) + !defined(__arc__) && \ + !defined(__xtensa__) /* * Due to conflicts with "compiler.h", don't rely on <sys/io.h> to declare diff --git a/include/servermd.h b/include/servermd.h index 2d1ccb1..081123b 100644 --- a/include/servermd.h +++ b/include/servermd.h @@ -313,6 +313,20 @@ SOFTWARE. #endif /* ARC */ +#ifdef __xtensa__ + +#ifdef __XTENSA_EL__ +#define IMAGE_BYTE_ORDER LSBFirst +#define BITMAP_BIT_ORDER LSBFirst +#endif +#ifdef __XTENSA_EB__ +#define IMAGE_BYTE_ORDER MSBFirst +#define BITMAP_BIT_ORDER MSBFirst +#endif +#define GLYPHPADBYTES 4 + +#endif /* __xtensa__ */ + /* size of buffer to use with GetImage, measured in bytes. There's obviously * a trade-off between the amount of heap used and the number of times the * ddx routine has to be called. commit 63c48de63becdee680e90cb2363984c2f8f77fd1 Author: Søren Sandmann <[email protected]> Date: Fri May 30 16:50:35 2014 -0400 xfree86: Add "modesetting" to list of fallback drivers To make X -configure work properly, the output of fixup_video_driver_list() should be in order of preference. Otherwise, the config file may use the incorrect driver for some devices. In particular, the drivers that work for all (or many) devices need to be last in the list. Since the modesetting driver works for many devices, it needs to be considered a fallback driver. Signed-off-by: Søren Sandmann <[email protected]> Acked-by: Daniel Stone <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/hw/xfree86/common/xf86Config.c b/hw/xfree86/common/xf86Config.c index 2adef44..481674d 100644 --- a/hw/xfree86/common/xf86Config.c +++ b/hw/xfree86/common/xf86Config.c @@ -519,7 +519,7 @@ xf86InputDriverlistFromConfig(void) static void fixup_video_driver_list(const char **drivers) { - static const char *fallback[4] = { "fbdev", "vesa", "wsfb", NULL }; + static const char *fallback[5] = { "modesetting", "fbdev", "vesa", "wsfb", NULL }; const char **end, **drv; const char *x; int i; commit 0df871cf34ee5f1a85586206027de9b02fb364ec Author: Robert Ancell <[email protected]> Date: Thu May 22 10:43:52 2014 +1200 Fix overflow checking extension versions The easiest way to check for the version of an extension is to send the maximum possible version numbers in the QueryVersion request. The X server overflows on these as it assumes you will send a reasonable version number. Reviewed-by: Keith Packard <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/include/misc.h b/include/misc.h index 17de710..9c2f573 100644 --- a/include/misc.h +++ b/include/misc.h @@ -259,15 +259,19 @@ extern void FormatDouble(double dbl, char *string); * or a value greater than 0 */ static inline int -version_compare(uint16_t a_major, uint16_t a_minor, - uint16_t b_major, uint16_t b_minor) +version_compare(uint32_t a_major, uint32_t a_minor, + uint32_t b_major, uint32_t b_minor) { - int a, b; + if (a_major > b_major) + return 1; + if (a_major < b_major) + return -1; + if (a_minor > b_minor) + return 1; + if (a_minor < b_minor) + return -1; - a = a_major << 16 | a_minor; - b = b_major << 16 | b_minor; - - return (a - b); + return 0; } /* some macros to help swap requests, replies, and events */ commit 4cbd3fabaa41e89579530bceb01b9239fa2afdb7 Author: Adam Jackson <[email protected]> Date: Wed May 21 09:22:49 2014 -0400 configure: Require sufficiently new wayland-client for xwayland ddx The explicit release requests were added in 1.3.0, don't try to build against older. Signed-off-by: Adam Jackson <[email protected]> Reviewed-by: Jasper St. Pierre <[email protected]> Signed-off-by: Keith Packard <[email protected]> diff --git a/configure.ac b/configure.ac index e5387bf..e3d991d 100644 --- a/configure.ac +++ b/configure.ac @@ -2442,7 +2442,7 @@ AM_CONDITIONAL(XFAKESERVER, [test "x$KDRIVE" = xyes && test "x$XFAKE" = xyes]) dnl Xwayland DDX -PKG_CHECK_MODULES(XWAYLANDMODULES, [wayland-client libdrm epoxy], [have_xwayland=yes], [have_xwayland=no]) +PKG_CHECK_MODULES(XWAYLANDMODULES, [wayland-client >= 1.3.0 libdrm epoxy], [have_xwayland=yes], [have_xwayland=no]) AC_MSG_CHECKING([whether to build Xwayland DDX]) if test "x$XWAYLAND" = xauto; then XWAYLAND="$have_xwayland" commit a205ec3ab77c6765d44f77c526a832345fef77b0 Author: Jon TURNEY <[email protected]> Date: Sat Apr 5 15:15:46 2014 +0100 configure: Restore DEFAULT_LOGDIR to xwin-config.h, it is used Commit f37a46913489397d8628ffe578c8d4ed50b6ca72 removed this from xwin-config.h.in for some reason, but it is used. Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Colin Harrison <[email protected]> diff --git a/include/xwin-config.h.in b/include/xwin-config.h.in index a5e6b17..176c019 100644 --- a/include/xwin-config.h.in +++ b/include/xwin-config.h.in @@ -26,5 +26,8 @@ /* Vendor web address for support */ #undef __VENDORDWEBSUPPORT__ +/* Default log location */ +#undef DEFAULT_LOGDIR + /* Whether we should re-locate the root to where the executable lives */ #undef RELOCATE_PROJECTROOT commit aaaa41345674a1c76a70836394cb5e57f82e9a26 Author: Jon TURNEY <[email protected]> Date: Sun Apr 27 20:55:51 2014 +0100 hw/xwin: Update for __glXLastContext -> lastGLContext Update for __glXLastContext -> lastGLContext. Signed-off-by: Jon TURNEY <[email protected]> Reviewed-by: Colin Harrison <[email protected]> diff --git a/hw/xwin/glx/indirect.c b/hw/xwin/glx/indirect.c index 6906114..9bfaac0 100644 --- a/hw/xwin/glx/indirect.c +++ b/hw/xwin/glx/indirect.c @@ -929,17 +929,6 @@ glxWinDrawableDestroy(__GLXdrawable * base) { __GLXWinDrawable *glxPriv = (__GLXWinDrawable *) base; - if (glxPriv->drawContext && - (__glXLastContext == &((glxPriv->drawContext)->base))) { - // if this context is current and has unflushed commands, say we have flushed them - // (don't actually flush them, the window is going away anyhow, and an implict flush occurs - // on the next context change) - // (GLX core considers it an error when we try to select a new current context if the old one - // has unflushed commands, but the window has disappeared..) - __glXLastContext->hasUnflushedCommands = FALSE; - __glXLastContext = NULL; - } - if (glxPriv->hPbuffer) if (!wglDestroyPbufferARBWrapper(glxPriv->hPbuffer)) { ErrorF("wglDestroyPbufferARB failed: %s\n", glxWinErrorMessage()); @@ -1542,7 +1531,7 @@ glxWinContextLoseCurrent(__GLXcontext * base) An error seems to be reported if we try to make no context current if there is already no current context, so avoid doing that... */ - if (__glXLastContext != NULL) { + if (wglGetCurrentContext() != NULL) { ret = wglMakeCurrent(NULL, NULL); /* We don't need a DC when setting no current context */ if (!ret) ErrorF("glxWinContextLoseCurrent error: %s\n", commit 1c10b37380d228b35db8a8616a6312ac54f5e59b Author: Jeremy Huddleston Sequoia <[email protected]> Date: Sat May 31 17:45:02 2014 -0700 XQuartz: Update logic to account for title bar on every display in Mavericks <rdar://problem/14205847> http://xquartz.macosforge.org/trac/ticket/832 -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected] Archive: https://lists.debian.org/[email protected]

