commit 2c7fa2a423ee3d2b9b4c1c63d90ecdfc9eb3b359
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 28 12:30:44 2015 -0400

    xserver 1.17.4

commit bbf1893cc039155432a960b61d55978f1b706295
Author: Martin Peres <martin.peres@linux.intel.com>
Date:   Mon Jul 20 10:37:30 2015 +0300

    os: make sure the clientsWritable fd_set is initialized before use
    
    In WaitForSomething(), the fd_set clientsWritable may be used
    unitialized when the boolean AnyClientsWriteBlocked is set in the
    WakeupHandler(). This leads to a crash in FlushAllOutput() after
    x11proto's commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7.
    
    The problem did not manifest before because both the XFD_SIZE and the
    maximum number of clients were set to 256. As the connectionTranslation
    table was initalized for the 256 clients to 0, the test on the index not
    being 0 was aborting before dereferencing the client #0.
    
    As of commit 2c94cdb453bc641246cc8b9a876da9799bee1ce7 in x11proto, the
    XFD_SIZE got bumped to 512. This lead the OutputPending fd_set to have
    any fd above 256 to be uninitialized which in turns lead to reading an
    index after the end of the ConnectionTranslation table. This index would
    then be used to find the client corresponding to the fd marked as
    pending writes and would also result to an out-of-bound access which
    would usually be the fatal one.
    
    Fix this by zeroing the clientsWritable fd_set at the beginning of
    WaitForSomething(). In this case, the bottom part of the loop, which
    would indirectly call FlushAllOutput, will not do any work but the next
    call to select will result in the execution of the right codepath. This
    is exactly what we want because we need to know the writable clients
    before handling them. In the end, it also makes sure that the fds above
    MaxClient are initialized, preventing the crash in FlushAllOutput().
    
    Thanks to everyone involved in tracking this one down!
    
    Reported-by: Karol Herbst <freedesktop@karolherbst.de>
    Reported-by: Tobias Klausmann <tobias.klausmann@mni.thm.de>
    Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
    Tested-by: Tobias Klausmann <tobias.klausmann@mni.thm.de>
    Tested-by: Martin Peres <martin.peres@linux.intel.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91316
    Cc: Ilia Mirkin  <imirkin@alum.mit.edu>
    Cc: Olivier Fourdan <ofourdan@redhat.com
    Cc: Adam Jackson <ajax@redhat.com>
    Cc: Alan Coopersmith <alan.coopersmith@oracle.com
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 6e3892045e57808b18d053288330306119ca2252
Author: Julien Cristau <jcristau@debian.org>
Date:   Tue Oct 27 13:23:13 2015 +0100

    Xext: fix build with --disable-xace
    
    Regression from 990cf5b2828f73dc7a07f1e38f608af39acfd81d
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>
    Cc: Andrew Eikum <aeikum@codeweavers.com>
    Cc: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
    (cherry picked from commit 524844c8c18e226aad30feb371b19ef491d83449)

commit bf003230f93b2a537b01ab976b7ced83d053e0eb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Oct 27 11:51:49 2015 +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>
    (cherry picked from commit ac2f27f1a9fa8cd88c5dbe7ec0f96238eecf2c3e)

commit 780022a8a5d6f8abd02f8b568f522ce5aed99839
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Oct 26 13:03:59 2015 -0400

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

commit d9344ef3ea4f3009d61240e0fefcfca40eaa7dca
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Feb 16 09:49:18 2015 +0000

    present: Fix missed notify MSC computation
    
    Only treat divisor==0 as async to immediately report the actual vblank.
    If the user species a non-zero divisor, we should compute the missed
    vblank properly or else we report too early.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    (cherry picked from commit 413cb2ff1d754b5f19d77ff19cddf40793989c03)

commit 88f22fc5dac502c7d57d0b53defda75b44dab985
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Wed Oct 21 11:36:06 2015 +0200

    linux: Do not call FatalError from xf86CloseConsole
    
    FatalError ends up calling xf86CloseConsole itself, so calling FatalError
    from within xf86CloseConsole is not a good idea.
    
    Make switch_to log errors using xf86Msg(X_WARNING, ...) and return success
    (or failure).
    
    This makes switch_to match the other error checking done in xf86CloseConsole
    which all logs warnings and continues.
    
    Add checking of the return value in xf86OpenConsole and call
    FatalError there when switch_to fails, to preserve the error-handling
    behavior of xf86OpenConsole.
    
    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1269210
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 2092f12a243b9f7682f542b593b77c96d455ec89)

commit 0ca79007c940b09bd81823fc2e2276f08057247c
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Sep 21 07:16:12 2015 +0100

    fonts: Continue when font calls return Suspended more than once
    
    Patch 3ab6cd31cbdf8095b2948034fce5fb645422d8da fixed Xinerama
    interactions with font servers by not putting clients to sleep
    multiple times. However, it introduced additional changes dealing with
    libXfont routine returning Suspended more than once for the same
    request. This additional change was to abandon processing of the
    current request and free the closure data by jumping to
    'xinerama_sleep' in each of the functions.
    
    Font library functions shouldn't return Suspended more than once,
    except for ListFontsWithInfo, which produces multiple replies, and
    thus ends up returning Suspended many times during processing.
    
    With the jump to xinerama_sleep occurring after the first reply was
    processed, the closure for the request was freed and future calls into
    the ListFontsWithInfo callback resulted in dereferencing freed
    memory.
    
    This patch removes the added branches, reverting the code to its
    previous behaviour, which permitted multiple Suspended returns and
    simply waited for the client to be signaled again so that the callback
    could continue processing the request.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit f9a04d19aef77bf787b8d322305a6971d24a6ba1)

commit 82000d6d0376bdd5c6bb4e0daefcb85879f7c5c7
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Sun Oct 18 23:12:50 2015 -0700

    glx: Fix header length error checking in __glXDisp_RenderLarge
    
    glxcmds.c:2206:46: warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare,Semantic Issue]
            if ((cmdlen = safe_pad(hdr->length)) < 0)
                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^ ~
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    (cherry picked from commit e09875701b980b8c4578fb310a922c9934c34eef)

commit 2ae94d6e8978faff330e9433eddf1697ba4693f6
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Oct 14 15:13:42 2015 -0700

    xdmcp: Declare XdmcpFatal _X_NORETURN
    
    xdmcp.c:1404:1: warning: function 'XdmcpFatal' could be declared with attribute 'noreturn'
    [-Wmissing-noreturn,Semantic Issue]
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 9a2a05a9a7ba02921fa29844c4cad41243c41326)

commit a88460ca82c7aed00177a5bb733b98a7f9b45968
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Oct 14 15:13:36 2015 -0700

    xdmauth: Correct miscall of abs() to instrad call labs()
    
    xdmauth.c:230:13: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of
    type
    'int'
          which may cause truncation of value [-Wabsolute-value,Semantic Issue]
            if (abs(now - client->time) > TwentyFiveMinutes) {
                ^
    xdmauth.c:230:13: note: use function 'labs' instead [Semantic Issue]
            if (abs(now - client->time) > TwentyFiveMinutes) {
                ^~~
                labs
    xdmauth.c:302:9: warning: absolute value function 'abs' given an argument of type 'long' but has parameter of type
    'int' which
          may cause truncation of value [-Wabsolute-value,Semantic Issue]
        if (abs(client->time - now) > TwentyMinutes) {
            ^
    xdmauth.c:302:9: note: use function 'labs' instead [Semantic Issue]
        if (abs(client->time - now) > TwentyMinutes) {
            ^~~
            labs
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 85eb90ea45e89033b97bf71a13c5c70fec8f6871)

commit 0f051cb4c3af6c3b906c2f210e3b6858dd7a5f53
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Oct 14 15:13:35 2015 -0700

    randr: Correct a miscall of abs() to instead call fabs()
    
    rrtransform.c:124:22: warning: using integer absolute value function 'abs' when
          argument is of floating point type [-Wabsolute-value,Semantic Issue]
                if ((v = abs(f_transform->m[j][i])) > max)
                         ^
    rrtransform.c:124:22: note: use function 'fabs' instead [Semantic Issue]
                if ((v = abs(f_transform->m[j][i])) > max)
                         ^~~
                         fabs
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 9f0fcd14b52f8481cbb3b3b9c6e06f64ff003cc8)

commit 8a30fd207cd4f560696ffd4463284ef123970e96
Author: Jeremy Huddleston <jeremyhu@apple.com>
Date:   Wed Oct 14 15:13:34 2015 -0700

    mi: Correct a miscall of abs() to instead call fabs()
    
    miarc.c:1714:9: warning: using integer absolute value function
    'abs' when
          argument is of floating point type [-Wabsolute-value,Semantic Issue]
        if (abs(parc->angle2) >= 360.0)
            ^
    miarc.c:1714:9: note: use function 'fabs' instead [Semantic Issue]
        if (abs(parc->angle2) >= 360.0)
            ^~~
            fabs
    
    Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 610dd8a58a75bb6a5b7d7abbae476d1cc4be519e)

commit 0c5ef339ae36b530745b883347accf11b21b1fd6
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Dec 14 15:55:22 2011 +0000

    render: Propagate allocation failure from createSourcePicture()
    
    All the callers were already checking for failure, except that
    createSourcePicture() itself was failing to check whether it
    successfully allocated the Picture.
    
    [ajax: Rebase, fix line wrap of preceding line]
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
    (cherry picked from commit 211d4c2d353b5e379716484055a3f58235ea65f4)

commit 025ae119a7561a911533ca69c8232147273af300
Author: Arcady Goldmints-Orlov <arcadyg@nvidia.com>
Date:   Thu Oct 4 14:22:13 2012 -0700

    Fix alphamap interactions with wfb
    
    Set a destructor function on pixman images and call fbFinishAccess()
    from there, rather than directly from free_pixman_pict(). This ensures
    that fbFinishAccess() gets called even if pixman still has a reference
    to the image after free_pixman_pict(), as is the case for alphamaps.
    
    [ajax: Squash an unused variable warning in the non-wfb build]
    
    Reviewed-by: Aaron Plattner <aplattner@nvidia.com>
    Signed-off-by: Arcady Goldmints-Orlov <arcadyg@nvidia.com>
    Reviewed-by: Søren Sandmann <ssp@redhat.com>
    (cherry picked from commit fbac451724f7e1b8ce6b6e0505cc33ccd41c5158)

commit 62e2aa02efe45198d6b013530d269815ebd4c9ba
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Sep 21 22:36:41 2015 -0700

    dri2: better checks for integer overflow in GetBuffers*
    
    Check for integer overflow before using stuff->count in a multiplication,
    to avoid compiler optimizing out due to undefined behaviour, but only
    after we've checked to make sure stuff->count is in the range of the
    request we're parsing.
    
    Reported-by: jes@posteo.de
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 6ca496b7c3ccfd677c8c1bee88cc509a5e3c9e04)

commit 616239c15d03f5b527288965f7eee0edebdcf20f
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Sep 21 07:16:13 2015 +0100

    Xext/xselinux: Warning fixes
    
    There's a 'const char *' adventure here that I'm mostly ignoring; some
    client information gets const poisoned. Worked around by adding a
    couple of casts. Ick.
    
    Added an _X_ATTRIBUTE_PRINTF to SELinuxLog.
    
    Ignore a couple of unused return values.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 9af111fe045d82192bacc722940e1d92a8ba4cbd)

commit 87151fefb06dc96fac79e93a3151300bd8037f3d
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 5 11:10:06 2014 -0700

    x86emu: Fix some set-but-not-used warnings.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit e6f8a0340b72113474ccfbf1ea447558b705995a)

commit 20bdec91712957c069c410ed34045f4090821ac7
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Jan 27 09:44:48 2014 +0000

    render: Fix leak of filter params
    
    ==11097== 2,048 (+1,640) bytes in 32 (+26) blocks are definitely lost in loss record 1,570 of 1,719
    ==11097==    at 0x4C2A2DB: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==11097==    by 0x225EF3: SetPicturePictFilter (filter.c:339)
    ==11097==    by 0x22DF4F: ProcRenderSetPictureFilter (render.c:1773)
    ==11097==    by 0x15D25D: Dispatch (dispatch.c:432)
    ==11097==    by 0x14C7B9: main (main.c:298)
    
    [ajax: Fixed whitespace]
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    (cherry picked from commit c7f84c880bbbb508016ad80390a11961b1c4214d)

commit 5c0aea5fb3bda98a442b982b4622cc81a700ebd7
Author: Ville Syrjälä <ville.syrjala@linux.intel.com>
Date:   Mon Oct 14 17:07:29 2013 +0300

    xfree86: Fix the 1792x1344-75 EST III mode
    
    The correct refresh rate for this mode is 75, not 85.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
    (cherry picked from commit 98e170971c6b06d64a5bc7418bf6ae6ae985a3ae)

commit 293d0efe3c742f5010cddf5ad0420d0d1c43959b
Author: Michal Srb <msrb@suse.com>
Date:   Mon Oct 7 17:57:14 2013 +0300

    randr: Allow RRSelectInput for ProviderChange and ResourceChange events
    
    [ajax: To be clear, we already have code to emit these events, and it
     looks like it works, but to get them you'd have had to also ask for one
     of the other notify types.  This makes it possible to listen for e.g.
     ProviderChange alone.]
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Michal Srb <msrb@suse.com>
    (cherry picked from commit 91c7acfc3447a0073dd1db260cf05115d94ce7e8)

commit 833e3e84a077766b16b42d2b24931c14cd00bfb9
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Oct 20 11:44:28 2011 +0100

    exa: initialise mask_off_x and mask_off_y
    
    These get used at the end of the function in a calculation,
    even though the result isn't used its not pretty.
    
    Pointed out by coverity.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 4c7cefe24001279a558dd875949d40ede49ef702)

commit 26a5364d507dff012283dc5d6f86b80c5936a807
Author: Andrea Canciani <ranma42@gmail.com>
Date:   Wed Jul 27 10:52:31 2011 +0200

    render: Allow single-stop gradients
    
    The Render specification allows single-stop gradients and pixman 0.22
    (X server requires >= 0.27.2 now) can rasterize them correctly.
    
    [ajax: update commit message]
    
    Signed-off-by: Andrea Canciani <ranma42@gmail.com>
    Reviewed-by: Soren Sandmann <ssp@redhat.com>
    (cherry picked from commit 7ed0c3912e1cbab960df308b9d4ea618be757fd2)

commit a22b828dad72091210234a9e671c93015c970ac6
Author: Cyril Brulebois <kibi@debian.org>
Date:   Sun Jun 5 23:32:26 2011 +0200

    man: Fix case for MIT-unspecified.
    
    include/site.h says that COMPILEDDISPLAYCLASS is MIT-unspecified, rather
    than MIT-Unspecified. Fix the manpage accordingly.
    
    Signed-off-by: Cyril Brulebois <kibi@debian.org>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 4803f7139131cee7bbf50b32d667d6e60302df09)

commit 92f6b363972c13f564e1f8f555783fe9cb557db5
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Sep 22 19:25:43 2015 -0700

    protocol.txt: Add MIT-SHM 1.2 requests
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit a31bbc450a08622aadafc264b3efe57e465eaecb)

commit 0b2a9db19bad7567ea30341f3432ae384a21c106
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Sep 22 19:25:42 2015 -0700

    protocol.txt: Add DRI3 1.0 requests
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 424ba5de56e2ddf173bb0d26daa821f12897f18f)

commit d135b4cf6bc427f6f83f57ff70c673b64a6ae6af
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Sep 22 19:25:41 2015 -0700

    protocol.txt: Add Present 1.0 requests
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 7e6b7c799455fdeac082cf2a064fe1ba432e92ca)

commit 32f3432ea65f2eec01a7eed0e9bf93e1bc082241
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Sep 22 19:25:39 2015 -0700

    protocol.txt: Remove extensions that died before Xorg was born
    
    Adobe-DPS-Extension, DEC-XTRAP, X3D-PEX, XIE
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 1ea8fb96bc6a95d98dd67fc9d4c4e4b858383d34)

commit 5c5bc6a9c2050562e9330c0b7b98a5261ee0b113
Author: Tiago Vignatti <tiago.vignatti@nokia.com>
Date:   Tue Sep 7 15:50:26 2010 +0300

    dix: remove dead extensions to protocol.txt
    
    lbx and mbe.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
    (cherry picked from commit 593270038d8983b99aa0aaa24509da3cb944be5c)

commit a55bfcc0df09920a5e3ec9f923d5168992a63f29
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Fri Dec 3 23:42:27 2010 -0500

    Add new GLX events errors and requests to protocol.txt
    
    Based off of glproto 1.4.11.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
    (cherry picked from commit 3cd56dd2cfbfcce6ba68c22450d51139208993ab)

commit 9cb53672b4b4c847544c37888db6e2ae354697a2
Author: Robert Hooker <sarvatt@ubuntu.com>
Date:   Fri Dec 3 23:39:51 2010 -0500

    Add DRI2 2.2/2.3 events and requests to protocol.txt
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
    (cherry picked from commit 272ba9f021c6d08ebd6a2d96da3737f5630bcbd5)

commit 8810c46a98a107cf53b30696cfad6e388b73024d
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Sep 21 15:23:23 2015 -0400

    rootless: Fix bogus handling of broken root clip
    
    gcc quite correctly complains about this:
    
        In file included from ../../include/scrnintstr.h:51:0,
                         from rootlessValTree.c:98:
        In function 'RegionUninit.isra.1',
            inlined from 'RegionEmpty' at ../../include/regionstr.h:194:5,
            inlined from 'RootlessMiValidateTree' at rootlessValTree.c:490:9:
        ../../include/regionstr.h:166:9: warning: attempt to free a non-heap object 'RegionBrokenData' [-Wfree-nonheap-object]
                 free((_pReg)->data);
    
    So that'd crash if you ever got there.  RegionNull will do almost the
    same thing only without the free(), so let's do that instead; it might
    still not be an entirely sane way to recover, but it at least won't
    crash.
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit fa0bb01899d586e02cf51892c17edd22e462a46c)

commit 9a4ea1f5ea7f813d28cf322aca6f2ea8c427bd1a
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Sep 21 07:16:17 2015 +0100

    os/xdmcp: Just send XDMCP keepalive packets once every three minutes
    
    There was a complicated scheme to increase the time between keepalives
    from 3 minutes up to as much as 24 hours in an attempt to reduce
    network traffic from idle X terminals. X terminals receiving X
    traffic, or receiving user input would use the 3 minute value; X
    terminals without any network traffic would use a longer value.
    
    However, this was actually broken -- any activity in the X server,
    either client requests or user input, would end up resetting the
    keepalive timeout, so a user mashing on the keyboard would never
    discover that the XDMCP master had disappeared and have the session
    terminated, which was precisely the design goal of the XDMCP keepalive
    mechanism.
    
    Instead of attempting to fix this, accept the cost of a pair of XDMCP
    packets once every three minutes and just perform keepalives
    regularly.
    
    This will also make reworking the block and wakeup handler APIs to
    eliminate select masks easier.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit db1089eafc1c5371fa0030202de588d2e2b4f8e5)

commit abe44851018d0e5bace2971682e724aa7444e96f
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Sep 21 07:16:16 2015 +0100

    os/xdmcp: Remove dead 'restart' code
    
    The X server used to wait for the user to hit a key or move the mouse
    before restarting the session after a keepalive failure. This,
    presumably, was to avoid having the X server continuously spew XDMCP
    protocol on the network while the XDM server was dead.
    
    Switching into this state was removed from the server some time before
    XFree86 4.3.99.16, so the remaining bits of code have been dead for
    over a decade, and no-one ever noticed.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit a3a40291330bad10401fe2bcdbc097ce742b026a)

commit c72d4f00277c977faecd697ef3407518f11f909d
Author: Egbert Eich <eich@freedesktop.org>
Date:   Tue Mar 31 09:06:46 2015 +0200

    randr: Remove senseless checks for xf86RandR12Key
    
    When xf86RandR12Key is not set we will not get to the places where
    these tests are done as the functions in question are not called.
    In most cases we would have crashed before these checks anyway.
    
    Signed-off-by: Egbert Eich <eich@freedesktop.org>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 3cd7d33380953f2a315dd79ab74d7340c83fd80a)

commit 7a53179425ab5112adcace1489cad6e8072af6b1
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Oct 6 10:02:22 2014 +0100

    randr/prime: Don't stop on the first pipe when disabling ReplaceScanoutPixmap
    
    As we define sizeFits based on whether a CRTC is active, and skip trying
    to redirect the scanout on a disable pipe, we then attempt to undo it
    later and fail because crtc->scanout_pixmap != DRI2_Pixmap and
    !sizeFits. Paper over this failure by skipping unredirected CRTC when
    disabling.
    
    v2: Unwind upon failure
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84653
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Dave Airlie <airlied@redhat.com>
    Reported-by: Christoph Haag <haagch@frickel.club>
    Tested-by: Christoph Haag <haagch@frickel.club>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 245040f0d0b937efe14d947468a641a95398776a)

commit a85808ce3fc26511996d01e7e6ec1192b8c3d216
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Sep 18 08:44:07 2015 -0700

    Remove DECnet from Xserver.man
    
    DECnet support died in modularization (X11R7.0)
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 9d65a0de95a20632f2a6a04ba596dcdd76d9f5e2)

commit 49d04a43360267fb7cbbeec0ea4985ba224fb59c
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Thu Sep 17 16:04:33 2015 -0700

    privates: Clear screen-specific keys during CloseScreen
    
    The modesetting driver corrupts memory when used after a server regeneration
    because not enough memory is allocated for its pixmap privates.  This happens
    because its call to dixRegisterScreenSpecificPrivateKey() does nothing because
    key->initialized is still TRUE from the first server generation.  However, the
    key is not in the screen's linked list of screen-specific privates because
    that's freed and reallocated during the server generation loop in dix_main().
    
    Fix this by clearing key->initialized before CloseScreen and add a call to
    dixFreeScreenSpecificPrivates() for GPU screens.
    
    v2: Just set key->initialized to FALSE and move dixFreeScreenSpecificPrivates()
    calls to after CloseScreen.
    
    v3: Move dixFreeScreenSpecificPrivates() calls back to just before CloseScreen.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 82eb490b0a341729f25d0c42a937fe29d99da521)

commit daf15b551631e8a98960e629039bef1880de8f82
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jun 10 13:20:59 2015 -0400

    render: Simplify SProcRenderScale
    
    Since ProcRenderScale throws BadImplementation anyway it's pointless to
    waste time carefully swapping the request.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 67dd34fa734085ed67ba7790820fe4743d48b60f)

commit 10a944889228acdeaf471766407fc84c8947e931
Author: Ian Scott <ian.scott@arteris.com>
Date:   Thu May 21 16:13:12 2015 -0700

    Xephyr: Paint with subimage for non-Glamor & non-XSHM case
    
    This improves the case for when we paint an area without SHM.
    xcb_image_subimage() is used to create a subimage for the damaged area, which
    is converted to native format if necessary.
    
    Signed-off-by: Ian Scott <ian.scott@arteris.com>
    Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
    (cherry picked from commit a579e6ba7763749d51d16e3a54941e06939df07a)

commit 0134dc1b56e8c7c19f655e583ff3f3ba0d6cae4e
Author: Daniel Drake <drake@endlessm.com>
Date:   Wed May 20 13:16:12 2015 -0600

    Keep SIGALRM restart flag after Popen
    
    Commit 94ab7455 added SA_RESTART to the SIGALRM handler.  However, the
    Popen code tears down and recreates the SIGALRM handler via OsSignal(),
    and this flag is dropped at this time.
    
    Clean the code to use just a single codepath for creating this signal
    handler, always applying SA_RESTART.
    
    [ajax: Fixed commit id]
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Daniel Drake <drake@endlessm.com>
    (cherry picked from commit 1f915e8b524dd02011158aa038935970684c7630)

commit f92c0b9f94deaa03f792c3c93efd802fec268e8f
Author: Daniel Drake <drake@endlessm.com>
Date:   Tue May 12 16:39:22 2015 -0600

    Allow system call restarts upon signal interruption
    
    The X server frequently deals with SIGIO and SIGALRM interruptions.
    If process execution is inside certain blocking system calls
    when these signals arrive, e.g. with the kernel blocked on
    a contended semaphore, the system calls will be interrupted.
    
    Some system calls are automatically restartable (the kernel re-executes
    them with the same parameters once the signal handler returns) but
    only if the signal handler allows it.
    
    Set SA_RESTART on the signal handlers to enable this convenient
    behaviour.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Daniel Drake <drake@endlessm.com>
    (cherry picked from commit 94ab7455abc213fc96760e29ab2e943ec682fb22)

commit d2e4a9d4ac2f479de23e15af5e528cfa2bffb30f
Author: Felix Janda <felix.janda@posteo.de>
Date:   Mon Aug 17 20:25:53 2015 +0200

    On linux use <termios.h> instead of <termio.h>
    
    <termio.h> is obsolete. Using <termios.h> instead fixes building with
    musl libc.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Felix Janda <felix.janda@posteo.de>
    (cherry picked from commit e8e3368298c98a1292bb1c727e2f3d56539e2eac)

commit e863ab57eb94f32485a501e547eedc96f9249ad1
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jul 29 11:30:15 2015 -0400

    glxproxy: Fix an obvious thinko in QueryExtensionsString
    
    gcc 5.1 throws a rather amusing warning here:
    
    glxcmdsswap.c: In function ‘__glXSwapQueryExtensionsString’:
    glxcmdsswap.c:439:1: warning: function might be candidate for attribute
    ‘noreturn’ [-Wsuggest-attribute=noreturn]
     __glXSwapQueryExtensionsString(__GLXclientState * cl, GLbyte * pc)
    
    This is entirely accurate, albeit curiously phrased: swapping some bits
    hanging off the end of a null pointer will make Xdmx crash, so from the
    perspective of code generation the function will indeed not return.
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit dfa8b37cfb2589f2474f6fcc755dde77bfdd6fed)

commit 1688b7517e91dba84244c01d1a01fa8145b4367a
Author: Ingo Schwarze <schwarze@usta.de>
Date:   Sun Aug 30 15:26:40 2015 +0200

    remove bogus \/ escapes
    
    some X manuals use then escape sequence \/ when they want to render
    a slash.  That's bad because \/ is not a slash but an italic
    correction, never producing any output, having no effect at all in
    terminal output, and only changing spacing in a minor way in typeset
    output.
    
    Signed-off-by: Matthieu Herrb <matthieu@herrb.eu>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 634e357be2ec400f63bd5c42f706b709b6ddabc3)

commit e9385b42a3f6cb1eadd5080019b9faf9538e5608
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Aug 17 18:37:10 2015 -0700

    mi: Always initialize edge1 and edge2 in miLineArc
    
    This eliminates a warning generated when miLineArcD is inlined and the
    compiler can't figure out that edge1 and edge2 are always initialized
    before being used.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit bca4f4b56c7619d17f9df46f7aac392ea01a9429)

commit 00b3f5a2eda7b819057d9e150754dc0a509f6e39
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Aug 13 09:25:37 2015 +1000

    rootless: rename w->_w to avoid shadow warnings
    
    fixes:
    In file included from rootlessWindow.c:51:0:
    rootlessWindow.c: In function 'RootlessResizeWindow':
    rootlessCommon.h:198:19: warning: declaration of 'w' shadows a parameter [-Wshadow]
             WindowPtr w = pWin;                     \
                       ^
    rootlessWindow.c:1292:9: note: in expansion of macro 'HUGE_ROOT'
             HUGE_ROOT(pWin);
             ^
    rootlessWindow.c:1262:35: note: shadowed declaration is here
                          unsigned int w, unsigned int h, WindowPtr pSib)
                                       ^
    In file included from rootlessWindow.c:51:0:
    rootlessCommon.h:207:19: warning: declaration of 'w' shadows a parameter [-Wshadow]
             WindowPtr w = pWin;                     \
                       ^
    rootlessWindow.c:1296:9: note: in expansion of macro 'NORMAL_ROOT'
             NORMAL_ROOT(pWin);
             ^
    rootlessWindow.c:1262:35: note: shadowed declaration is here
                          unsigned int w, unsigned int h, WindowPtr pSib)
                                       ^
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit d4710004367ab8eab794a12385ca7ed3acc9a0e0)

commit 3aacda0aea221f703d469de82a8a6778677b34d0
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Aug 13 09:25:36 2015 +1000

    rootless: fix warnings due to lack of const keeping.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 7f506b8099d23c2f045ad26cc5cff00109b69d7b)

commit 02c94ccddf4fc9ea08555e929b051201ad5fbc79
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Aug 4 13:17:02 2015 -0400

    xwayland: Don't (double) destroy input resources in CloseScreen
    
    By the time we get here we've already done CloseDownDevices, so on the
    second regeneration you get:
    
        Invalid read of size 4
           at 0x43402A: RemoveDevice (devices.c:1125)
           by 0x427902: xwl_seat_destroy (xwayland-input.c:568)
           by 0x42649C: xwl_close_screen (xwayland.c:116)
           by 0x4B7F67: CursorCloseScreen (cursor.c:187)
           by 0x536003: AnimCurCloseScreen (animcur.c:106)
           by 0x539831: present_close_screen (present_screen.c:64)
           by 0x43E486: dix_main (main.c:351)
           by 0x30D70206FF: (below main) (libc-start.c:289)
         Address 0x980e1a0 is 64 bytes inside a block of size 904
    
           at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
           by 0x434158: RemoveDevice (devices.c:1157)
           by 0x42F77B: CloseDeviceList (devices.c:1017)
           by 0x430246: CloseDownDevices (devices.c:1047)
           by 0x43E3EB: dix_main (main.c:333)
           by 0x30D70206FF: (below main) (libc-start.c:289)
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 533fb627398e20f863234d780f4463e37007515b)

commit 71e4b536cd16c1880889e5a3a88f550674c12882
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Aug 4 13:17:01 2015 -0400

    xwayland: Don't (double) destroy RANDR resources in CloseScreen
    
    By the time we get here we've already been through FreeAllResources,
    which has already torn down the RANDR objects, so on the second
    regeneration you get:
    
        Invalid read of size 4
           at 0x51C6F0: RRCrtcDestroy (rrcrtc.c:659)
           by 0x4285F5: xwl_output_destroy (xwayland-output.c:191)
           by 0x426464: xwl_close_screen (xwayland.c:112)
           by 0x4B7F77: CursorCloseScreen (cursor.c:187)
           by 0x536013: AnimCurCloseScreen (animcur.c:106)
           by 0x539841: present_close_screen (present_screen.c:64)
           by 0x43E496: dix_main (main.c:351)
           by 0x30D70206FF: (below main) (libc-start.c:289)
         Address 0x4cc6640 is 0 bytes inside a block of size 728 free'd
           at 0x4A07D6A: free (in /usr/lib64/valgrind/vgpreload_memcheck-amd64-linux.so)
           by 0x51BCCF: RRCrtcDestroyResource (rrcrtc.c:689)
           by 0x45CD91: doFreeResource (resource.c:872)
           by 0x45DE56: FreeClientResources (resource.c:1138)
           by 0x45DF06: FreeAllResources (resource.c:1153)
           by 0x43E3BD: dix_main (main.c:321)
           by 0x30D70206FF: (below main) (libc-start.c:289)
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 11f4cc47a815c5d6284b1338e748e2605b2dd779)

commit 75399d32f686e8aaa11a5afafacf9fdfad3d1bb4
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Jul 27 13:54:00 2015 -0700

    glamor: Don't try to free the pixmap priv if we fail to allocate FBO.
    
    Fixes a regression since a2a2f6e34bd49e7ae31779274d52e800595660bc.  I
    missed this in testing on x86, because we never fail to allocate an
    FBO.  We do hit this path on VC4, though.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit ea03e314f98e5d8ed7bf7a508006a3d84014bde5)

commit 288b355f48c58cbe458cf92d78246a8abcccd946
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Jul 19 08:24:39 2015 -0700

    Xserver.man: -retro is used when starting the server, not the stipple
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit 6916d32ab3ec1aa922094abce7fac22884ee4e83)

commit abfda3b941281e12cec35e36dd0e9d87e59ce699
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue May 19 11:31:25 2015 -0400

    glx: Implement GLX_ARB_context_flush_control
    
    This extension allows clients to opt out of the implicit glFlush on
    context release, which is quite nice for performance for clients using
    multiple contexts.  The server doesn't really need to be aware of the
    client's decision, at least for direct contexts, but it does need to not
    reject the context attribute out of hand.
    
    This patch won't do anything unless built against a Mesa that defines
    the __DRI2_FLUSH_CONTROL extension (and a new enough glxext.h, but
    that's been there since 10.3 at least).
    
    Reviewed-by: James Jones <jajones@nvidia.com>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 995ff11422eb49160abfe276f471e412b16cab9d)

commit 23d52080a5d9c03dc2707e71f6d878c58d000a55
Author: Fredrik Höglund <fredrik@kde.org>
Date:   Thu Sep 10 23:33:20 2015 +0200

    present: Don't stash the MSC value when present_get_ust_msc fails
    
    Otherwise we stash an uninitalized value, and later use it to compute
    the msc_offset for the window.  Also initialize ust and crtc_msc so we
    never use uninitalized values when present_get_ust_msc fails.
    
    This fixes clients getting stuck waiting indefinitely for an idle
    event when a CRTC is turned off.
    
    Signed-off-by: Fredrik Höglund <fredrik@kde.org>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit f6ce23fbfc8804204fa103f98b94478387b94040)

commit 2a561fac70c8b04305eab6372298a128e6553d3f
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Sep 23 11:19:00 2015 +1000

    glx: fix regression with copy sub buffer disappearing
    
    So copy sub buffer isn't a core extensions it's a driver extension
    which means we are using totally the wrong interface to query for it
    here, which means bad things happen when you roll out this code,
    for instance MESA_copy_sub_buffer stops working.
    
    This is just the hack I'm sticking in Fedora to avoid the regression
    for now, but hopefully will inspire us.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 6da3f5d04f6a1cda0c858280f9561f9fbc323275)

commit 92effabee1fe7225709acdca4adb2783b78392d4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 22 15:37:23 2015 +0900

    glamor: Make our EGL context current before calling into GL in glamor_init
    
    Without this, the context of another screen may be current, or no context
    at all if glamor_egl_init failed for another screen.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit 0a458a908ec071a4da5d22c760581e0c5ec885ce)

commit a420301a8bc9376a174315bc32d3cd7e89dacd7f
Author: Dave Airlie <airlied@redhat.com>
Date:   Wed Jul 15 17:56:11 2015 +1000

    glamor: make current in prepare paths
    
    Lots of the accel paths only make current once they start
    doing someting, so a lot of them call the bail paths without
    make current, which means on PRIME systems for example
    we end up in the wrong context.
    
    Add a prepare pixmap in the prepare fallback path.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90667
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
