commit f84ad082557f9cde6b8faa373eca6a0a89ba7d56
Author: Matt Turner <mattst88@gmail.com>
Date:   Sun Mar 29 13:02:03 2020 -0700

    xserver 1.20.8
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit 8837279869309317c110afb6f2f3c24484c77657
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Apr 17 11:37:11 2019 +0100

    Fix old-style definition warning for xf86OSInputThreadInit()
    
    ../hw/xfree86/os-support/stub/stub_init.c: In function ‘xf86OSInputThreadInit’:
    ../hw/xfree86/os-support/stub/stub_init.c:29:1: warning: old-style function definition [-Wold-style-definition]
    
    (cherry picked from commit 7c266cafed14b38c039091651069ae9888c3a8ae)

commit 0c012f968b4e02a2bc892ce71f7bea9bd3f7fb22
Author: Jon Turney <jon.turney@dronecode.org.uk>
Date:   Wed Mar 13 14:57:14 2019 +0000

    Add xf86OSInputThreadInit to stub os-support as well
    
    stub os support also needs to provide xf86OSInputThreadInit, omitted in
    ea1527a8
    
    (cherry picked from commit c020769dbfb965740c8441d8242b738ef572a7c9)

commit b259485975078087fe6bde2b9e1eccf4ae14120c
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Mar 17 11:45:22 2020 +0100

    xwayland: Delete all frame_callback_list nodes in xwl_unrealize_window
    
    We were only calling xwl_present_unrealize_window for the toplevel
    window, but the list can contain entries from child windows as well,
    in which case we were leaving dangling pointers to freed memory.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/1000
    Fixes: c5067feaeea1 "xwayland: Use single frame callback for Present
                         flips and normal updates"
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    Tested-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit 5e91587302e85fd6f0e8d5ffbe30182e18c6913f)

commit a033571644d277dc49a489f7ae32c4ad92856543
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Fri Sep 13 17:11:27 2019 +0200

    xwayland/glamor-gbm: Handle DRM_FORMAT_MOD_INVALID gracefully
    
    The compositor may send DRM_FORMAT_MOD_INVALID instead of a list of
    modifiers for various reasons. Handle this gracefully by ignoring it.
    
    Without this, if a compositor would send DRM_FORMAT_MOD_INVALID, it'd
    result in empty windows provided by Xwayland.
    
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit edf964434eac10ffbe27cc883e3ab95505669aee)

commit 3c48bd50ad33f2a533ac76afa38d6e3906ebc28a
Author: Arthur Williams <taaparthur@gmail.com>
Date:   Sun Oct 6 18:55:35 2019 +0000

    dix: Check for NULL spriteInfo in GetPairedDevice
    
    There is a race when reseting the XServer that causes spriteInfo to be
    NULL in GetPairedDevice resulting a segfault and subsequent crash. The
    problem was noticed when opening a connection, creating master devices,
    destroying master devices and closing the connection during testing.
    
    Signed-off-by: Arthur Williams <taaparthur@gmail.com>
    
    
    (cherry picked from commit e693c9657f98c334e9921ca2f8ebf710497c0c6a)

commit 1610ef1d6b5ba99da9d1a639f3b65b2e61514a7d
Author: David Seifert <soap@gentoo.org>
Date:   Fri Jan 24 12:49:44 2020 +0100

    Fix building with `-fno-common`
    
    * GCC 10 will switch the default to `-fno-common`.
      https://gcc.gnu.org/PR85678
    
    Bug: https://bugs.gentoo.org/705880
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit 2a185dd22ddb5b0d7d2ef5948591028766bb9530
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Mon Mar 2 18:09:31 2020 +0100

    xwayland: Use frame callbacks for Present vblank events
    
    Instead of only the fallback timer.
    
    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/854
    
    v2:
    * Drop unused frame_callback member of struct xwl_present_window
      (Olivier Fourdan)
    
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit 9b31358c52e951883bf7c01c953a9da080542244)

commit 99a6d6b15e0757a4652a569a1b2070c76a00b567
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Wed Nov 27 18:04:06 2019 +0100

    xwayland: Use single frame callback for Present flips and normal updates
    
    Using a list of Present windows that need to be called back.
    
    This prepares for the following change, there should be no change in
    observed behaviour.
    
    v2:
    * Use xwl_window_create_frame_callback instead of making the
      frame_listener struct non-static (Olivier Fourdan)
    
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit c5067feaeea115761f0a72f37407c6e5e943d1a1)

commit 915cc107767624bd7914c962347bab9c2e21cdff
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Dec 13 18:26:35 2019 +0100

    xwayland: Add xwl_window_create_frame_callback helper
    
    This will be used by the following changes. No functional change
    intended.
    
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit f80eea0529b2cfb805a9c7d4994a4235451131e3)

commit 94dad4f05133171805ee94095bbcd20ece754eba
Author: Dor Askayo <dor.askayo@gmail.com>
Date:   Wed Feb 19 17:22:11 2020 +0100

    xwayland: clear pixmaps after creation in rootless mode
    
    When a pixmap is created with a backing FBO, the FBO should be cleared
    to avoid rendering uninitialized memory. This could happen when the
    pixmap is rendered without being filled in its entirety.
    
    One example is when a top-level window without a background is
    resized. The pixmap would be reallocated to prepare for more pixels,
    but uninitialized memory would be rendered in the resize offset until
    the client sends a frame that fills these additional pixels.
    
    Another example is when a new top-level window is created without a
    background. Uninitialized memory would be rendered after the pixmap is
    allocated and before the client sends its first frame.
    
    This issue is only apparent in OpenGL implementations that don't zero
    the VRAM of allocated buffers by default, such as RadeonSI.
    
    Signed-off-by: Dor Askayo <dor.askayo@gmail.com>
    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/636
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit 0e9a0c203c2ae4eae12bdbb95428f398211c7bee)
    
    [ Michel Dänzer:
    * Squashed in commit ebf549db2d9341d99e0d0847b948dd798d98f7dc
    * Dropped code related to glamor_format, which only exists on master ]

commit 0238359bced17f9db0e266111897d154ab117d68
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Feb 7 12:15:07 2020 +0100

    xwayland: Call glamor_block_handler from xwl_screen_post_damage
    
    In between the two phases introduced by the previous change. This makes
    sure all pending drawing to the new buffers is flushed before they're
    committed to the Wayland server.
    (cherry picked from commit a542224ea28e2e8ccaf5e0df85bf6c603e97599a)

commit a93bce6bfc6c610676a7fbc76639854c5553cb2c
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Feb 7 12:06:39 2020 +0100

    xwayland: Split up xwl_screen_post_damage into two phases
    
    The first phase sets the new surface properties for all damaged
    windows, then the second phase commits all surface updates.
    
    This is preparatory for the next change, there should be no observable
    change in behaviour (other than the order of Wayland protocol
    requests).
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit f88d9b1f779835302e02e255fcd45989db7f488d)

commit 1ba5e528d52ed9d7d67eb45c5d3e04b6f5d22b05
Author: Maarten Lankhorst <dev@mblankhorst.nl>
Date:   Thu Apr 25 11:46:41 2019 +0200

    modesetting: Disable atomic support by default
    
    The atomic driver has issues with modesetting when stealing
    connectors from a different crtc, a black screen when doing rotation
    on a different crtc, and in general is just a mapping of the legacy
    helpers to atomic. This is already done in the kernel, so just
    fallback to legacy by default until this is fixed.
    
    Please backport to 1.20, as we don't want to enable it for everyone
    there. It breaks for existing users.
    
    The fixes to make the xserver more atomic have been pending on the
    mailing list for ages.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110375
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110030
    References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/36/commits
    Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
    (cherry picked from commit f0d78b47ac49977a6007f5fe081f00c6eb19a12e)

commit d44bbb4710961651dcf10701bc562f1f01509010
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Feb 10 10:22:34 2020 +0100

    glamor: Fix a compiler warning since the recent OOM fixes.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit 3b26b90cb787a14fa5f8bb2033eab8ab6562a9a5)

commit d2a6c8708ca4f27c8d9aade6db2c4e7f2d8c624f
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Date:   Mon Feb 10 10:21:02 2020 +0100

    glamor: Fallback to system memory for RW PBO buffer allocation
    
    We currently support two modes of operation for RW PBO buffers: one
    that allocates a pack buffer with GL memory and one that uses system
    memory when the former is not supported.
    
    Since allocation with system memory is less likely to fail, add a
    fallback to system memory when GL memory failed instead of bailing
    out.
    
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    (cherry picked from commit 8c4e8d9eff03cefc987f13c900b0a47403946127)

commit ca034c2f2cfff8e49b816b8ecbaa96215b796e36
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Date:   Mon Feb 10 10:20:30 2020 +0100

    glamor: Propagate glamor_prepare_access failures in copy helpers
    
    glamor_prepare_access can fail for a few reasons, especially when
    failing to allocate a PBO buffer. Take this in account and bail in
    the copy helpers that call the helper when a failure happens.
    
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    (cherry picked from commit de6b3fac1f26075ce915006c914c4a4755617715)

commit a7b165d994d74131778a5a9bcffec957f1d1cacb
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Date:   Mon Feb 10 10:20:04 2020 +0100

    glamor: Error out on out-of-memory when allocating PBO for FBO access
    
    Packed buffer allocation (which happens at glBufferData time with the
    buffer bound) can fail when there is no GL memory left.
    
    Pick up the error when it happens, print a proper error message, do
    some cleanup and bail.
    
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    (cherry picked from commit bc2e12239f86e5a4acd220744f42eb83ba55d328)

commit 428b5ce4da99a43bfa0c1933ec447f7feb3639a1
Author: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Date:   Mon Feb 10 10:19:18 2020 +0100

    glamor: Propagate FBO allocation failure for picture to texture upload
    
    When uploading a picture to a texture, glamor_upload_picture_to_texture
    calls glamor_pixmap_ensure_fbo to ensure that there is backing FBO.
    The FBO will be allocated if the picture's drawable pixmap does not have
    one already, which can fail when there is no GL memory left.
    
    glamor_upload_picture_to_texture checks that the call succeeded and will
    enter the failure path if it did not. However, unlike many other
    functions in glamor, this one has ret set to TRUE initially, so it needs
    to be set to FALSE when a failure happens.
    
    Otherwise, the error is not propagated and the failure path return TRUE.
    This leads to a fault when trying to access the FBO pointer later on.
    
    Signed-off-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
    (cherry picked from commit c98c7709c67d8ed6b7455ec700a49b58c396ec2c)

commit 948afd768398955f043fef8e14d7d154cea25f85
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Feb 6 17:59:08 2020 +0100

    modesetting: remove unnecessary error message, fix zaphod leases
    
    I introduced this error with the MST hotplug code, but it can trigger
    on zaphod setups, and is perfectly fine. There is no support for
    MST/hotplug on zaphod setups currently, so we can just skip over
    the dynamic connector handling here. However we shouldn't skip
    over the lease handling so move it into the codepath.
    
    Fixes: 9257b1252da9 ("modesetting: add dynamic connector hotplug support (MST) (v3)")
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 1cfdd1a96580733df3625bcea3384ffee3dc92df)

commit 1c3e51dabadbf65e7fdedbebbdcd19a85fb03e34
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Thu Feb 6 17:57:16 2020 +0100

    xfree86/modes: Bail from xf86RotateRedisplay if pScreen->root is NULL
    
    Avoids a crash in xf86RotatePrepare -> DamageRegister during
    CreateScreenResources if rotation or another transform is configured for
    any connected RandR output in xorg.conf. The generic rotation/transform
    code generally can't work without the root window currently.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/969
    Fixes: 094f42cdfe5d "xfree86/modes: Call xf86RotateRedisplay from
                         xf86CrtcRotate"
    Acked-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 6a5e47c57d16de8b6a6a2636f3cbad1aebec32e2)

commit af2fd88b1019f63fe3ce871f9e99b3e1e4608b25
Author: Daniel Llewellyn <daniel@bowlhat.net>
Date:   Thu Feb 6 17:56:12 2020 +0100

    os: Ignore dying client in ResetCurrentRequest
    
    You might as well, it's harmless. Better, some cleanup code (like DRI2
    swap wait) needs to run both normally and at client exit, so it
    simplifies the callers to not need to check first. See 4308f5d3 for a
    similar example.
    
    Props: @ajax (Adam Jackson)
    
    Fixes: xorg/xserver#211
    
    Signed-off-by: Daniel Llewellyn <diddledan@ubuntu.com>
    (cherry picked from commit 578371616e09364318c9fb2371a693d438b31b29)

commit e5293f1c5d7b20d98ed4975dc29a6f88c8bc6a0d
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Feb 6 17:55:25 2020 +0100

    Revert "dri2: Don't make reference to noClientException"
    
    It's true that the value would always be -1, if it's not zero, but it's
    usually zero is the problem. As a result we return failure from
    otherwise successful indirect GLX paths, which isn't very nice of us.
    
    This reverts commit 7d33ab0f8c7958b205076f71e4b47c24aace77fd.
    
    Fixes: https://gitlab.freedesktop.org/xorg/xserver/issues/211
    (cherry picked from commit e1fa3beb2fe2519e69f859f0acdc68e5a770de27)

commit d845ceae53bb425695e6a185b51ae1b432dd4672
Author: George Matsumura <gmmatsumura01@bvsd.org>
Date:   Thu Feb 6 17:54:36 2020 +0100

    Restrict 1x1 pixmap filling optimization to GXcopy
    
    This restricts an optimization whereby the filling of 1x1 pixmaps
    went around the driver-provided function to cases where the
    source color is meant to be directly copied to the destination,
    as opposed to other operations which should produce different
    destination values than just the foreground color.
    
    Signed-off-by: George Matsumura <gmmatsumura01@bvsd.org>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit 83826075e59c0393c16d2a2482dc5c9f2fdf4564)

commit c2ef88c4d3a551ff7646bfb86550cae32b02a510
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Jan 14 09:23:34 2020 +0100

    modesetting: Explicitly #include "mi.h"
    
    For the miClearDrawable prototype. Apparently it doesn't get pulled in
    for some build configurations, breaking the build.
    
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    (cherry picked from commit a24a786fc8490fda08b15c3dab6fa6750f008ecb)

commit ad7364d8d7f936b9b08195e47d2f6ee9329ff687
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Mon Jan 13 23:34:49 2020 -0800

    configure: Define GLAMOR_HAS_EGL_QUERY_DRIVER when available
    
    Commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7 added this to the Meson
    build but neglected to add it to autotools.
    
    v2: Also update dix-config.h.in
    
    Fixes: 195c2ef8f ("glamor: Add a function to get the driver name via EGL_MESA_query_driver")
    
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com> [v1]
    Reviewed-by: Eric Engestrom <eric@engestrom.ch> [v1]
    Reviewed-by: Matt Turner <mattst88@gmail.com>
    (cherry picked from commit 25ca99df38a2c28c25ab20a917e68442285f2353)

commit 489f4191f3c881c6c8acce97ec612167a4ae0f33
Author: Matt Turner <mattst88@gmail.com>
Date:   Mon Jan 13 14:47:48 2020 -0800

    xserver 1.20.7
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit 279789183ed377127073955d21d44ee3b01ac763
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Mon Sep 23 15:12:01 2019 -0700

    ospoll: Fix Solaris ports implementation to build on Solaris 11.4
    
    Wrong version got committed, but wasn't noticed since it only builds
    with meson, not autoconf.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 0e8c0d2f238e5d50daaf4672bd80ad519673b5e3)

commit cc503031c32496efb28ed81d32a547ded46a0815
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Feb 21 15:38:07 2019 -0800

    os-support/solaris: Set IOPL for input thread too
    
    Since the Solaris kernel tracks IOPL per thread, and doesn't inherit
    raised IOPL levels when creating a new thread, we need to turn it on
    in the input thread for input drivers like vmmouse that need register
    access to work correctly.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 12769c516d9356bd92f90e2f53a4853dbfdc4aed)

commit f778e76eb4bc6b9219a8b1a903a2fb1a30c2c92a
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Feb 21 15:35:38 2019 -0800

    Add xf86OSInputThreadInit call from common layer into os-support layer
    
    Allows os backends to run additional code as necessary to set up the
    input thread.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit ea1527a8a662dcc5ac3ed49135740aa5f24f74bc)

commit e3f26605d85d987da434640f52646d728f1fe919
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Feb 21 15:22:57 2019 -0800

    Add ddxInputThread call from os layer into ddx layer
    
    Allows ddx's to run additional code as necessary to set up the
    input thread.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 4ad21c3247d98ac6c5ad71fa36be60ed04f7c92c)

commit bb405cdc85b6e31c0beef60a07a2cfe5b87dcde6
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Thu Feb 21 14:51:22 2019 -0800

    os-support/solaris: Drop ExtendedEnabled global variable
    
    Keeping track of kernel state in user space doesn't buy us anything,
    and introduces bugs, as we were keeping global state but the Solaris
    kernel tracks IOPL per thread.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 7533fa9bd5a4a0f7743d553be186514d684308c8)

commit 977f3acfceb91f1dd10c8bf84b9d7515b2a59457
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Dec 20 15:51:00 2019 +0100

    glamor: Only use dual blending with GLSL >= 1.30
    
    It can't be used with older GLSL. Fixes a crash when attempting to
    anyway.
    
    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/97
    Fixes: e7308b6c7756 "glamor: Add support for CA rendering in a single pass."
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    (Cherry picked from commit 5bfca0038e92d61e58d4dc1a54748faef8273023)

commit cfc5e5040c93486323165196550dbe18aec46402
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Thu Dec 26 13:40:17 2019 -0800

    modesetting: Check whether RandR was initialized before calling rrGetScrPriv
    
    Calling rrGetScrPriv when RandR isn't initialized causes an assertion
    failure that aborts the server:
    
     Xorg: ../include/privates.h:121: dixGetPrivateAddr: Assertion `key->initialized' failed.
    
     Thread 1 "Xorg" received signal SIGABRT, Aborted.
     0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
     (gdb) bt
     #0  0x00007ffff78a8f25 in raise () from /usr/lib/libc.so.6
     #1  0x00007ffff7892897 in abort () from /usr/lib/libc.so.6
     #2  0x00007ffff7892767 in __assert_fail_base.cold () from /usr/lib/libc.so.6
     #3  0x00007ffff78a1526 in __assert_fail () from /usr/lib/libc.so.6
     #4  0x00007ffff7fb57c1 in dixGetPrivateAddr (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:121
     #5  0x00007ffff7fb5822 in dixGetPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:136
     #6  0x00007ffff7fb586a in dixLookupPrivate (privates=0x555555ab1b60, key=0x555555855720 <rrPrivKeyRec>) at ../include/privates.h:166
     #7  0x00007ffff7fb8445 in CreateScreenResources (pScreen=0x555555ab1790) at ../hw/xfree86/drivers/modesetting/driver.c:1335
     #8  0x000055555576c5e4 in xf86CrtcCreateScreenResources (screen=0x555555ab1790) at ../hw/xfree86/modes/xf86Crtc.c:744
     #9  0x00005555555d8bb6 in dix_main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/main.c:214
     #10 0x00005555557a4f0b in main (argc=4, argv=0x7fffffffead8, envp=0x7fffffffeb00) at ../dix/stubmain.c:34
    
    This can happen, for example, if the server is configured with Xinerama
    and there is more than one X screen:
    
     Section "ServerLayout"
       Identifier "crash"
       Screen 0 "modesetting"
       Screen 1 "dummy" RightOf "modesetting"
       Option "Xinerama"
     EndSection
    
     Section "Device"
       Identifier "modesetting"
       Driver "modesetting"
     EndSection
    
     Section "Screen"
       Identifier "modesetting"
       Device "modesetting"
     EndSection
    
     Section "Device"
       Identifier "dummy"
       Driver "dummy"
     EndSection
    
     Section "Screen"
       Identifier "dummy"
       Device "dummy"
     EndSection
    
    The problem does not reproduce if there is only one X screen because of
    this code in xf86RandR12Init:
    
     #ifdef PANORAMIX
         /* XXX disable RandR when using Xinerama */
         if (!noPanoramiXExtension) {
             if (xf86NumScreens == 1)
                 noPanoramiXExtension = TRUE;
             else
                 return TRUE;
         }
     #endif
    
    Fix the problem by checking dixPrivateKeyRegistered(rrPrivKey) before
    calling rrGetScrPriv. This is similar to what the xf86-video-amdgpu
    driver does:
    https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/blob/fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c/src/amdgpu_kms.c#L388
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit 4226c6d0329df440551b7b91ae573a82c64a1ac9)

commit fb2540648a293def46bf0afa183e0884fa4496be
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 29 16:19:55 2019 +1000

    Xi: return AlreadyGrabbed for key grabs > 255
    
    We can't have high keycodes because everything in XKB relies on 8 bits. XI2's
    API allows for 32-bit keycodes so we have to take those but nothing in the
    server is really ready for this. The effect of this right now is that any high
    keycode grab is clipped to 255 and thus ends up grabbing a different key
    instead.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1697804
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit f4cdbf640b6440df4af784ca35e1b1340965cc10)

commit 87ca1bdf6935c4b11b41ca071f1f4b8d8347fee9
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Dec 3 18:39:40 2019 +0100

    xwayland: Do flush GPU work in xwl_present_flush
    
    The Present code sends the idle notification event to the client after
    xwl_present_flush returns. If we don't flush our GPU work here, the
    client may race to draw another frame to the same buffer, so we may end
    up copying (parts of) that new frame instead of the one we meant to.
    
    Fixes https://gitlab.freedesktop.org/xorg/xserver/issues/835
    
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (Cherry picked from commit 2a2234ad1a0fe88400c1511fea67741e4ad09f7f)
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

commit 8aad09dd79f0504715edac56e21439809a5d529e
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Nov 26 17:17:12 2019 +0100

    modesetting: Clear new screen pixmap storage on RandR resize
    
    Fixes random garbage being visible intermittently.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (Cherry picked from commit 9ba13bac9dd076f166ff0d063fc144b904a40d12)
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

commit 094f42cdfe5d4c0b8e329445c529ee1e59278999
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Nov 26 17:16:37 2019 +0100

    xfree86/modes: Call xf86RotateRedisplay from xf86CrtcRotate
    
    If a new rotate buffer was allocated. This makes sure the new buffer
    has valid transformed contents when it starts being displayed.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (Cherry picked from commit 327df450ffcf5bda5b4254db0208d355860d1010)
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

commit b50175fe867ae067888049318264824524c0616a
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Nov 26 17:14:46 2019 +0100

    modesetting: Call glamor_finish from drmmode_crtc_set_mode
    
    This makes sure any pending drawing to a new scanout buffer will be
    visible from the start.
    
    This makes the finish call in drmmode_copy_fb superfluous, so remove it.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    (Cherry picked from commit c66c548eabf06835cb0cb906598fb87c7bb30cf4)
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>

commit 255d8c3c36a9d52b3acc5e016efa0ef0f2371f79
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Nov 21 23:03:50 2019 -0800

    modesetting: Use EGL_MESA_query_driver to select DRI driver if possible
    
    We now ask Glamor to use EGL_MESA_query_driver to obtain the DRI driver
    name; if successful, we use that as the DRI driver name.  Following the
    existing dri2.c logic, we also use the same name for the VDPAU driver,
    except for i965 (and now iris), where we switch to the "va_gl" fallback.
    
    This allows us to bypass the PCI ID lists in xserver and centralize the
    driver selection mechanism inside Mesa.  The hope is that we no longer
    have to update these lists for any future hardware.
    
    (backported from commit 8d4be7f6c4f7c673d7ec1a6bfdef944907a3916e)
    
    Acked-by: Michel Dänzer <mdaenzer@redhat.com>

commit 2a1a96d956f4023796737d26a32354e940c8e6cf
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Nov 21 23:01:28 2019 -0800

    glamor: Add a function to get the driver name via EGL_MESA_query_driver
    
    This maps to eglGetDisplayDriverName if EGL_MESA_query_render is
    supported, otherwise it returns NULL.
    
    (cherry picked from commit 195c2ef8f9f07b9bdabc0f554a9033b7857b99c7)

commit 6b3fafa9bfa94b9b04a1a44dc52afb7c4bc250ce
Author: Matt Turner <mattst88@gmail.com>
Date:   Fri Nov 22 17:52:04 2019 -0500

    xserver 1.20.6
    
    Signed-off-by: Matt Turner <mattst88@gmail.com>

commit 88f12aa74bf4fea25d5b8d8002b3088432feb405
Author: Matt Turner <mattst88@gmail.com>
Date:   Thu Nov 21 11:23:18 2019 -0500

    xfree86: Test presence of isastream()
    
    isastream() was never more than a stub in glibc, and was removed in
    glibc-2.30 by commit a0a0dc83173c ("Remove obsolete, never-implemented
    XSI STREAMS declarations").
    
    Bug: https://bugs.gentoo.org/700838
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    Signed-off-by: Matt Turner <mattst88@gmail.com>
    (cherry picked from commit e6ab7f9f342f463092c45226f3294074351fdd5e)

commit 0e60139064b84b856c59e5a456e26c60710b1b69
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Mon Nov 18 17:28:45 2019 +0100

    present/wnmd: Relax assertion on CRTC on abort_vblank()
    
    Currently, the function `present_wnmd_abort_vblank()` would fail if the
    given `crtc` is NULL.
    
    However, `xwl_present_get_crtc()` can return `NULL` under some
    circumstances, which would cause an unexpected termination of Xwayland
    in such a case, caused by the assertion failure being triggered.
    
    Remove the assertion, considering that the `crtc` isn't actually used in
    neither `present_wnmd_abort_vblank()` nor `xwl_present_abort_vblank()`.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/937
    (cherry picked from commit 4f984fc06bd57cabfa38f6191f10714878dc8969)

commit 2edadf26f1f8deddbe171115fa502337ac62df02
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Tue Nov 19 10:08:51 2019 -0800

    os: Don't crash in AttendClient if the client is gone
    
    If a client is in the process of being closed down, then its client->osPrivate
    pointer will be set to NULL by CloseDownConnection. This can cause a crash if
    freeing the client's resources results in a call to AttendClient. For example,
    if the client has a pending sync fence:
    
     Thread 1 "X" received signal SIGSEGV, Segmentation fault.
     AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
     (gdb) bt
     #0  AttendClient (client=0x5571c4aed9a0) at ../os/connection.c:942
     #1  0x00005571c3dbb865 in SyncAwaitTriggerFired (pTrigger=<optimized out>) at ../Xext/sync.c:694
     #2  0x00005571c3dd5749 in miSyncDestroyFence (pFence=0x5571c5063980) at ../miext/sync/misync.c:120
     #3  0x00005571c3dbbc69 in FreeFence (obj=<optimized out>, id=<optimized out>) at ../Xext/sync.c:1909
     #4  0x00005571c3d7a01d in doFreeResource (res=0x5571c506e3d0, skip=skip@entry=0) at ../dix/resource.c:880
     #5  0x00005571c3d7b1dc in FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1146
     #6  FreeClientResources (client=0x5571c4aed9a0) at ../dix/resource.c:1109
     #7  0x00005571c3d5525f in CloseDownClient (client=0x5571c4aed9a0) at ../dix/dispatch.c:3473
     #8  0x00005571c3d55eeb in Dispatch () at ../dix/dispatch.c:492
     #9  0x00005571c3d59e96 in dix_main (argc=3, argv=0x7ffe7854bc28, envp=<optimized out>) at ../dix/main.c:276
     #10 0x00007fea4837cb6b in __libc_start_main (main=0x5571c3d1d060 <main>, argc=3, argv=0x7ffe7854bc28, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7ffe7854bc18) at ../csu/libc-start.c:308
     #11 0x00005571c3d1d09a in _start () at ../Xext/sync.c:2378
     (gdb) print client->osPrivate
     $1 = (void *) 0x0
    
    Since the client is about to be freed, its ignore count doesn't matter and
    AttendClient can simply be a no-op. Check for client->clientGone in AttendClient
    and remove similar checks from two callers that had them.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    (cherry picked from commit 4308f5d3d1fbd0f5dce81e22c0c3f08c65a7c9d8)

commit 68cfee97bc59580724d594c82f5ee55a980dadf0
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 9 11:57:18 2019 -0400

    dix: Call SourceValidate before GetImage
    
    This ensures that any prep work for the drawable we're about to read
    from is already done before we call down to GetImage. This should be no
    functional change as most of the callers with a non-trivial
    SourceValidate are already wrapping GetImage and doing the equivalent
    thing, but we'll be simplifying that shortly.
    
    More importantly this ensures that if any of that prep work would
    generate events - like automatic compositing flushing rendering to a
    parent pixmap which then triggers damage - then it happens entirely
    before we start writing the GetImage reply header.
    
    Note that we do not do the same for GetSpans, but that's okay. The only
    way to get to GetSpans is through miCopyArea or miCopyPlane - where the
    callers must already call SourceValidate - or miGetImage - which this
    commit now protects with SourceValidate.
    
    Fixes: xorg/xserver#902
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit 516e75dbb6bbf97c7af9c2226242ffd9259fec11)

commit 2320fd4b52a60411714170d516fc58e6ec516353
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 9 11:27:12 2019 -0400

    mi: Add a default no-op miSourceValidate
    
    Slightly simplifies the callers since they don't need to check for
    non-NULL anymore.
    
    I do extremely hate the workarounds here to suppress misprite taking the
    cursor down though. Surely there's a better way.
    
    [1.20: Do not in fact simplify the callers as above, since it would
    change the ABI. - ajax]
    
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    (cherry picked from commit ff310903f34ac34c916ad74e919d1ac12aea4715)

commit 07efd81b819f21046afc0bb7e19a6cdf7f3c7ea9
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Mon Jul 1 13:20:39 2019 +0200

    compiler.h: Do not include sys/io.h on ARM with glibc
    
    <sys/io.h> on ARM hasn't worked for a long, long time, so it was removed
    it from glibc upstream.
    
    Remove the include to avoid a compilation failure on ARM with glibc.
    
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Closes: https://gitlab.freedesktop.org/xorg/xserver/issues/840
    (cherry picked from commit fe4cd0e7f5c58fa94db36326aadc1bd4e6d73eba)

commit 03b91e17ce72649b2d6946213f5a7d152bfe7098
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Wed Nov 6 10:45:43 2019 -0800

    xfree86: Call ScreenInit for protocol screens before GPU screens
    
    During startup, the xfree86 DDX's InitOutput() calls PreInit for
    protocol screens first, and then GPU screens. On teardown, dix_main()
    calls CloseScreen in the reverse order: GPU screens first starting with
    the last one and then working backwards, and then protocol screens also
    in reverse order.
    
    InitOutput() calls ScreenInit in the wrong order: for GPU screens first and then
    for protocol screens. This causes a problem for drivers that have global state
    that is tied to the first screen that calls ScreenInit.
    
    Fix this by simply re-ordering the for loops to call PreInit for
    protocol screens first and then for GPU screens second.
    
    (cherry picked from commit e5e9a8ca91d1c087edd8788a110251ad940dbc94)

commit 325f694e97a117aec47aa2e1a9b2b28c3c47994e
Author: Alex Goins <agoins@nvidia.com>
Date:   Tue Sep 17 18:36:35 2019 -0500

    modesetting: Implement ms_covering_randr_crtc() for ms_present_get_crtc()
    
    ms_present_get_crtc() returns an RRCrtcPtr, but derives it from a xf86CrtcPtr
    found via ms_dri2_crtc_covering_drawable()=>ms_covering_crtc(). As a result, it
    depends on all associated DIX ScreenRecs having an xf86CrtcConfigPtr DDX
    private.
    
    Some DIX ScreenRecs don't have an xf86CrtcConfigPtr DDX private, but do have an
    rrScrPrivPtr DDX private. Given that we can derive all of the information we
    need from RandR, we can support these screens by avoiding the use of xf86Crtc.
    This change implements an RandR-based path for ms_present_get_crtc(), allowing
    drawables to successfully fall back to syncing to the primary output, even if
    the slave doesn't have an xf86CrtcConfigPtr DDX private.
    
    Without this change, if a slave doesn't have an xf86CrtcConfigPtr DDX private,
    drawables will fall back to 1 FPS if they overlap an output on that slave.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    (cherry picked from commit 562c7888be538c4d043ec1f374a9d9afa0b305a4)

commit aa43dce15f69624ce939bb69bafc3df5a9b78dbb
Author: Alex Goins <agoins@nvidia.com>
Date:   Tue Sep 17 18:03:34 2019 -0500

    modesetting: Fix ms_covering_crtc() segfault with non-xf86Crtc slave
    
    DIX ScreenRecs don't necessarily have an xf86CrtcConfigPtr DDX private.
    ms_covering_crtc() assumes that they do, which can result in a segfault.
    
    Update ms_covering_crtc() to check the XF86_CRTC_CONFIG_PTR() returned pointer
    before dereferencing it. This will still mean that ms_covering_crtc() can't fall
    back to the primary output when a drawable overlaps a slave output (going to the
    1 FPS default instead), but it won't segfault.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    (cherry picked from commit 797e7a0ceb673fe2870c673e248835526a84d000)

commit 341a4787157c68597951727d5d11a2813a31ec7e
Author: Alex Goins <agoins@nvidia.com>
Date:   Wed Aug 28 18:24:16 2019 -0500

    modesetting: Fix ms_covering_crtc() segfault with non-modesetting slave primary
    
    ms_covering_crtc() uses RRFirstOutput() to determine a primary output to fall
    back to if a drawable is overlapping a slave output.
    
    If the primary output is a slave output, RRFirstOutput() will return a slave
    output even if passed a master ScreenPtr. ms_covering_crtc() dereferences the
    output's devPrivate, which is invalid for non-modesetting outputs, and can
    crash.
    
    Changing RRFirstOutput() could have unintended side effects for other callers,
    so this change replaces the call to RRFirstOutput() with ms_first_output().
    ms_first_output() ignores the primary output if it doesn't match the given
    ScreenPtr, choosing the first connected output instead.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    (cherry picked from commit 3ef9029ace4245d9f8929aa71e22bc6a6f40b7b3)

commit 2dd9dfc8d9a5dc906ee06d667a756ab267f55e64
Author: Alex Goins <agoins@nvidia.com>
Date:   Wed Sep 4 12:25:31 2019 -0500

    randr: Fix RRCrtcDetachScanoutPixmap() segfault during server teardown
    
    During server teardown, mrootdraw is NULL, which can cause segfaults if
    master->Stop{,Flipping}PixmapTracking() don't do NULL checking. In this case we
    shouldn't need to do master->Stop{,Flipping}PixmapTracking() anyway, so just
    skip it.
    
    Signed-off-by: Alex Goins <agoins@nvidia.com>
    (cherry picked from commit c82f814313a813d7e1a2d7d3b1f7561810446b34)

commit 642c1f83b9ed2452ceb20457a4423a8f52a7a8c4
Author: Hans de Goede <hdegoede@redhat.com>
Date:   Mon Nov 4 20:03:17 2019 +0100

    glamor/xwayland: Define EGL_NO_X11
    
    Define EGL_NO_X11 everywhere were we also define MESA_EGL_NO_X11_HEADERS,
    EGL_NO_X11 is the MESA_EGL_NO_X11_HEADERS equivalent for the egl headers
    shipped with libglvnd.
    
    This fixes the xserver not building with the libglvnd-1.2.0 headers:
    
    In file included from /usr/include/EGL/eglplatform.h:128,
                     from /usr/include/epoxy/egl_generated.h:11,
                     from /usr/include/epoxy/egl.h:46,
                     from glamor_priv.h:43,
                     from glamor_composite_glyphs.c:25:
    /usr/include/X11/Xlib.h:222:2: error: conflicting types for 'GC'
      222 | *GC;
          |  ^~
    In file included from glamor.h:34,
                     from glamor_priv.h:32,
                     from glamor_composite_glyphs.c:25:
    ../include/gcstruct.h:282:3: note: previous declaration of 'GC' was here
      282 | } GC;
          |   ^~
    
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 741bd73429e337071f49509ddcc5fb392e20b0f6)

commit 2f55e8dc270fb65e8ff013c5e846a1a510c761e0
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 9 16:03:17 2019 -0400

    meson: Apparently 1.2 is < 1.2.0
    
    Siiiigh.
    
    (cherry picked from commit 3340ddf37743fdf197dfc16a97107435ff53c6e4)

commit e16eb696f2238796827794d2d3b23f268cf4daf0
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 9 15:17:47 2019 -0400

    meson: Fix another reference to "gl" 9.2.0
    
    Previous commit e6ef2b12 missed a spot.
    
    (cherry picked from commit c7486613b0dc586f93f6ba293d9b55c69995b05c)

commit a57729d3180ee4bc3ae012cfd03fe5188d858a83
Author: Marvin Schmidt <marv@exherbo.org>
Date:   Tue Sep 24 09:58:43 2019 +0200

    build: glx: Lower gl version to work with libglvnd
    
    When using mesa with libglvnd support, mesa will no longer install the
    gl, glx, egl pkg-config files but instead let libglvnd provide them.
    libglvnd maintainers decided to change the versioning as it was
    mesa-specific previously. Now the libraries have versions of the API
    they expose[1].
    This causes problems when building the X server:
    
      checking for glproto >= 1.4.17 gl >= 9.2.0... no
      configure: error: Package requirements (glproto >= 1.4.17 gl >= 9.2.0) were not met:
    
      Requested 'gl >= 9.2.0' but version of gl is 1.2
    
    Lower the version requirement to 1.2 to allow building against libglvnd
    provided libraries
    
    [1] https://github.com/NVIDIA/libglvnd/commit/0dfaea2bcb7cdcc785f95e244223bd004a2d7fba
    
    (cherry picked from commit e6ef2b12404dfec7f23592a3524d2a63d9d25802)

commit 3491f1dc5c701656e2f69f74b459dfcaef9451d6
Author: Sven Joachim <svenjoac@gmx.de>
Date:   Wed Oct 2 18:26:07 2019 +0200

    modesetting: Fix broken manpage in autoconf build
    
    The autoconf build for the modesetting driver still relied on
    xorg-macros.m4 for string replacements and did not include the
    top-level manpages.am.  As a result, no substitutions took place after
