commit ad2facda30f453d749492c51d29f2626aee6326a
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jan 11 16:15:57 2017 -0500

    xserver 1.19.1
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 82dcb68a8782d0cce6e6ce1a375cda05c91fe8c3
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Jan 9 18:10:21 2017 -0800

    AttendClient of grab-pervious client must queue to saved_ready_clients [v2]
    
    A client which is attended while a grab is blocking execution of its
    requests needs to be placed in the saved_ready_clients list so that it
    will get scheduled once the grab terminates. Otherwise, if the client
    never sends another request, there is no way for it to be placed in
    the ready_clients list.
    
    v2: Wrap comment above mark_client_saved_ready.
        Remove test for OS_COMM_IGNORED which will always be true.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99333
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 785053d033e73d2deb0ded4b97eabfd881991978)

commit 14516988e095ed748e738c14a87c3656006846f7
Author: Qiang Yu <Qiang.Yu@amd.com>
Date:   Tue Jan 10 18:51:55 2017 +0800

    randr: fix xserver crash when xrandr setprovideroutputsource
    
    xrandr --setprovideroutputsource <screen> <gpu screen>
    Xorg: ../../../xserver/dix/dispatch.c:4018: AttachOutputGPU:
    Assertion `new->isGPU' failed.
    
    GPUScreen is not allowed to be sink output.
    
    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 555e0a42d138ac8d83af62638752a1bebad602d6)

commit 3381e2c26b2ac40b1dd909439bf72559b80d0d86
Author: Qiang Yu <Qiang.Yu@amd.com>
Date:   Tue Jan 10 18:51:54 2017 +0800

    xfree86: fix wrong usage of xf86optionListMerge
    
    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 1012510620de7dadd0ab18b19a8e11facd884601)

commit 27a2772cf3a1bcd656efdf653a7504597911dbc4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Nov 25 17:34:05 2016 +0900

    present: Only call present_flip_notify if vblank->queued == FALSE
    
    We are no longer using the present_flip_queue list only for presents
    which have already been submitted to the driver for page flipping, but
    also for those which we are queueing up to be flipped later, marked
    with vblank->queued == TRUE. We were incorrectly calling
    present_flip_notify for such entries, failing the assertion in
    present_flip_notify (or presumably resulting in other undesirable
    behaviour with assertions disabled).
    
    Reproduction recipe: Run the JavaFX test case referenced by
    https://bugs.freedesktop.org/show_bug.cgi?id=98831#c6 and alt-tab out
    of it while it's fullscreen. May take a few attempts to hit the
    assertion failure.
    
    Fixes: bab0f450a719 ("present: Fix presentation of flips out of order")
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98854
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit e473b2bc016adacfe3fa47fdf6a8ce9f8cddff62)

commit 943e3cbeb0139d719589fc07c4f471195e4efe0a
Author: Kai-Heng Feng <kai.heng.feng@canonical.com>
Date:   Thu Dec 15 13:56:38 2016 +0800

    edid: Add quirk for ADA 1024x600 7" display.
    
    Detailed mode reports 108 mm x 68 mm which is for smaller display.
    Maximum image size reports 15 cm x 10 cm which aligns with its physical
    size, use this size instead.
    
    Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 9874f73e88678c9eacbcba05e52336fc63a32712)

commit cb3057da2254f9b6434a9c40486c72865cd1ab5e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Dec 8 14:32:06 2016 +1000

    os: return 0 from check_timers if we touched any of them
    
    Fixes a regression introduced in 0b2f30834b1a9f. If a driver posts input
    events during a timer function (wacom and synaptics do this during tap
    timeouts), ProcessInputEvents() is not called for these events. There are no
    new events on any fds, so the events just sit in the queue waiting for
    something else to happen.
    
    Fix this by simply returning 0 from check_timers if we ran at least one of
    them or reset them all. This way the callers ospoll_wait will exit and
    continue with normal processing.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>

commit db03742cd33d6d54834bb138886a4f84bc452a85
Author: Michal Srb <msrb@suse.com>
Date:   Mon Dec 12 17:45:22 2016 +0200

    xinerama: Swap the response in RRXineramaWriteMonitor
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 862c1c43c10eda955db1440cc72ff0387e24a35f
Author: Hans De Goede <hdegoede@redhat.com>
Date:   Tue Dec 20 13:00:43 2016 +0100

    glamor: Trust eglGetPlatformDisplayEXT if it exists
    
    If the libEGL we are using has eglGetPlatformDisplayEXT, yet it still
    returns NULL, then this very likely means that it does not support the
    type (e.g. EGL_PLATFORM_GBM_MESA) passed in, and then returning NULL is
    the right thing to do.
    
    This avoids falling back to an eglGetDisplay() implementation which does
    not understands the passed in gbm handle, treats it as a pointer to
    something else completely, followed by a crash sooner or later.
    
    Specifically this fixes using the nvidia binary driver, with nvidia's
    libEGL + the modesetting driver on a secondary GPU crashing inside
    glamor_egl_init() sometimes.
    
    [1.19: squash in typo fix from 29a4f3db - ajax]
    
    Cc: Eric Anholt <eric@anholt.net>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 05e19644250698aa126a60bc671e85425df784d1)

commit 8790bd993ac2f8f8dd54a1946312e6b6dc929e00
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Thu Dec 29 12:37:18 2016 +0500

    os,dix: Depend custom libs on libs, not objects
    
    The custom os/os.O library reuses *.o files of os/libos.la.
    
    The current rule assumes automake puts all the objects into per-target
    am__*_la_OBJECTS variable.  At least with AC_REPLACE_FUNCS, this no
    longer holds (as wanted objects are put into LTLIBOBJS instead).
    
    Depend on automake's result, the *.la library instead, to express demand
    of any its dependencies being built.
    
    Should be fixing randomly occuring "undefined reference to `strlcpy'"
    errors when linking Xvfb and other DDX-es that could use os.O.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>
    (cherry picked from commit 5b74e260e009d8bdf26433724495802b85cce7c3)

commit 8cf47472bff1d5ca3de6ff83a80f0d2820c3fb93
Author: Ben Crocker <bcrocker@redhat.com>
Date:   Tue Nov 15 16:34:38 2016 -0500

    Fix a segfault that occurs if xorg.conf.d is absent:
    
    In InitOutput, if xf86HandleConfigFile returns CONFIG_NOFILE
    (which it does if no config file or directory is present), the
    autoconfig flag is set, causing xf86AutoConfig to be called
    later on.
    
    xf86AutoConfig calls xf86OutputClassDriverList via the
    call tree:
    
    xf86AutoConfig =>
      listPossibleVideoDrivers =>
        xf86PlatformMatchDriver =>
          xf86OutputClassDriverList
    
    and xf86OutputClassDriverList attempts to traverse a linked list
    that is a member of the XF86ConfigRec struct pointed to by the
    global xf86configptr, which is NULL at this point because the
    XF86ConfigRec struct is only allocated (by xf86readConfigFile)
    AFTER the config file and directory have been successfully
    opened; the CONFIG_NOFILE return from xf86HandleConfigFile
    occurs BEFORE the call to xf86readConfigFile which allocates
    the XF86ConfigRec struct.
    
    Rx: In read.c (for symmetry with xf86freeConfig, which already
    appears in this file), add a new function xf86allocateConfig
    which tests the value of xf86configptr and, if it's NULL,
    allocates the XF86ConfigRec struct and deposits the pointer
    in xf86configptr.  In xf86Parser.h, add a prototype for the
    new xf86allocateConfig function.
    
    Back in read.c, #include "xf86Config.h".  In xf86readConfigFile,
    change the open-code call to calloc to a call to the new
    xf86allocateConfig function.
    
    In xf86AutoConfig.c, add a call to the new xf86allocateConfig function
    to the beginning of xf86AutoConfig to make sure the XF86ConfigRec struct
    is allocated.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Ben Crocker <bcrocker@redhat.com>
    (cherry picked from commit 8b335d9068fe4e1f1423a4d86c22b69ffcb819a5)

commit 06a3e7ef3bf9a907f1fba84a3601870a5697f657
Author: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
Date:   Wed Dec 7 15:43:06 2016 +0200

    test: fix distributing scripts
    
    Fix the following error on 'make distcheck':
    
    make[6]: *** No rule to make target 'scripts/xvfb-piglit.sh', needed by 'scripts/xvfb-piglit.sh.log'.  Stop.
    make[6]: Leaving directory '/home/pq/git/xserver/xorg-server-1.19.99.1/_build/sub/test'
    Makefile:1367: recipe for target 'check-TESTS' failed
    
    The setup to trigger this is:
      $ ./configure --prefix=/home/pq/local --disable-docs
      --disable-devel-docs --enable-xwayland --disable-xorg --disable-xvfb
      --disable-xnest --disable-xquartz --disable-xwin --enable-debug
    
    SCRIPT_TESTS is populated conditionally, but we should distribute the
    scripts in any case.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    (cherry picked from commit b365c5d16894a259dbf29db4ca2640d8ed768063)

commit 543287e60af5e9d91b5fc7e4a42e51eafa63db21
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 6 14:11:11 2016 -0500

    composite: Fix repaint of borders (v2)
    
    When going from border width zero to a non-zero border width, the
    Composite extension is informed via the ConfigNotify callback. The
    call-chain looks like this: compConfigNotify -> compReallocPixmap ->
    compSetPixmap -> TraverseTree -> compSetPixmapVisitWindow. However, at
    this time, pWindow->borderWidth was not yet updated. Thus, HasBorder()
    is false and the window border will not be repainted.
    
    To fix this, thread the new bw through to the window visitor, and
    inspect that rather than HasBorder(). For the other callers of
    compSetPixmap the border does not change size, so we can pass
    pWin->borderWidth instead.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98499
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit f31875510d818ba517f082e124adb294db906e51)

commit c24c9cc956038a61922f8b11ee68b8b0fc6b9f83
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Nov 22 14:53:20 2016 +0100

    randr: rrCheckPixmapBounding: do not shrink the screen_pixmap
    
    The purpose of rrCheckPixmapBounding is to make sure that the
    screen_pixmap is *large* enough for the slave-output which crtc is
    being configured.
    
    However until now rrCheckPixmapBounding would also shrink the
    screen_pixmap in certain scenarios leading to various problems.
    
    For example: Take a laptop with its internalscreen on a slave-output and
    currently disabled and an external monitor at 1920x1080+0+0.
    Now lets say that we want to drive the external monitor at its native
    resolution of 2560x1440 and have the internal screen mirror the top left
    part of the external monitor, so we run:
    
      $ xrandr --output eDP --mode 1920x1080 --pos 0x0 --output HDMI \
      --mode 2560x1440 --pos 0x0
    
    Here xrandr utility first calls RRSetScreenSize to 2560x1440, then it
    calls RRSetCrtc 1920x1080+0+0 on the eDP, since this is a slave output,
    rrCheckPixmapBounding gets called and resizes the screen_pixmap to
    1920x1080, undoing the RRSetScreenSize. Then RRSetCrtc 2560x1440+0+0
    gets called on the HDMI, depending on crtc->transforms this will
    either result in a BadValue error from ProcRRSetCrtcConfig; or
    it will succeed, but the monitor ends up running at 2560x1440
    while showing a 1920x1080 screen_pixmap + black borders on the right
    and bottom. Neither of which is what we want.
    
    This commit removes the troublesome shrinking behavior, fixing this.
    
    Note:
    
    1) One could argue that this will leave us with a too large screen_pixmap
    in some cases, but rrCheckPixmapBounding only gets called for slave
    outputs, so xrandr clients already must manually shrink the screen_pixmap
    after disabling crtcs in normal setups.
    
    2) An alternative approach would be to also call rrCheckPixmapBounding
    on RRSetCrtc on normal (non-slave) outputs, but that would result in
    2 unnecessary resizes of the screen_pixmap in the above example, which
    seems undesirable.
    
    Cc: Nikhil Mahale <nmahale@nvidia.com>
    Cc: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit a46afee84d45fbff4e4dad9376afc95bbcc31d7c)

commit 26132f57ee6fae9376955e7990ac2fbad5b49fac
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Nov 22 14:48:14 2016 +0100

    randr: rrCheckPixmapBounding: Do not substract crtc non 0 x,y from screen size
    
    The purpose of rrCheckPixmapBounding is to make sure that the
    screen_pixmap is large enough for the slave-output which crtc is
    being configured.
    
    This should include crtc->x and crtc->y, otherwise the crtc might
    still end up scanning out an area outside of the screen-pixmap.
    
    For example: Take a laptop with an external monitor on a slave-output at
    1920x1080+0+0 and its internal-screen at 3840x2160+1920+0 and in
    gnome-settings-daemon move the external monitor to be on the ri ght of
    the internal screen rather then on the left. First g-s-d will do a
    RRSetScreenSize to 5760*2160 (which is a nop), then it calls RRSetCrtc
    to move the slave output to 1920x1080+3840+0, since this is a slave
    output, rrCheckPixmapBounding gets called, since the 2 crtcs now overlap
    the code before this commit would shrinks the screen_pixmap to 3180*2160.
    Then g-s-d calls RRSetCrtc to move the internal screen to 3180*2160+0+0.
    
    And we end up with the slave-output configured to scan-out an area
    which completely falls outside of the screen-pixmap (and end up with
    a black display on the external monitor).
    
    This commit fixes this by not substracting the x1 and y1 coordinates
    of the union-ed region when determining the new screen_pixmap size.
    
    Cc: Nikhil Mahale <nmahale@nvidia.com>
    Cc: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 3b624aa9a9df86dc7d48149e0f18ca223b4355f1)

commit 6c51845e6b0f313a90e4375f2821f1da9cc53014
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Nov 30 09:42:43 2016 +0100

    xwayland: Fix use after free of cursors
    
    Sometimes, Xwayland will try to use a cursor that has just been freed,
    leading to a crash when trying to access that cursor data either in
    miPointerUpdateSprite() or AnimCurTimerNotify().
    
    CheckMotion() updates the pointer's cursor based on which xwindow
    XYToWindow() returns, and Xwayland implements its own xwl_xy_to_window()
    to fake a crossing to the root window when the pointer has left the
    Wayland surface but is still within the xwindow.
    
    But after an xwindow is unrealized, the last xwindow used to match the
    xwindows is cleared so two consecutive calls to xwl_xy_to_window() may
    not return the same xwindow.
    
    To avoid this issue, update the last_xwindow based on enter and leave
    notifications instead of xwl_xy_to_window(), and check if the xwindow
    found by the regular miXYToWindow() is a child of the known last
    xwindow, so that multiple consecutive calls to xwl_xy_to_window()
    return the same xwindow, being either the one found by miXYToWindow()
    or the root window.
    
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1385258
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Tested-by: Vít Ondruch <vondruch@redhat.com>
    Tested-by: Satish Balay <balay@fastmail.fm>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
    (cherry picked from commit 59ad0e6a416d8e23f9d962af67a16ee28ec7867b)

commit b711efb05714bf3d0a102c717a05cde4fefdae3f
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Thu Nov 3 09:59:30 2016 +0100

    glamor: restore vfunc handlers on init failure
    
    In glamor_init(), if the minimum requirements are not met, glamor may
    fail after setting up its own CloseScreen() and DestroyPixmap()
    routines, leading to a crash when either of the two routines is called
    if glamor failed to complete its initialization, e.g:
    
      (EE) Backtrace:
      (EE) 0:  Xwayland (OsSigHandler+0x29)
      (EE) 1: /lib64/libpthread.so.0 (__restore_rt+0x0)
      (EE) 2: Xwayland (glamor_sync_close+0x2a)
      (EE) 3: Xwayland (glamor_close_screen+0x52)
      (EE) 4: Xwayland (CursorCloseScreen+0x88)
      (EE) 5: Xwayland (AnimCurCloseScreen+0xa4)
      (EE) 6: Xwayland (present_close_screen+0x42)
      (EE) 7: Xwayland (dix_main+0x4f9)
      (EE) 8: /lib64/libc.so.6 (__libc_start_main+0xf1)
      (EE) 9:  Xwayland (_start+0x2a)
    
    Restore the previous CloseScreen() and DestroyPixmap() vfunc handlers in
    case of failure when checking for the minimum requirements, so that if
    any of the requirement is not met we don't leave the CloseScreen() and
    DestroyPixmap() from glamor handlers in place.
    
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1390018
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit f43207c1c4a8487600cf3ea116c10437417c861b)

commit 201ff45c2d7e6c7d73fd29d28871bb8b944074be
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Nov 11 15:28:50 2016 +1000

    Xi: when creating a new master device, update barries for all clients
    
    The previous code only worked when the barrier was created by the same client
    as the one calling XIChangeDeviceHierarchy.
    
    http://bugzilla.redhat.com/show_bug.cgi?id=1384432
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    (cherry picked from commit d6a6e1d6abb110ff00ad31b94cd29d92ca7c71a5)

commit 738c17b7ef4c70ad00c7bc01cf64edb770dda840
Author: Rui Matos <tiagomatos@gmail.com>
Date:   Thu Nov 24 19:56:18 2016 +0100

    xwayland: Don't send KeyRelease events on wl_keyboard::leave
    
    Commits 816015648ffe660ddaa0f7d4d192e555b723c372 and
    fee0827a9a695600765f3d04376fc9babe497401 made it so that
    wl_keyboard::enter doesn't result in X clients getting KeyPress events
    while still updating our internal xkb state to be in sync with the
    host compositor.
    
    wl_keyboard::leave needs to be handled in the same way as its
    semantics from an X client POV should be the same as an X grab getting
    triggered, i.e. X clients shouldn't get KeyRelease events for keys
    that are still down at that point.
    
    This patch uses LeaveNotify for these events on wl_keyboard::leave and
    changes the current use of KeymapNotify to EnterNotify instead just to
    keep some symmetry between both cases.
    
    On ProcessDeviceEvent() we still need to deactivate X grabs if needed
    for KeyReleases.
    
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 5611585b87ce48428a66f98ece319a083f55d205)

commit cd8f43e1b06aee8500548a94e3743cf153591683
Author: Rhys Kidd <rhyskidd@gmail.com>
Date:   Fri Oct 28 22:44:30 2016 -0400

    test: Fix stray Makefile reference to removed os test
    
    Fixes the following warning:
    
    test/Makefile.am:69: warning: variable 'os_LDADD' is defined but no program or
    test/Makefile.am:69: library has 'os' as canonical name (possible typo)
    
    Introduced upon the removal of test/os in:
    
    commit 6a5a4e60373c1386b311b2a8bb666c32d68a9d99
    Author: Keith Packard <keithp@keithp.com>
    Date:   Tue Dec 8 14:39:46 2015 -0800
    
        Remove SIGIO support for input [v5]
    
        This removes all of the SIGIO handling support used for input
        throughout the X server, preparing the way for using threads for input
        handling instead.
    
        Places calling OsBlockSIGIO and OsReleaseSIGIO are marked with calls
        to stub functions input_lock/input_unlock so that we don't lose this
        information.
    
        xfree86 SIGIO support is reworked to use internal versions of
        OsBlockSIGIO and OsReleaseSIGIO.
    
        v2: Don't change locking order (Peter Hutterer)
        v3: Comment weird && FALSE in xf86Helper.c
            Leave errno save/restore in xf86ReadInput
            Squash with stub adding patch (Peter Hutterer)
        v4: Leave UseSIGIO config parameter so that
            existing config files don't break (Peter Hutterer)
        v5: Split a couple of independent patch bits out
            of kinput.c (Peter Hutterer)
    
        Signed-off-by: Keith Packard <keithp@keithp.com>
        Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    
    Signed-off-by: Rhys Kidd <rhyskidd@gmail.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit cf8860786c3e301486cd2853bc82977ba75e6b17)

commit d6da2086951693e047fdd22b0d21c539ea1bb1e1
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 12 13:08:17 2016 -0500

    Revert "damage: Make damageRegionProcessPending take a damage not a drawable"
    
    The commit message makes the assertion that the code below damage is not
    allowed to change whether there's a damage monitor for the drawable.
    That turns out not to be the case! exa's mixed code, at least, will
    create and destroy a damage in PrepareAccess. The destroy path can then
    be catastrophic, as damageRegionProcessPending will attempt to
    RegionEmpty memory from the middle of a freed block.
    
    I'd wanted that invariant for performance, but faster isn't worth
    broken, so revert it. I think what exa's doing is reasonable, so the
    better way to improve performance for the unmonitored case is to either
    revisit dynamically wrapping into the GC, or inline damage into dix.
    
    This reverts commit 4e124203f2260daaf54155f4a05fe469733e0b97.
    
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1389886
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 32e632e85894eddc3ace83f16f1e973b1be478fe)

commit 7e5c9bdf73e4185ac4cf7f044da0793a5cc3e62c
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Nov 15 08:12:05 2016 -0800

    Bump version to 1.19.0
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit ea8efb3a997e15d27d362762e6c85d59487f9864
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Nov 2 13:25:33 2016 -0700

    dix: Make sure client is not in output_pending chain after closed (RH 1382444)
    
    I think it is possible that output could get queued to a client during
    CloseDownClient. After it is removed from the pending queue, active
    grabs are released, the client is awoken if sleeping and any work
    queue entries related to the client are processed.
    
    To fix this, move the call removing it from the output_pending chain
    until after clientGone has been set and then check clientGone in
    output_pending_mark.
    
    Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1382444
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit 7513da40a656317ad3aa101651d29373de99c798
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Nov 2 17:18:11 2016 +0200

    dri2: Sync i965_pci_ids.h from mesa
    
    Import changes from these mesa commits:
    85ea8deb26da420 i965: Removing PCI IDs that are no longer listed as Kabylake.
    bdff2e554735ed9 i956: Add more Kabylake PCI IDs.
    f1fa8b4a1ca73fa i965/bxt: Add 2x6 variant
    d1ab544bb883d04 i965/chv: Display proper branding
    20e8ee36627f874 i965/skl: Update Skylake renderer strings
    644c8a515192d28 i965/skl: Add two missing device IDs
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Timo Aaltonen <tjaalton@ubuntu.com>

commit 4cfee398726adf89db4b632ade7d6cab8b78282e
Author: Ian Ray <ian.ray@ge.com>
Date:   Wed May 25 10:41:53 2016 +0300

    xwayland-shm: block signals during fallocate
    
    posix_fallocate() does an explicit rollback if it gets EINTR, and
    this is a problem on slow systems because when the allocation size
    is sufficiently large posix_fallocate() will always be interrupted
    by the smart scheduler's SIGALRM.
    
    Changes since v1 - big comment in the code to explain what is going on
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Ian Ray <ian.ray@ge.com>
    Acked-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    Acked-by: Daniel Stone <daniels@collabora.com>

commit 512e75a23b7f6339593c3ae6942f0c420a975fd3
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 09:32:42 2016 -0700

    Bump to 1.18.99.902 (1.19 RC2)
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit c85f81825e196e96337347e0ce3a538fb2e38f16
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 09:28:32 2016 -0700

    dix: Bump MAXHASHSIZE for the resource db [v2]
    
    [This was originally a workaround for a client-side resource leak:
    
    http://lists.freedesktop.org/archives/xorg-devel/2012-November/034555.html
    
    Obviously that's a broken app, but the performance problem it
    illustrates - that walking the linked list ends up burning all your CPU
    time - is real enough. - ajax]
    
    v2: Replace with a shorter code sequence which computes the same
        results for all but numBits == 7
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit 356db2340f5b473a7191c7969586ca5b0396c48f
Merge: 9ed5b26 03d99ef
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 09:05:54 2016 -0700

    Merge remote-tracking branch 'jturney/master'

commit 9ed5b263542e5245317927828f0515db6c0a54c8
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Oct 28 08:04:43 2016 -0700

    os: Recompute whether any clients are ready after ProcessWorkQueue() (bug 98030)
    
    If a work proc wakes up a sleeping client and it is ready to execute,
    we need to re-compute the local 'are_ready' value before deciding
    what timeout value to use in WaitForSomething.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98030
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit 2c91f3235a4e1655e18cb014922529161051ffbb
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Oct 5 09:41:44 2016 -0700

    ephyr: Leave window unmapped for -glamor-skip-present [v2]
    
    If we're never painting anything in the window, we probably don't need
    to map it.
    
    v2: Drop ephyr_glamor_gles2 from hostx.c
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>

commit cba5a10fd93310702cad9dbe1e6d48da99f5552f
Author: Alex Goins <agoins@nvidia.com>
Date:   Wed Oct 26 11:03:49 2016 -0700

    ramdac: Check sPriv != NULL in xf86CheckHWCursor()
    
    xf86CheckHWCursor() would dereference sPriv without NULL checking it. If Option
    "SWCursor" is specified, sPriv == NULL. In this case we should assume that HW
    cursors are not supported.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    Reviewed-by: Andy Ritger <aritger@nvidia.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit 03d99ef729178dd99268f185fb45320a29382091
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Thu Oct 6 22:13:07 2016 +0100

    glx/dri2: Don't build DRI loader if DRI2 isn't enabled
    
    This partially reverts 501d8e2b.
    
    Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

commit 5cb328338684d8e5b03913c47475bfcd7acffec4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Oct 26 12:21:16 2016 +0200

    inputthread: On Linux leave the main thread's name as-is
    
    On Linux, setting the main thread's name changes the program name
    (/proc/self/comm). Setting it to MainThread breaks scripts that rely on
    the command name, e.g. ps -C Xorg.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

commit 007f8ee61a35ceda36b43e772a9a1074b8e27a06
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Fri Oct 21 10:11:45 2016 +0200

    xwayland: Activate and enable touch devices
    
    On some random condition, a touch event may trigger a crash in Xwayland
    in GetTouchEvents().
    
    The (simplified) backtrace goes as follow:
    
     (gdb) bt
     #0  GetTouchEvents() at getevents.c:1892
     #1  QueueTouchEvents() at getevents.c:1866
     #2  xwl_touch_send_event() at xwayland-input.c:652
     #5  wl_closure_invoke() from libwayland-client.so.0
     #6  dispatch_event() from libwayland-client.so.0
     #7  wl_display_dispatch_queue_pending() from libwayland-client.so.0
     #8  xwl_read_events() at xwayland.c:483
     #9  ospoll_wait() at ospoll.c:412
     #10 WaitForSomething() at WaitFor.c:222
     #11 Dispatch() at dispatch.c:412
     #12 dix_main() at main.c:287
     #13 __libc_start_main() at libc-start.c:289
     #14 _start ()
    
    The crash occurs when trying to access the sprite associated with the
    touch device, which appears to be NULL. Reason being the device itself
    is more a keyboard device than a touch device.
    
    Moreover, it appears the device is neither enabled nor activated
    (inited=0, enabled=0) which doesn't seem right, but matches the code in
    init_touch() from xwayland-input.c which would enable the device if it
    was previously existing and otherwise would create the device but not
    activate it.
    
    Make sure we do activate and enable touch devices just like we do for
    other input devices such as keyboard and pointer.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit f68ba7b81ffe765380664fccc92f3e689c6c48c2
Author: Rui Matos <tiagomatos@gmail.com>
Date:   Tue Oct 25 19:24:49 2016 +0200

    xwayland: Transform pointer enter event coordinates
    
    Pointer enter event coordinates are surface relative and we need them to
    be screen relative for pScreen->SetCursorPosition().
    
    https://bugzilla.gnome.org/show_bug.cgi?id=758283
    
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

commit f5c6d751d08c6de77c2ca49ba2a48f8023758cef
Author: Nikhil Mahale <nmahale@nvidia.com>
Date:   Sat Oct 22 17:40:51 2016 +0530

    modesetting: unifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
    
    Commit c7e8d4a6ee9542f56cd241cf7a960fb8223a6b22 had already unifdef
    MODESETTING_OUTPUT_SLAVE_SUPPORT but commit
    9257b1252da9092ddc676fec9aabe2b33dfad272 didn't notice that.
    
    Signed-off-by: Nikhil Mahale <nmahale@nvidia.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

commit 4aaeeda4774397dd6d80aa240ca623ae795ec5dc
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Oct 18 16:10:19 2016 +0200

    xfree86: Xorg.wrap: Do not require root rights for cards with 0 outputs
    
    Prior to this commit the Xorg.wrap code to detect if root rights are
    necessary checked for DRM_IOCTL_MODE_GETRESOURCES succeeding *and*
    reporting more then 0 output connectors.
    
    DRM_IOCTL_MODE_GETRESOURCES succeeding alone is enough to differentiate
    between old drm only cards (which need ums and thus root) and kms capable
    cards.
    
    Some hybrid gfx laptops have 0 output connectors on one of their 2 GPUs,
    resulting in Xorg needlessly running as root. This commits removes the
    res.count_connectors > 0 check, fixing this.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>

commit 7d91063aca4e4d326c294e246bc2dc36cb05318e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Oct 17 18:48:44 2016 +0900

    DRI2: Sync radeonsi_pci_ids.h from Mesa
    
    Fixes DRI2 client driver name mapping for newer AMD GPUs with the
    modesetting driver, allowing the DRI2 extension to initialize.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

commit f6ff2e974c5de3071c899eba828789f1d4d8645a
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Sat Oct 15 04:13:43 2016 +0000

    modesetting: fix glamor ifdef
    
    Add a missing ifdef needed for --disable-glamor.
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>
    Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

commit 8fee6a917b6468e1b116d922f86484498874fb5c
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Fri Oct 14 02:40:59 2016 +0000

    xwin: make glx optional again
    
    Commit 501d8e2b removed --enable-aiglx, but made xwin always be
    --enable-glx.
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Jon Turney <jon.turney@dronecode.org.uk>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>

commit d13cb974426f7f1110b0bdb08c4ebb46ff8975f7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri Oct 21 06:27:57 2016 +1000

    ddx: add new call to purge input devices that weren't added
    
    Special case for the systemd-logind case in xfree86: when we're vt-switched
    away and a device is plugged in, we get a paused fd from logind. Since we
    can't probe the device or do anything with it, we store that device in the
    xfree86 and handle it later when we vt-switch back. The device is not added to
    inputInfo.devices until that time.
    
    When the device is removed while still vt-switched away, the the config system
    never notifies the DDX. It only runs through inputInfo.devices and our device
    was never added to that.
    
    When a device is plugged in, removed, and plugged in again while vt-switched
    away, we have two entries in the xfree86-specific list that refer to the same
    device node, both pending for addition later. On VT switch back, the first one
    (the already removed one) will be added successfully, the second one (the
    still plugged-in one) fails. Since the fd is correct, the device works until
    it is removed again. The removed devices' config_info (i.e. the syspath)
    doesn't match the actual device we addded tough (the input number increases
    with each plug), it doesn't get removed, the fd remains open and we lose track
    of the fd count. Plugging the device in again leads to a dead device.
    
    Fix this by adding a call to notify the DDX to purge any remainders of devices
    with the given config_info, that's the only identifiable bit we have at this
    point.
    
    https://bugs.freedesktop.org/show_bug.cgi?id=97928
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit 8fcf2fa78f09257933b17e7dc9a03a2034e3076f
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 20 15:45:46 2016 +1000

    xfree86: swap the list of paused devices to an xorg_list
    
    No functional changes but it makes it easier to remove elements from the
    middle of the list (future patch).
    
    We don't have an init call into this file, so the list is manually
    initialized.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit 28d8855cd4e3be8831fb1c17bf1d205bd8465d1e
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Thu Oct 20 15:25:51 2016 +1000

    xfree86: use the right option traversal list to search for an option
    
    They're identically laid-out structs but let's use the right type to search
    for our desired value.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit 7fc96fb02dade4a86f2fc038f3cf5f2d9c0cda00
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Fri Oct 21 19:06:00 2016 +0100

    glamor: don't look for non-existing EGL_KHR_platform_base
    
    The extension does not exist in the registry, thus needs to know they're
    using EGL 1.5 in order to determine the eglGetPlatformDisplay function
    pointer is valid.
    
    Thus brings us into some lovely circular dependency.
    
    Since mesa won't be able (in the foreseeable future) to export the KHR
    flavour of extension (another way one could assume that EGL 1.5 is
    available) just drop all the heuristics and use the
    EGL_EXT_platform_base extension.
    
    In practise (checked with the Mali driver) any EGL 1.5 driver will
    advertise support for EGL_EXT_platform_base.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>

commit 5dcb0666b82f5ab00f3d22e86f05ac14b0d5341e
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Sat Oct 15 17:59:05 2016 +0000

    os/inputthread: Ensure pollfd refreshing
    
    When putting a device node into a poll-request list, do not overwrite a
    "please-remove" element with the same fd, so that a closed device file
    is ospoll_remove'd prior to being ospoll_add'ed.
    
    Before, the opposite order was possible, resulting in ospoll_add
    considering the newly opened file being already polled, should it have a
    fd for which the "please-remove" has not been procesed yet. In this
    case, no further events would be seen from the device.
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>
    Regressed-in: 52d6a1e832a5e62289dd4f32824ae16a78dfd7e8
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97880
    Patchwork: https://patchwork.freedesktop.org/patch/113763/
    Hit-and-Reduced-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-and-Reduced-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>

commit 9cf0bd4d4507dca6234024605b14724713f2109e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 5 18:28:45 2016 +0900

    xf86Cursor: Take the input lock in xf86Set/MoveCursor
    
    Prevents the HW cursor from intermittently jumping around when the
    cursor image is changed while the cursor is being moved. This is hardly
    noticeable in normal operation but can be quite confusing when stepping
    through these codepaths in a debugger.
    
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit 011ce3297d924e78ef0254b0451561946bd8be8d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 5 18:01:29 2016 +0900

    xf86Cursor: Use PRIME master xf86CursorScreenRec::HotX/Y for slaves
    
    xf86CursorScreenRec::HotX/Y contain 0 for PRIME slave screens.
    
    Fixes incorrect HW cursor position on PRIME slave screens.
    
    Also hoist the hotspot translation out from xf86ScreenSet/MoveCursor to
    xf86Set/MoveCursor, since the hotspot position is a property of the
    cursor, not the screen.
    
    v2:
    * Squash patches 1 & 2 of the v1 series, since it's basically the same
      problem
    * Use the master screen's xf86CursorScreenRec::HotX/Y instead of
      CursorRec::bits->x/yhot, since CursorRec::bits can be NULL (Hans de
      Goede)
    
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>

commit e3f53aa3a8dfc323c75837cd41e35b8e895d547e
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Oct 6 14:42:34 2016 -0400

    glx/dri2: Don't include drm headers
    
    They're not needed, and they won't be present on win32.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Emil Velikov <emil.l.veikov@gmail.com>

commit 97a8353ec1192d8d3bd2ebb99e5687cb91427e09
Author: Peter Harris <pharris@opentext.com>
Date:   Thu Sep 29 11:17:48 2016 -0400

    Fix id in error when resource does not exist
    
    Always set client->errorValue before returning an error.
    
    Test program:
    
    int main(int argc, char *argv[]) {
        int screen = 0;
        xcb_connection_t *c = xcb_connect(NULL, &screen);
        if (!c) {
            printf("Cannot connect\n");
