commit 8b312db7d1d98be67f0283d982428545cf948a66
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jul 19 13:27:08 2016 -0400

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

commit 42a74080ffe93502904ede7555652f01ab11d12d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 30 18:23:04 2016 +0900

    os: Use strtok instead of xstrtokenize in ComputeLocalClient
    
    Fixes leaking the memory pointed to by the members of the array returned
    by xstrtokenize.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit e156c0ccb530897d3a428255bd5585f7ea7b9b41)

commit 3c4cead499f10dabac20ab87728746ec41dae799
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Mar 28 18:11:09 2016 +0900

    os: Treat ssh as a non-local client (v4)
    
    By the time we get to ComputeLocalClient, we've already done
    NextAvailableClient → ReserveClientIds → DetermineClientCmd (assuming
    we're built with #define CLIENTIDS), so we can look up the name of the
    client process and refuse to treat ssh's X forwarding as if it were
    local.
    
    v2: (Michel Dänzer)
        * Only match "ssh" itself, not other executable names starting with
          that prefix.
        * Ignore executable path for the match.
    v3: (Michel Dänzer)
        * Use GetClientCmdName (Mark Kettenis)
        * Perform check on Windows as well, but only ignore path on Cygwin
          (Martin Peres, Emil Velikov, Jon Turney)
    v4: (Michel Dänzer)
        * Cut of any colon and whatever comes after it. (Adam Jackson)
        * Add bugzilla reference.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93261
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit adefbaee499b9679c6cac21f52ec6545af2b36b5)

commit aebfc6ad9be5bd33b7e0a813d424c81d6214ab07
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jul 1 12:34:20 2016 +0900

    glamor: Translate solid text background region after clipping
    
    Fixes incorrect clipping for redirected windows which don't happen to be
    located at the top left corner of the screen.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96742
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit e8e36755abb17872d669b88d33ca9adc511029a0)

commit 7a08d8d82007367a90197f9e9d549dbf0bc9ca2e
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jul 12 10:04:18 2016 -0400

    xfree86: Fix fallback driver sort order for Xorg -configure (v2)
    
    The intent here was that fallback drivers would be at the end of the
    list in order, but if a fallback driver happened to be at the end of the
    list already that's not what would happen. Rather than open-code
    something smarter, just use qsort.
    
    Note that qsort puts things in ascending order, so somewhat backwardsly
    fallbacks are greater than native drivers, and vesa is greater than
    modesetting.
    
    v2: Use strcmp to compare non-fallback drivers so we get a predictable
    result if your libc's qsort isn't stable (Keith Packard)
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 32a9504c69183485b0b796fa3966cd1e39992365)

commit 8ff830d1ea4c3572b8fb770009c73c40007e132a
Author: Andrew Eikum <aeikum@codeweavers.com>
Date:   Wed Jul 6 14:13:09 2016 -0500

    shm: Also censor images returned by ShmGetImage
    
    We currently censor images from dix's GetImage, but not from
    ShmGetImage. This is a method to bypass XACE, creating a potential
    leak. We should censor in both methods.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
    (cherry picked from commit 4926845a57fa8b53e18ea7d3434bf5539e9b7782)

commit d4cbb1155a79a3dc1dc74cc155dbcfc303273856
Author: Rui Matos <tiagomatos@gmail.com>
Date:   Wed Jul 13 19:19:09 2016 +0200

    xwayland: Update RR state on wl_output.done instead of wl_output.mode
    
    Otherwise if the geometry changes but the mode doesn't we end up with
    the previous geometry from RR's point of view.
    
    Fixes https://bugzilla.gnome.org/show_bug.cgi?id=768710
    
    Reviewed-by: Jonas Ådahl <jadahl@gmail.com>
    Signed-off-by: Rui Matos <tiagomatos@gmail.com>
    (cherry picked from commit cf6730c503f8090a5d1b80918fe253fc2c5bc090)

commit 65c5eab6000f108762b7ef6b63869525222ff99d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jun 28 17:22:47 2016 +0900

    dix: Work around non-premultiplied ARGB cursor data
    
    Some games incorrectly use non-premultiplied ARGB cursor data, presumably
    because that's what Windows uses. On some hardware (and with SWcursor),
    this breaks areas of the cursor which are supposed to be transparent
    (and presumably also translucent areas, but that's less noticeable).
    
    This change checks for pixels with alpha == 0 and any non-alpha component
    != 0. If any such pixel is found, the data is assumed to be
    non-premultiplied and fixed up by multiplying the RGB components with the
    alpha component.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92309
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 401a8d6e1379133863e3271374dc21850d0d3cab)

commit c0b02ce45f48450d2896a424dc1eb9a2827ed4c5
Author: Hans De Goede <hdegoede@redhat.com>
Date:   Thu Jul 7 10:55:04 2016 +0200

    linux: Do not try to open /dev/vc/0, fix error msg when /dev/tty0 open fails
    
    /dev/vc/0 is a devfs thing which is long dead, so stop trying to open
    /dev/vc/0, besides being a (small) code cleanup this will also fix the
    "parse_vt_settings: Cannot open /dev/tty0 (%s)\n" error message to
    display the actual error, rather then the -ENOENT from also trying
    /dev/vc/0.
    
    BugLink: https://patchwork.freedesktop.org/patch/8768/
    Reported-by: Chad Versace <chad.versace@linux.intel.com>
    Suggested-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Reviewed-by: Chad Versace <chad.versace@intel.com>
    (cherry picked from commit 033888e7766d226a179357d970223428c19c4b53)

commit b377a806693ec86df1743d7ddd5a931c88050ebb
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Jul 18 12:46:51 2016 -0400

    modesetting: resubmit dirty rects on EINVAL (v2)
    
    This error code can mean we're submitting more rects at once than the
    driver can handle. If that happens, resubmit one at a time.
    
    v2: Make the rect submit loop more error-proof (Walter Harms)
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Michael Thayer <michael.thayer@oracle.com>
    (cherry picked from commit 4b311d23e84356bd0e9e736aeed7448dd6382118)

commit f091528457cc62fa9bd6cd24aeebacffb7296419
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jul 22 12:14:06 2015 -0400

    modesetting: Implement 32->24 bpp conversion in shadow update
    
    24bpp front buffers tend to be the least well tested path for client
    rendering.  On the qemu cirrus emulation, and on some Matrox G200 server
    chips, the hardware can't do 32bpp at all.  It's better to just allocate
    a 32bpp shadow and downconvert in the upload hook than expose a funky
    pixmap format to clients.
    
    [ajax: Ported from RHEL and separate modesetting driver, lifted kbpp
    into the drmmode struct, cleaned up commit message, fixed 16bpp]
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlied <airlied@redhat.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    [hdegoede@redhat.com: rebase, also use kbpp for rotate shadow fb]
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    
    (cherry picked from commit 21217d02168d1883b2d1f64399aec494f96a8b9d)

commit d8eccab378dd8fe5a36dd31ff91561da47ec9ecf
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Jun 1 15:14:32 2016 +0200

    modesetting: Only add main fb if necessary
    
    If we're doing reverse-prime; or doing rotation the main fb is not used,
    and there is no reason to add it in this case.
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 4313122dea0df9affc280ee698e929489061ccc6)

commit 23a7010f3438e053f66c9fb0c4a13456fe33bf72
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jul 19 13:08:31 2016 -0400

    Revert "modesetting: Load on GPU-s with 0 outputs"
    
    This reverts commit 713a21cc702561931ed5e84c3a5c3d7e7c580725.

commit effd785aa8a97c9a044d86bde7ad63645cbca176
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Feb 16 17:00:55 2015 +0100

    modesetting: Fix hw cursor check at the first call
    
    With the previous patch, the modesetting driver can now return whether
    the driver supports hw cursor.  However, it alone doesn't suffice,
    unfortunately. drmmode_load_cursor_argb_check() is called in the
    following chain:
    
      xf86CursorSetCursor()
        -> xf86SetCursor()
           -> xf86DriverLoadCursorARGB()
             -> xf86_load_cursor_argb()
               -> xf86_crtc_load_cursor_argb()
                 -> drmmode_load_cursor_argb_check()
    
    *but* at first with drmmode_crtc->cursor_up = FALSE.  Then the
    function doesn't actually set the cursor but returns TRUE
    unconditionally.  The actual call of drmmode_set_cursor() is done at
    first via the show_cursor callback, and there is no check of sw cursor
    fallback any longer at this place. Since it's called only once per
    cursor setup, so the xserver still thinks as if the hw cursor is
    supported.
    
    This patch is an ad hoc fix to correct the behavior somehow: it does
    call drmmode_set_cursor() at the very first time even if cursor_up is
    FALSE, then quickly hides again.  In that way, whether the hw cursor
    is supported is evaluated in the right place at the right time.
    
    Of course, it might be more elegant if we have a more proper mechanism
    to fall back to sw cursor at any call path.  But it'd need more
    rework, so I leave this workaround as is for now.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit af916477c65a083ec496ac3f088d766b410e8b6e)

commit 61094504a774ac763cb457d1f4bf2a1476e03f56
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Feb 16 17:00:54 2015 +0100

    modesetting: Use load_cursor_argb_check for sw cursor fallback
    
    The modesetting driver still has an everlasting bug of invisible
    cursor on cirrus and other KMS drivers where no hardware cursor is
    supported.  This patch is a part of an attempt to address it.
    
    This patch particularly converts the current load_cursor_argb callback
    of modesetting driver to load_cursor_argb_check so that it can return
    whether the driver handles the hw cursor or falls back to the sw
    cursor.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    [hdegoede@redhat.com: Add extra comment suggested by Kenneth]
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    
    (cherry picked from commit 14c21ea1c9496638b1feb8e6145c440fb4f1d14b)

commit 15f8aaa786ac89509843f22dcb5f446effba1024
Author: Takashi Iwai <tiwai@suse.de>
Date:   Mon Feb 16 17:00:53 2015 +0100

    modesetting: Fix the error check from DRM_IOCTL_MODE_CURSOR2
    
    The error value isn't always -EINVAL, e.g. the kernel drm core returns
    -ENXIO when the corresponding ops doesn't exist.  Without this fix,
    DRM_IOCTL_MODE_CURSOR2 would be dealt as success even if it
    shouldn't.
    
    Signed-off-by: Takashi Iwai <tiwai@suse.de>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 074cf58769b38550a3f35d5ecb73333330cb2aed)

commit ee0fd6b2c68d88ef3511fe1796dd50601785ead0
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jun 28 11:42:41 2016 +1000

    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 <peter.hutterer@who-t.net>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    (cherry picked from commit d135100d6b17e54262a12aeaebe0fe2fe48da3bb)

commit 54ba95861e5ae54051d3963e5e7ced7d69a6de7b
Author: Guilherme Quentel Melo <gqmelo@gmail.com>
Date:   Tue May 10 00:29:58 2016 +0000

    glx: avoid memory leak when using indirect rendering
    
    When multiple processes are using GL with indirect rendering a race
    condition can make drawables refcount never drop to zero.
    
    This situation could happen when there are many X clients using indirect
    GLX:
    
    1 - client1: calls glXMakeCurrent
    
    2 - client2: calls glXMakeCurrent
    This is the first context switch for this client. So old_context_tag=0
    
    3 - client1: calls glXRender
    For the client, its context is already current.
    For the server side lastGLContext points to client2's context.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Guilherme Quentel Melo <gqmelo@gmail.com>
    (cherry picked from commit a134d1e7eada0ac90fb622f45833c87b72c9aa06)

commit be8eb5c4a1dda472d54f96bd54ee3e9421daf2e7
Author: Keith Packard <keithp@keithp.com>
Date:   Tue Jun 14 17:09:07 2016 -0700

    glamor: Use DestroyPixmap instead of FreePicture for glyph atlas pixmap
    
    Nice of FreePicture to take a void * instead of a PicturPtr so that
    this error wasn't caught by the compiler.
    
    Noticed when resetting the X server left a dangling pixmap around.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 2d6230e77348e550c90e00c007b113ce38c81d12)

commit 5c549168a2947c56727a7546baee21d04c46d563
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Mon Jun 6 09:22:28 2016 +0200

    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 <ofourdan@redhat.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96246
    (cherry picked from commit edd24aa50b17849b904a3ac5429e333bac9bac9c)

commit f05a5859102409fe203bcffa96c0231c8b406659
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jun 3 10:25:20 2016 +0900

    xwayland: Call eglBindAPI after eglInitialize
    
    Current Mesa Git master checks that the EGL display actually supports
    the API passed to eglBindAPI, which can only succeed after
    eglInitialize.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    (cherry picked from commit 166d4c817897f5aa197f639bf06b5b3e04994496)

commit e4bf0e5ad5503c9a1d08080bca0b826ac64bd389
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jun 3 10:25:19 2016 +0900

    glamor: Call eglBindAPI after eglInitialize
    
    Current Mesa Git master checks that the EGL display actually supports
    the API passed to eglBindAPI, which can only succeed after
    eglInitialize.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96344
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit d798b8318adf298bc23166e74f31e49805f0d881)

commit e02d2174570e42800c21a2205f83dd286881469f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu May 26 19:01:59 2016 +0900

    glamor: Cannot use copies when accessing outside of composite source
    
    Commit b64108fa ("glamor: Check for composite operations which are
    equivalent to copies") failed to copy conditions from exaComposite which
    ensure that the composite operation doesn't access outside of the source
    picture.
    
    This fixes rendercheck regressions from the commit above.
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 5ff75da317539e87cca429185d710d0eeb9d9222)

commit f5b224a0e20f1d44d4ab1aeeddbb4e2d40dec998
Author: Keith Packard <keithp@keithp.com>
Date:   Fri May 27 10:55:02 2016 -0700

    glamor: Adjust for drawable x/y in composite's copy optimization
    
    Patch b64108fa305e956e4edaae9d53071ff0abee268e added a short cut that
    identifies composite operations that can be performed with a simple
    copy instead.
    
    glamor_copy works in absolute coordinates, so the dx and dy values
    passed in need to be converted from drawable-relative to absolute by
    adding the drawable x/y values.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 8b9b4387e8473810f6174519ee76818fcaae725d)

commit fad7cab684199b7a0e721e59bb25b1eb6f1a9aa8
Author: Keith Packard <keithp@keithp.com>
Date:   Fri May 13 16:19:38 2016 -0700

    glamor: Preserve GL_RED bits in R channel when destination is GL_RED [v2]
    
    A1 and A8 pixmaps are usually stored in the Red channel to conform
    with more recent GL versions. When using these pixmaps as mask values,
    that works great. When using these pixmaps as source values, then the
    value we want depends on what the destination looks like.
    
    For RGBA or RGB destinations, then we want to use the Red channel
    for A values and leave RGB all set to zero.
    
    For A destinations, then we want to leave the R values in the Red
    channel so that they end up in the Red channel of the output.
    
    This patch adds a helper function, glamor_bind_texture, which performs
    the glBindTexture call along with setting the swizzle parameter
    correctly for the Red channel. The swizzle parameter for the Alpha
    channel doesn't depend on the destination as it's safe to leave it
    always swizzled from the Red channel.
    
    This fixes incorrect rendering in firefox for this page:
    
    	https://gfycat.com/HoarseCheapAmericankestrel
    
    while not breaking rendering for this page:
    
    	https://feedly.com
    
    v2: Add change accidentally left in patch for missing
        glDisable(GL_COLOR_LOGIC_OP).
        Found by Emil Velikov <emil.l.velikov@gmail.com>
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63397
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Tested-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 181a4bd0cc436f89582408196038ff37032f9bac)

commit 0c9a6d4093d6cdfadecb9a703cfb090e43ccf6aa
Author: Keith Packard <keithp@keithp.com>
Date:   Sat May 14 08:22:17 2016 -0700

    glamor: glamor_make_current sooner in glamor_composite_with_shader
    
    glamor_make_current is supposed to be called before any GL APIs.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit b07bc700b3cf2f5c8912fc5b9e0dad2baf395525)

commit e63e9b8f197889b6c162ba36988d6e5656cb0c10
Author: Keith Packard <keithp@keithp.com>
Date:   Fri May 13 04:25:43 2016 -0700

    glamor: Disable logic ops when doing compositing [v4]
    
    If the logic op gets left enabled, it overrides the blending
    operation, causing incorrect contents on the display.
    
    v2: Disable only on non-ES2, but disable even for PictOpSrc
    
    v3: Found another place this is needed in
        glamor_composite_set_shader_blend
    
    v4: Remove change dependent on new glamor_set_composite_texture
        API. This belongs in a different patch.
        Found by Emil Velikov <emil.l.velikov@gmail.com>
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 743b6f231e999d8b2909228412266dc13cc433c5)

commit d37329cba42fa8e72fe4be8a7be18e512268b5bd
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed May 25 19:09:23 2016 +0900

    glamor: Check for composite operations which are equivalent to copies
    
    Increases x11perf -compwinwin500 numbers by a factor of 10 for me with
    radeonsi.
    
    Conditions copied from exaComposite().
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit b64108fa305e956e4edaae9d53071ff0abee268e)

commit 009304ef129f21b286086f3c841b60c5f865241a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 24 18:12:42 2016 +0900

    glamor: Fix sampling outside of RGBx source/mask pictures
    
    RENDER requires that sampling outside of any source/mask picture results
    in alpha == 0.0.
    
    The OpenGL border colour cannot set alpha = 0.0 if the texture format
    doesn't have an alpha channel, so we have to use the RepeatFix handling
    in that case.
    
    Also, only force alpha = 1.0 when sampling inside of RGBx source/mask
    pictures.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94514
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 4711ebc174206b5a50e6ae8a7f974cd835e4ebd3)

commit 888e5f636a32945b0a1f59d6db6e143d094cc2a0
Author: Andrew Comminos <andrew@comminos.com>
Date:   Tue Dec 29 23:41:27 2015 -0800

    Input: Send XI2 FocusOut NotifyPointer events to the pointer window.
    
    This changes XInput 2's propagation of NotifyPointer focus out events to
    include the pointer window as well, similar to core events. This fixes
    a potential permanent focus in GDK when the focus moves to PointerRoot.
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=93539
    
    Signed-off-by: Andrew Comminos <andrew@comminos.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 2fbf5c2f91d33efbda573c4be036248b1d8ed7f1)

commit 81bd4fc18c407ebe8e535ffbe83b7578261e1643
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Apr 1 18:24:00 2016 +0900

    EXA: Honour op parameter to exaGlyphs even if maskFormat == NULL
    
    Reported-by: Uli Schlachter <psychon@znc.in>
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94775
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Uli Schlachter <psychon@znc.in>
    (cherry picked from commit 140c2f1a54dbc2503311e9a011e841aa1f277cbd)

commit e849aecb65aabe2fc6abeab6e0ab0a721710c25c
Author: Andreas Schwab <schwab@suse.de>
Date:   Thu Apr 28 14:47:33 2016 +0200

    x86emu: Change include order to avoid conflict with system header
    
    R_SP is also defined in <sys/ucontext.h> on m68k.  Also remove duplicate
    definitions.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Andreas Schwab <schwab@suse.de>
    (cherry picked from commit 23dfa017298ceceac818f83779858e490c7757b6)

commit 0f947779c7afcdaf246849b627c13a11987a4bbf
Author: Dave Airlie <airlied@redhat.com>
Date:   Fri Mar 11 09:22:00 2016 +1000

    glamor: add glamor_finish API
    
    Some drivers are calling glFinish, they really should be doing this.
    
    This also is needed for some reverse prime scenarios.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit aa4e757130010dd3202f10ec6cb0c306c1dbcfbc)

commit d25bb3ae9de1661ed0988a44119abeb52d52d4b7
Author: Marek Chalupa <mchqwerty@gmail.com>
Date:   Mon Apr 25 11:33:00 2016 +0200

    xwayland-shm: fortify fallocate against EINTR
    
    If posix_fallocate or ftruncate is interrupted by signal while working,
    we return -1 as fd and the allocation process returns BadAlloc error.
    That causes xwayland clients to abort with 'BadAlloc (insufficient
    resources for operation)' even when there's a lot of resources
    available.
    
    Fix it by trying again when we get EINTR.
    
    Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
    Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>
    (cherry picked from commit f48b0534f110397246809d279225afedb28aa233)

commit acbfff1d3b27bb71faf2fe95061de8414b536004
Author: Alexandre Courbot <acourbot@nvidia.com>
Date:   Wed Mar 23 13:47:37 2016 +0900

    configure.ac: Keep environment CFLAGS when testing
    
    DRI2 detection could fail if configure is invoked with a sysroot passed
    as CFLAGS. Ideally configure should invoke gcc with the sysroot argument
    passed to the configure script, but for some reason this is not done by
    AC_COMPILE_IFELSE.
    
    Fix this by ensuring CFLAGS are preserved when checking for stuff.
    
    Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
    (cherry picked from commit 4cc32880737c2d3e568fdb4867b2dba10fb3998a)

commit 1c811298eb953bb56e2ca05b1a881f88c0703df3
Author: Simon Thum <simon.thum@gmx.de>
Date:   Tue Apr 5 14:29:47 2016 +0200

    dix/ptraccel: Fix memory leak in InitPredictableAccelerationScheme
    
    This was quite unlikely except in situations where a proper startup
    would have been impossible anyway, but since automated checks don't
    grade likelyhood just fix it.
    
    Detected by Jeremy Huddleston's clang checks.
    
    Signed-off-by: Simon Thum <simon.thum@gmx.de>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit c8e5fc30575a309c25970fc68b9184c07bb74df4)

commit 51441379a35077e868dae86e6b24cfa31d6dd1f8
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Thu Mar 17 09:53:58 2016 +0100

    glamor: fix wrong offset on composite rectangles
    
    When using PictOpSrc, the destination is wrongly shifted back to (0, 0).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94568
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit 8437955515ad59b0bfcd6598248e7f0ffc706370)

commit 713a21cc702561931ed5e84c3a5c3d7e7c580725
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Tue Jun 14 11:58:01 2016 +0200

    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 <hdegoede@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    (cherry picked from commit 60ad701a6a8cb9f1eacb72acfe2cb8d3b7a865dc)

commit a9f970fe28d76bd2c57b44aa02ac38eb8aab8acf
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Thu Jun 16 15:21:03 2016 +0200

    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 <hdegoede@redhat.com>
    Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
    (cherry picked from commit 94a1c77259ce39ba59ad87615df39b570ffab435)

commit 0dc1a58b9379c79ede8c40b2e6f008dc0868a40e
Author: Lyude Paul <cpaul@redhat.com>
Date:   Mon Jun 13 15:31:02 2016 -0400

    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 <cpaul@redhat.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 848089e0dde38f043c85332785520946103e77c1)

commit 619730cac614ff8306e17edd07ae860051c700b7
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Jun 1 14:59:38 2016 +0200

    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 <hdegoede@redhat.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit b8ef71fb07a8ba9587aeaca942b4de20b59266ca)

commit 768e40e6c41dba3c7039db437d7b5be36f1477f5
Author: Dave Airlie <airlied@gmail.com>
Date:   Fri Apr 29 14:01:33 2016 +1000

    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 <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 2378adde6770385c06f7efcd32f270d00d49ce3f)

commit 69f9319568609f23cf313995cd65400180de9345
Author: Dave Airlie <airlied@gmail.com>
Date:   Fri Apr 29 14:01:32 2016 +1000

    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 <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 258588224d6b35de12f97d9092efa5cb3e426550)

commit 5b4ced6d3a4c309e1792ac49017fb961a7262e7f
Author: Dave Airlie <airlied@gmail.com>
Date:   Fri Apr 29 14:01:31 2016 +1000

    modesetting: set driverPrivate to NULL after closing fd.
    
    Otherwise ms_ent_priv will return NULL and things will fall apart.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit a41a171bcbae9aeafac2865faa904f15d9b59925)

commit cbbf4b0da098636e3d23407d62c3f41402c3f401
Author: Dave Airlie <airlied@gmail.com>
Date:   Fri Apr 29 14:01:30 2016 +1000

    randr/provider: only allow slave gpu to be offload sources.
    
    The other way around makes no sense.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit fc1f61b75c9712e24ff665f95d62771f39eba1c7)

commit cc7c0b0e3c7f7af624c3b1bc360f7c6ff99ea3be
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 4 20:36:18 2016 +1000

    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 <peter.hutterer@who-t.net>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    (cherry picked from commit ac164e58870d70640381e68b776eb95578c7fbd3)

commit bcb633cae6c976b3416c736acab71c065adf5ee7
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed Mar 9 10:45:48 2016 +1000

    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 <peter.hutterer@who-t.net>
    (cherry picked from commit f641ae412287ecb7a3437987e2ba1646a8443aa4)

commit da4c6e1aaae6f564cbde7981898582018108622e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Feb 14 09:58:44 2015 +0000

    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 <chris@chris-wilson.co.uk>
    Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit bab0f450a719a11799491043b82c2f293fed27fe)

commit 1a3577259f7d3d4c91f8a6eff1a5d466dabb45ee
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Feb 14 09:58:43 2015 +0000

    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 <chris@chris-wilson.co.uk>
    Reviewed-and-tested-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit fbe660b7652b945bdd8e3eb0780179d83cc7de96)

commit db258a27f021c80281ed4f89df897dfda0ffce9f
Author: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Date:   Wed Oct 2 15:47:54 2013 +0200

    exa: only draw valid trapezoids
    
    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 <maarten.lankhorst@canonical.com>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit c6511d0142040654140bdedd6f03d43af0abba21)

commit 62bf33d0d105beb257619ef6b77919d01b04d401
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jun 1 14:27:23 2016 -0400

    xfree86: Don't swallow ±iglx command line flag
    
    We want to notice that it's set, but still pass it through to dix.
    Return 0 to indicate this.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 7cf80b9714864c3c4eb9898ff1b7d657ecd16df7)

commit d7ae950c1d08724144514151afe47a3fd8e84f3c
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon May 9 13:28:08 2016 -0400

    xfree86: Add IndirectGLX server flag (v2)
    
    Not all display managers make it easy (or possible) to modify the
    command line flags passed to the server, so add a way to get to it from
    xorg.conf.
    
    v2: Fix the FlagOptions list to not have IGLX after the terminator (Alan
    Coopersmith)
    
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 4fca18dc03669bada75175df289fbee41275208e)

commit 02f9b3c18f6561d47b518bdcd6043a0ec8995c32
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Fri Apr 1 13:38:11 2016 +0200

    xwayland: Fix compiler warning in GLAMOR Xv
    
    XvWindowMask is defined as 0x00020000 and cannot fit in the XvAdaptor
    type which is defined as an unsigned char, thus causing a compiler
    warning:
    
      xwayland-glamor-xv.c: In function ‘xwl_glamor_xv_add_adaptors’:
      xwayland-glamor-xv.c:339:16: warning: large integer implicitly
      truncated to unsigned type [-Woverflow]
    
    This XvWindowMask value is actually not used for XvAdaptor itself but by
    the server in its xf86xv implementation, so we don't even need that mask
    in our xwayland-glamor-xv implementation.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit e8e5d839968e22cf42a6e1982a07b02c6f4a4562)

commit a482b0b6c7d4e66276190acab25c945d74da1178
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Apr 8 11:26:36 2016 -0400

    kdrive: Nuke a bunch of dead code
    
    gcc6 says:
    
    keyboard.c:46:21: warning: ‘linux_to_x’ defined but not used
    
    Only referenced by a bunch of long if-0'd code, so chuck it all out.
    
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit c33250945b45adc447154239f0cf48fb9b2d7335)

commit 0dfa816af2a383449804b891f4a9f8c431e00528
Author: Adam Jackson <ajax@redhat.com>
Date:   Fri Apr 8 11:24:50 2016 -0400

    dix: Squash some new gcc6 warnings
    
    -Wlogical-op now tells us:
    
        devices.c:1685:23: warning: logical ‘and’ of equal expressions
    
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit a5dd7b890f4f3a5245639591c73303c5a087b38a)

commit 98499770640c747128f212b1ebb6bd42775f3b72
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Sat May 7 00:43:33 2016 -0700

    XQuartz: Fix default CFBundleVersion
    
    m4/shell variable name collision broke the case when the configure
    option was not used
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 1bb932bf1417ff319a594d7e40f6813a26936784)

commit 1a81f2a51955e5c8a9d1d80cc008e2927ddd0123
Author: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Date:   Tue May 3 23:43:06 2016 -0700

    XQuartz: Update copyright years
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit 059d5ef30490233f410ca87084c7697b87e5b05e)

