commit 82f8fc5ffc0065537896ec43ae60d67d9a164c75
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu May 10 12:24:11 2018 -0400

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

commit b6bf68b8416ec4b717eb78703fb63789c68e509a
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Wed May 2 12:54:26 2018 -0700

    meson: Fix module_dir configuration (v2)
    
    meson.build has code to set the module_dir variable to
    ${libdir}/xorg/modules if the module_dir option string is empty.
    However, this has several problems:
    
    1. The variable is only used for an unused @moduledir@ substitution in
       the man page. The rule for xorg-server.pc uses option('module_dir')
       directly instead.
    2. The 'module_dir' option has a default value of 'xorg/modules' so the
       above rule doesn't do anything by default.
    3. The xorg-server.pc rule uses ${exec_prefix}/option('module_dir'), so
       the effect of #2 is that the default moduledir is different between
       autoconf and meson. E.g. if ${prefix} is /X, then you get
    
         autoconf: moduledir=/X/lib/xorg/modules
         meson:    moduledir=/X/xorg/modules
    
    Fix this by using the module_dir variable when generating xorg-server.pc, and by
    using join_paths() to assign module_dir unconditionally.
    
    v2: Keep the 'xorg/modules' default path, but use join_paths() unconditionally (Thierry Reding)
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 9d628ee5facf6318368d5b8ca181e083adcffe8c
Author: Roman Gilg <subdiff@gmail.com>
Date:   Wed May 2 21:32:48 2018 +0200

    modesetting: set gbm as dependency in meson build
    
    Modifiers support needs gbm as a dependency. Without setting the dependency
    included headers are not found reliably and the build might fail if the
    headers are not placed in the default system include paths.
    
    Signed-off-by: Roman Gilg <subdiff@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 0445705a8bbf76a5532997823ea8110daff26c6d
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon May 7 17:21:20 2018 -0400

    man: Fix automake seddery
    
    Because this is an automakefile, things inside @@ get expanded, which
    means your sed ends up saying s|/var/log|/var/log| and your manual pages
    still have @logdir@ in them. Fix this by hiding the @s inside a trivial
    character range, which keeps the pattern preserved all the way into the
    Makefile.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 9f21872ad8591c1f6f8ea1e466f212c3582d3c33
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon May 7 17:21:19 2018 -0400

    glx: Be sure to set an error for ghost contexts
    
    Otherwise the caller is going to return garbage memory for the error
    value.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit b9f415cbad47412bfb218cf7375d0c2856a27d1b
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon May 7 17:21:18 2018 -0400

    present: Fix swapping of PresentCompleteNotify events
    
    The code would fall through to the PresentIdleNotify case, and nothing
    good would come of it.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit cc66777d85f3509b0f9dfc9210d0a0415a2a388d
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon May 7 17:21:17 2018 -0400

    xwayland: Don't create a "fake" crtc for Present
    
    We probably don't want a fake crtc to be visible to clients, and we
    definitely don't want to generate events every time we create such a
    fake (which would happen as a side effect from RRCrtcCreate hitting
    RRTellChanged). As it happens we're not actually using that crtc for
    anything because xwayland doesn't store any state on the crtc object,
    so it suffices to use the real crtc for the screen.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Tested-by: Roman Gilg <subdiff@gmail.com>
    Reviewed-by: Roman Gilg <subdiff@gmail.com>

commit b23a0e4ded62500f2c248f23962ff5ac718467e6
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 7 16:46:20 2018 -0700

    xwayland: Fix a 32-bit build warning.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit ef95331603ff31d3643360c399b3865db5b0b97d
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 7 16:46:19 2018 -0700

    dri3: Switch fds_from_pixmap to stdint types.
    
    Again, this was causing 32-bit build warnings due to mixing CARD* and
    stdint.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 4c754b01fafc4b042d9918c05a71157f6fa6392a
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 7 16:46:18 2018 -0700

    dri3: Switch get_modifiers to using stdint.
    
    We were mixing stdint and CARD* types, causing compiler warnings on
    32-bit.  Just switch over to stdint, which is what we'd like the server
    to be using long term, anyway.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 5e86484a183f051d7a8a67ea13c23a3d6e69e76b
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 7 16:46:17 2018 -0700

    dri3: Switch get_drawable_modifiers to using stdint.
    
    We were mixing stdint and CARD* types, causing compiler warnings on
    32-bit.  Just switch over to stdint, which is what we'd like the server
    to be using long term, anyway.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 4ec02b573ef2424965d7ce2d33d150ddb92ec544
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 7 16:46:16 2018 -0700

    randr: Fix a compiler warning on 32-bit.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit e1ccd0fa0e1081edf8a2c69ce6e8e3f67a4aecba
Author: Eric Anholt <eric@anholt.net>
Date:   Mon May 7 16:46:15 2018 -0700

    dix: Fix a warning about GetTimeInMillis return value in XFont2.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit cf838f5ca81e0c967902b74fb1971bc6fac5c601
Author: Roman Gilg <subdiff@gmail.com>
Date:   Fri May 4 03:07:31 2018 +0200

    xwayland: persistent window struct on present
    
    Instead of reusing xwl_window introduce a persistent window struct for every
    window, that asks for Present flips.
    
    This struct saves all relevant data and is only freed on window destroy.
    
    Signed-off-by: Roman Gilg <subdiff@gmail.com>
    Tested-by: Olivier Fourdan <ofourdan@redhat.com>

commit c9afd8cb5ec975b189ab7b678e1f997d6a2ba5ee
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Sun May 6 07:34:31 2018 +0200

    modesetting: Fix and improve ms_kernel_msc_to_crtc_msc()
    
    The old 32-Bit wraparound handling didn't actually work, due to some
    integer casting bug, and the mapping was ill equipped to deal with input
    from the new true 64-bit GetCrtcSequence/QueueCrtcSequence api's
    introduced in Linux 4.15.
    
    For 32-Bit truncated input from pageflip events and old vblank events
    and old drmWaitVblank ioctl, implement new wraparound handling, which
    also allows to deal with wraparound in the other direction, e.g., if a
    32-Bit truncated sequence value is passed in, whose true 64-Bit
    in-kernel hw value is within 2^30 counts of the previous processed
    value, but whose 32-bit truncated sequence value happens to lie just
    above or below a 2^32 boundary, iow. one of the two values 'sequence'
    vs. 'msc_prev' lies above a 2^32 border, the other one below it.
    
    The method is directly translated from Mesa's proven implementation of
    the INTEL_swap_events extension, where a true underlying 64-Bit wide
    swapbuffers count (SBC) needs to get reconstructed from a 32-Bit LSB
    truncated SBC transported over the X11 protocol wire. Same conditions
    apply, ie. successive true 64-Bit SBC values are close to each other,
    but don't always get received in strictly monotonically increasing
    order. See Mesa commit cc5ddd584d17abd422ae4d8e83805969485740d9 ("glx:
    Handle out-of-sequence swap completion events correctly. (v2)") for
    explanation.
    
    Additionally add a separate path for true 64-bit msc input originating
    from Linux 4.15+ drmCrtcGetSequence/QueueSequence ioctl's and
    corresponding 64-bit vblank events. True 64-bit msc's don't need
    remapping and must be passed through.
    
    As a reliability bonus, they are also used here to update the tracking
    values msc_prev and ms_high with perfect 64-Bit ground truth as baseline
    for mapping msc from pageflip completion events, because pageflip events
    are always 32-bit wide, even when the new kernel api's are used. Because
    each pageflip(-event) is always preceeded close in time (and vblank
    count) by a drmCrtcQueueSequence queued event or drmCrtcGetSequence
    query as part of DRI2 or DRI3+Present swap scheduling, we can be certain
    that each pageflip event will get its truncated 32-bit msc remapped
    reliably to the true 64-bit msc of flip completion whenever the sequence
    api is available, ie. on Linux 4.15 or later.
    
    Note: In principle at least the 32-bit mapping path could also be
    backported to earlier server branches, as this seems to be broken for at
    least server 1.16 to 1.19.
    
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Cc: Keith Packard <keithp@keithp.com>
    Cc: Michel Dänzer <michel.daenzer@amd.com>

commit 73f0ed2d928afc692ed057eb3d7627328a6e5b12
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Fri May 4 14:14:10 2018 +0200

    modesetting: Remove ms_crtc_msc_to_kernel_msc().
    
    The function is ported from intel-ddx uxa backend around 2013, where its
    stated purpose was to apply a vblank_offset to msc values to correct for
    problems with those kernel provided msc values. Some (somewhat magic and
    puzzling to myself) heuristic tried to guess if provided values were
    unreasonable and tried to adapt the corrective vblank_offset to account
    for that.
    
    Except: It wasn't applied to kernel provided msc values, but the values
    delivered by clients via DRI2 or Present, so valid client targetmsc
    values, e.g., requesting a vblank event > 1000 vblanks in the future,
    triggered the offset correction in arbitrarily wrong ways, leading to
    wrong msc values being returned and thereby vblank events queued to the
    kernel for the wrong time. This causes glXSwapBuffersMscOML and
    glXWaitForMscOML to swap / return immediately whenever a swap/wait in >
    1000 vblanks is requested.
    
    The original code was also written to only deal with 32 bit mscs, but
    server 1.20 modesetting ddx can now use new Linux 4.15+ kernel vblank
    api to process true 64 bit msc's, which may confuse the heuristic even
    more due to 32 bit integer truncation/wrapping.
    
    This code caused various problems in the intel-ddx in the past since
    year 2013, and was removed there in 2015 by Chris Wilson in commit
    42ebe2ef9646be5c4586868cf332b4cd79bb4618:
    
    "    uxa: Remove the filtering of bogus Present MSC values
    
        If the intention was to filter the return values from the kernel, the
        filtering would have been applied to the kernel values and not to the
        incoming values from Present. This filtering introduces crazy integer
        promotion and truncation bugs all because Present feeds garbage into its
        vblank requests.
    
    "
    
    Indeed, i found a Mesa bug yesterday which can cause Mesa's
    PresentPixmap request to spuriously feed garbage targetMSC's into the
    driver under some conditions. However, while other video drivers seem to
    cope relatively well with that, modesetting ddx causes KDE-5's
    plasmashell to lock up badly quite frequently, and my suspicion is that
    the code removed in this commit is one major source of the extra
    fragility.
    
    Also my own tests fail for any swap scheduled more than 1000 vblanks
    into the future, which is not uncommon for some scientific applications.
    
    Iow. modesetting's swap scheduling seems to be more robust without this
    function afaics.
    
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Cc: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: Keith Packard <keithp@keithp.com>
    Tested-by: Mike Lothian <mike@fireburn.co.uk>

commit f5ded22e14e2e15390eff8e01ce32de496ae0e86
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Fri May 4 10:48:17 2018 -0700

    meson: Set XCONFIGFILE to 'xorg.conf' instead of '/etc/xorg.conf'
    
    The autoconf build hard-codes XCONFIGFILE to just 'xorg.conf':
    
     XF86CONFIGFILE="xorg.conf"
     AC_DEFINE_DIR(XCONFIGFILE, XF86CONFIGFILE, [Name of configuration file])
    
    Later, the X server passes that into DoSubstitution() which expands the path:
    
     DoSubstitution(template="/etc/X11/%X", ..., XConfigFile="xorg.conf")
    
    This returns "/etc/X11/xorg.conf".
    
    The Meson build, on the other hand, sets XCONFIGFILE to
    join_paths(get_option('sysconfdir'), 'xorg.conf'). If sysconfdir is /etc, this
    results in '/etc/xorg.conf', resulting in DoSubstitution returning
    '/etc/X11/etc/xorg.conf'.
    
    Fix this by just hard-coding XCONFIGFILE to 'xorg.conf'.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>

commit 1a3e4a2f6722048c5c7c4c1a9d6748e68a895a3e
Author: Aaron Plattner <aplattner@nvidia.com>
Date:   Fri May 4 15:09:22 2018 -0700

    meson: Define DEFAULT_LIBRARY_PATH as join_paths(get_option('prefix'), get_option('libdir'))
    
    'libdir' defaults to 'lib', so running X -showDefaultLibPath just prints 'lib'
    instead of '/usr/lib' or '/usr/local/lib'. Use joint_paths() to get the correct
    full path.
    
    Signed-off-by: Aaron Plattner <aplattner@nvidia.com>
    Reviewed-by: Thierry Reding <treding@nvidia.com>

commit 1dcd784a677c58e77c368a676fd9dbd3159db94f
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Thu May 3 11:29:11 2018 -0700

    dri2: Sync i965_pci_ids.h from mesa
    
    Copied from Mesa with no modifications.
    
    Gives us Cofeelake platform names updates and sync on Kaby Lake,
    Ice Lake PCI IDs.
    
    Acked-by: Kenneth Graunke <kenneth@whitecape.org>
    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>

commit 4191b59bd5458ea3a8b0d5272bdcd250fee1e129
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed May 2 15:09:52 2018 -0400

    meson: Fix build with three-component version numbers
    
    Otherwise:
    
    include/meson.build:5:0: ERROR: Index 3 out of bounds of array of size 3.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 531e1648fc0da03816ecc57481479e6fc6a45ac3
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Apr 25 13:39:18 2018 -0400

    gitlab-ci: Add for gitlab.freedesktop.org
    
    Looks quite a bit like the travis path, doesn't it? Still, nice to not
    rely on an external service if we don't have to.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 22285a6f1c5fa6ba22f4214c4ccc09e27d1925f6
Author: Roman Gilg <subdiff@gmail.com>
Date:   Fri Apr 20 17:10:06 2018 +0200

    present: fix msc offset calculation in window mode
    
    Instead of getting the current msc value from the window, which might be
    different to old one directly take the last saved msc value saved in
    the window_priv struct.
    
    Signed-off-by: Roman Gilg <subdiff@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit d7297b00444b0e2cd936fbfb08206a575ab8c29d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Apr 30 15:19:53 2018 -0700

    randr: Account for panning and transforms when constraining the cursor
    
    commit 56c90e29f04727c903bd0f084d23bf44eb1a0a11 [1.10.99.901]
    Author: Adam Jackson <ajax@redhat.com>
    Date:   Mon Nov 15 14:29:14 2010 -0500
    
        randr: Add RRConstrainCursorHarder
    
    introduced a regression as it ignored the effect of panning and
    transforms upon the crtc bounds. The result was that the cursor would be
    constrained to the visible area even though the panning arena was much
    bigger, or the cursor was constrained to a region that did not even
    match the visible area when the output was transformed or reflected.
    
    This supercedes the hack introduced by
    commit 1bf81af4a6be1113bcc3b940ab264d5c9e0f0c5d [1.12.99.904]
    Author: Rui Matos <tiagomatos@gmail.com>
    Date:   Mon Jul 30 14:32:12 2012 -0400
    
        xf86RandR12: Don't call ConstrainCursorHarder() if panning is enabled
    which disabled the cursor constraints if a panning mode was active, but
    did not fix the regression with arbitrary output transforms.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=39949
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Cc: Rui Matos <tiagomatos@gmail.com>

commit a843c61456b2046fb1780415f17162b503243af7
Author: Roman Gilg <subdiff@gmail.com>
Date:   Fri Apr 20 17:07:42 2018 +0200

    xwayland: restrict present cleanup to presenting and top parent window
    
    Clean up only if the request points to the presenting window or its top
    parent window.
    
    Since in this case all events are removed unconditionally, always stop
    the timer.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Roman Gilg <subdiff@gmail.com>

commit 975d3a509667579b81d88616b91491472059354d
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 30 14:10:26 2018 -0400

    xwayland: Avoid using epoxy_has_egl()
    
    There's no real point - if we don't have EGL then the extension check is
    also going to fail - and the entrypoint is new in 1.5.0, which we don't
    need to require yet.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com>

commit d6f2272f44ce1a7a96ae04fdbde8708514c60771
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 30 14:07:44 2018 -0400

    meson: Bump version number here too
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 6cace4990abc2386b6ea68536b321994d264c295
Author: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
Date:   Thu Apr 26 11:04:15 2018 -0400

    modesetting: Fix GBM objects leak when checking for flip
    
    GBM objects were never destroyed after looking for format and
    modifier compatibility when deciding whether flipping or copying
    a presented pixmap.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106106
    Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>

commit e00ada9fbbddf4570fe38c3ceeb922af7afcfd1a
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Mon Apr 30 09:06:09 2018 +0200

    glamor: Don't fail in glamor_get_formats if not dmabuf_capable.
    
    If dmabuf_capable is false, because the server "dmabuf_capable"
    debug flag isn't set, treat it as successfull query with zero
    returned formats, instead of failure.
    
    This allows the servers cache_formats_and_modifiers() function
    to cache the fact that formats are not supported during the
    current server generation, instead of pointless retesting at
    every invocation.
    
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 55db3c9cfc1bc92a53b75b99e8fa49a32d7efe63
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Mon Apr 30 09:06:08 2018 +0200

    dri3: Robustly clamp to 1.0 if not all screens support 1.2
    
    Checking for dri3_screen_info_rec.version >= 2 is insufficient,
    as some shipping drivers, e.g., intel-ddx, nouveau-ddx, set the
    version to DRI3_SCREEN_INFO_VERSION, ie. to whatever version the
    installed servers headers define. On server 1.20 that would
    be version 2, but the drivers still don't support the v1.2
    hooks. Make sure all hooks are defined before reporting v1.2.
    
    Also make clamping of reported version to minimum of client
    or server robust against possible future clients with possible
    majorVersion >= 2.0.
    
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Cc: Daniel Stone <daniels@collabora.com>

commit fbc5c5cd532962d2df96a04e5c8cc0d21b47b08a
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Mon Apr 30 09:06:07 2018 +0200

    dri3: Fix error handling in dri3_buffer_from_pixmap request.
    
    The old info->fd_from_pixmap() driver hook, which is
    preferentially used in dri3_fd_from_pixmap(), can return
    error codes other than -1, e.g., -EINVAL (-22) on nouveau-ddx.
    
    Not handling the error causes a broken/corrupted X-Connection
    resulting from a failed request.
    
    This fixes failure of sddm-greeter to start up under nouveau-ddx
    with DRI3 enabled and DRI3 protocol version properly clamped
    to 1.0 by the server (see followup patch).
    
    Fixes: 75bba3aedcb0 ("dri3: Use single-FD screen call for single-FD request")
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Cc: Daniel Stone <daniels@collabora.com>

commit 19d006ee3db4b4635ef9ef5c92562f3ffeddb305
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Apr 24 16:08:26 2018 -0400

    dri3: Clamp to 1.0 if not all screens support 1.2
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>

commit 352a5ac87fd344936b759a5766eb74271e7d295d
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Tue Apr 24 10:17:26 2018 +0200

    dri3: Fix DRI3.2 support for drivers other than modesetting-ddx.
    
    Both xf86-video-intel and xf86-video-nouveau cause OpenGL clients to
    fail when used with DRI3 on server 1.20 with Mesa 18.1.
    
    Reason is that the servers DRI3 version is now unconditionally reported
    as DRI3 1.2 to 1.2 capable clients. This causes clients using Mesa 18.1
    to use the new DRI 3.2 requests DRI3GetSupportedModifiers,
    DRI3PixmapFromBuffers, etc. Drivers other than modesetting-ddx do not
    support the needed hooks like info->pixmap_from_fds or
    info->get_formats, info->get_modifiers. Unfortunately we can't simply
    report the servers DRI3 version as 1.0 in this case, as the reported
    version can not be specific to a X-Screen, and different screens may
    have drivers with different capabilities.
    
    Luckily the server has fallbacks to ->pixmap_from_fd, ->fd_from_pixmap,
    and simply reporting an empty set of supported modifiers for the
    DRI3GetSupportedModifiers request if the ddx doesn't support DRI 3.2.
    
    Clients like Mesa 18.1's dri3 loader respond to the empty set of
    reported modifiers by falling back to a dri driver selected buffer
    format (image->createImageWithModifiers responds to a NULL modifier_list
    by acting like ->createImage()). This works, but Mesa 18.1 will still
    try to use the DRI3PixmapFromBuffers request to create the corresponding
    pixmap, just passing in a modifier that corresponds to whatever tiling
    the dri driver selected by default. To prevent this request - and
    thereby the client - from failing with a BadImplementation error, remove
    the check for modifier == DRM_MOD_FORMAT_INVALID in the pixmap_from_fd
    fallback path of dri3_pixmap_from_fds() and trust that if we hit the
    fallback path then the client will have passed a buffer with some driver
    specific default tiling that can be handled by pixmap_from_fd.
    
    Another approach would be for Mesa's dri3 loader to keep track how a
    buffer was created (with explicit modifiers or not), and then call
    DRI3PixmapFromBuffers or DRI3PixmapFromBuffer, but then any future DRI3
    client implementation would need to be fixed, so the server side is
    probably the better place for this.
    
    Tested on Intel Ivybridge and NVidia Pascal.
    
    Fixes: 6e7c40f62db6 ("dri3: Add multi-planar/modifier buffer requests")
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Cc: Daniel Stone <daniels@collabora.com>
    Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
    Tested-by: Mike Lothian <mike@fireburn.co.uk>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit c6ab21022ce876f9c1409db4bb1967134f9f6dbe
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Apr 24 17:03:07 2018 -0400

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

commit c593d843f6305dd8bc5fa7762273d319a223abc4
Author: Daniel Stone <daniels@collabora.com>
Date:   Tue Apr 24 21:27:47 2018 +0100

    dri3: Don't call vfuncs on old DRI3 screens
    
    Only call the get_supported_modifiers vfunc if the DRI3 screen struct is
    sufficiently new.
    
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 54ac09717cd8c49259f53a4a227d903ebe8e0a32
Author: Lyude Paul <lyude@redhat.com>
Date:   Fri Apr 20 14:38:05 2018 -0400

    xwayland: Add glamor egl_backend for EGLStreams
    
    This adds initial support for displaying Xwayland applications through
    the use of EGLStreams and nvidia's custom wayland protocol by adding
    another egl_backend driver. This also adds some additional egl_backend
    hooks that are required to make things work properly.
    
    EGLStreams work a lot differently then the traditional way of handling
    buffers with wayland. Unfortunately, there are also a LOT of various
    pitfalls baked into it's design that need to be explained.
    
    This has a very large and unfortunate implication: direct rendering is,
    for the time being at least, impossible to do through EGLStreams. The
    main reason being that the EGLStream spec mandates that we lose the
    entire color buffer contents with each eglSwapBuffers(), which goes
    against X's requirement of not losing data with pixmaps.  no way to use
    an allocated EGLSurface as the storage for glamor rendering like we do
    with GBM, we have to rely on blitting each pixmap to it's respective
    EGLSurface producer each frame. In order to pull this off, we add two
    different additional egl_backend hooks that GBM opts out of
    implementing:
    
    - egl_backend.allow_commits for holding off displaying any EGLStream
      backed pixmaps until the point where it's stream is completely
      initialized and ready for use
    - egl_backend.post_damage for blitting the content of the EGLStream
      surface producer before Xwayland actually damages and commits the
      wl_surface to the screen.
    
    The other big pitfall here is that using nvidia's wayland-eglstreams
    helper library is also not possible for the most part. All of it's API
    for creating and destroying streams rely on being able to perform a
    roundtrip in order to bring each stream to completion since the wayland
    compositor must perform it's job of connecting a consumer to each
    EGLstream. Because Xwayland has to potentially handle both responding to
    the wayland compositor and it's own X clients, the situation of the
    wayland compositor being one of our X clients must be considered. If we
    perform a roundtrip with the Wayland compositor, it's possible that the
    wayland compositor might currently be connected to us as an X client and
    thus hang while both Xwayland and the wayland compositor await responses
    from eachother. To avoid this, we work directly with the wayland
    protocol and use wl_display_sync() events along with release() events to
    set up and destroy EGLStreams asynchronously alongside handling X
    clients.
    
    Additionally, since setting up EGLStreams is not an atomic operation we
    have to take into consideration the fact that an EGLStream can
    potentially be created in response to a window resize, then immediately
    deleted due to another pending window resize in the same X client's
    pending reqests before Xwayland hits the part of it's event loop where
    we read from the wayland compositor. To make this even more painful, we
    also have to take into consideration that since EGLStreams are not
    atomic that it's possible we could delete wayland resources for an
    EGLStream before the compositor even finishes using them and thus run
    into errors. So, we use quite a bit of tracking logic to keep EGLStream
    objects alive until we know the compositor isn't using them (even if
    this means the stream outlives the pixmap it backed).
    
    While the default backend for glamor remains GBM, this patch exists for
    users who have had to deal with the reprecussion of their GPU
    manufacturers ignoring the advice of upstream and the standardization of
    GBM across most major GPU manufacturers. It is not intended to be a
    final solution to the GBM debate, but merely a baindaid so our users
    don't have to suffer from the consequences of companies avoiding working
    upstream. New drivers are strongly encouraged not to use this as a
    backend, and use GBM like everyone else. We even spit this out as an
    error from Xwayland when using the eglstream backend.
    
    Signed-off-by: Lyude Paul <lyude@redhat.com>
    Acked-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 994f781007079176e0247ee64af5696d34debcde
Author: Lyude Paul <lyude@redhat.com>
Date:   Fri Apr 20 14:38:04 2018 -0400

    xwayland: Add xwayland-config.h
    
    Just a small autogenerated header that will soon contain more then just
    one macro.
    
    Signed-off-by: Lyude Paul <lyude@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 1545e2dbadcb147d7d52b546d053149de866a031
Author: Lyude Paul <lyude@redhat.com>
Date:   Fri Apr 20 14:38:03 2018 -0400

    xwayland: Decouple GBM from glamor
    
    This takes all of the gbm related code in wayland-glamor.c and moves it
    into it's own EGL backend for Xwayland, xwayland-glamor-gbm.c.
    Additionally, we add the egl_backend struct into xwl_screen in order to
    provide hooks for alternative EGL backends such as nvidia's EGLStreams.
    
    Signed-off-by: Lyude Paul <lyude@redhat.com>
    Reviewed-by: Lyude Paul <lyude@redhat.com>
    Reviewed-by: Daniel Stone <daniels@collabora.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit d2d664df974ac5a55d5819f0379fcdac05d22fa3
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 23 17:21:09 2018 -0400

    vfb: Fix man page in re depth
    
    32 is not a valid depth, and the default is now 24 not 8.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 79a7137557d33d4e92713ae8cabe838c44fea488
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 23 16:19:15 2018 -0400

    glx: Require depth > 12 for GLX visuals
    
    fb is happy to do TrueColor to 8bpp drawables, but mesa is not. Depth 12
    is the biggest pseudocolor anyone ever really did, and 15 is the least
    truecolor.
    
    Without this Xvfb at depth 8 would "have" GLX, but no vendors
    would actually back any of the screens. libGL will attempt to call
    GLXQueryServerString to figure out the GLX version, and vnd will throw
    an error because there's no vendor to dispatch that to, and then clients
    crash.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 818885e6198cf2883155cb3d2e22c8c7bc4239fb
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 23 16:19:14 2018 -0400

    vnd: Disable GLX if no vendors successfully initialized
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit fc25bceb515e5c18eecdebf5933c3e05cdac1a5a
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 23 16:19:13 2018 -0400

    dix: Allow an extension to disable itself
    
    GLX registers an extension before we know if there are any screens that
    can actually do it. It's inconvenient to shrink the extension list, so
    instead allow the extension to simply zero out its base opcode to
    indicate that it needed to panic and disable itself.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 73a1cb9c92c936c2c1ae3d69fed743e21916d687
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 23 16:19:12 2018 -0400

    dix: Factor out extension availability check
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit 9d5af632fde0373babfa32e66a59cfbf26ed7e5d
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 23 15:21:14 2018 -0400

    animcur: Fix crash when removing a master device
    
    Reproducer:
    
    $ Xvfb -ac -noreset :1 &
    $ DISPLAY=:1 xinput create-master touch1
    $ DISPLAY=:1 xinput remove-master "touch1 pointer"
    
    Bugzilla: https://bugs.freedesktop.org/105761
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 8275903956d7876519fa55fb805669dc301bf243
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Mon Apr 23 14:56:17 2018 -0400

    sdksyms: Cope with __pid_t and __uint32_t
    
    Kludge sdksyms.c generator to not fail on GetClientPid.
    It returns pid_t which on NetBSD is #define pid_t __pid_t
    This slightly alters the GCC preprocessor output which this fragile
    code could not deal with when using GCC 5+
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>

commit e29d783278608544a208f211231a6a3ad2f8fa09
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Fri Apr 20 19:59:40 2018 +0200

    modesetting: Only use modifiers on kms drivers which do support them.
    
    Use the DRM_CAP_ADDFB2_MODIFIERS query to make sure the kms
    driver supports modifiers in the addfb2 ioctl, and fall back
    to addfb ioctl without modifiers if modifiers are unsupported.
    
    E.g., as of Linux 4.17, nouveau-kms so far does not suppport
    modifiers and gets angry if drmModeAddFB2WithModifiers() is
    called (-> failure to set a video mode -> blank screen), but
    Mesa's nvc0+ gallium driver causes gbm_bo_get_modifier() to
    return a valid modifier by translating the default tiling of
    bo's created via gbm_bo_create() into a modifier other than
    DRM_FORMAT_MOD_INVALID (see Mesa's nvc0_miptree_get_modifier()).
    
    Testing for != DRM_FORMAT_MOD_INVALID is apparently not
    sufficient for safe use of drmModeAddFB2WithModifiers.
    
    Bonus: Handle potential failure of populate_format_modifiers().
    
    The required DRM_CAP is defined since libdrm v2.4.65, and we
    require v2.4.89+ for the server, so we can use it unconditionally.
    
    Tested on intel-kms, radeon-kms, nouveau-kms. Fixes failure on
    NVidia Pascal.
    
    Fixes: 2f807c2324b4 ("modesetting: Add support for multi-plane pixmaps when page-flipping")
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    Cc: Daniel Stone <daniels@collabora.com>
    Cc: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>
    Reviewed-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com>

commit fe4d1876b4f01c0b0e1916d548c398789f196164
Author: Lyude Paul <lyude@redhat.com>
Date:   Wed Apr 18 17:57:54 2018 -0400

    meson: Fix indenting in glx/meson.build
    
    No functional changes, just fixing a tabs vs. space error I noticed
    
    Signed-off-by: Lyude Paul <lyude@redhat.com>
    Reviewed-by: Adam Jackson <ajax@redhat.com>

commit 4e28a6a223c4f9d0f5defe0313a94e22e0416787
Author: Lyude Paul <lyude@redhat.com>
Date:   Wed Apr 18 18:09:15 2018 -0400

    meson: Ensure we always build Xext/hashtable.c for glx
    
    Seems that while glxvnd relies on some of the hashtable functions in
    Xext, we only build hashtable support for Xext if we're also building
    the res extension. This leads to some errors if you try to build glx
    without res enabled:
    
    glx/liblibglxvnd.a(vndcmds.c.o): In function `LookupVendorPrivDispatch':
    /home/lyudess/Projects/xserver/glx/vndcmds.c:65: undefined reference to `ht_find'
    /home/lyudess/Projects/xserver/glx/vndcmds.c:67: undefined reference to `ht_add'
    glx/liblibglxvnd.a(vndcmds.c.o): In function `GlxDispatchInit':
    /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_generic_compare'
    /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_generic_hash'
    /home/lyudess/Projects/xserver/glx/vndcmds.c:405: undefined reference to `ht_create'
    glx/liblibglxvnd.a(vndcmds.c.o): In function `GlxDispatchReset':
    /home/lyudess/Projects/xserver/glx/vndcmds.c:468: undefined reference to `ht_destroy'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    
    So, make sure that hashtable.c gets both for both glx and res
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Lyude Paul <lyude@redhat.com>

commit 3b4671f9e9c85f23e7593652e1482b11dc3ad4af
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Thu Apr 19 09:13:23 2018 +0200

    xwayland: Clean up all frame callbacks
    
    Regardless of the order we un-realize windows.
    
    Suggested-by: Roman Gilg <subdiff@gmail.com>
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Roman Gilg <subdiff@gmail.com>

commit 8b8f9007cc56fdcee5479876e88e06b7f8b6de35
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Wed Apr 18 16:02:02 2018 +0200

    xwayland: avoid using freed xwl_window on unrealize
    
    xwl_unrealize_window() would use freed xwl_window which can lead to
    various memory corruption and crashes, as reported by valgrind:
    
     Invalid read of size 8
        at 0x42C802: xwl_present_cleanup (xwayland-present.c:84)
        by 0x42BA67: xwl_unrealize_window (xwayland.c:601)
        by 0x541EE9: compUnrealizeWindow (compwindow.c:285)
        by 0x57E1FA: UnrealizeTree (window.c:2816)
        by 0x581189: UnmapWindow (window.c:2874)
        by 0x54EB26: ProcUnmapWindow (dispatch.c:879)
        by 0x554B7D: Dispatch (dispatch.c:479)
        by 0x558BE5: dix_main (main.c:276)
        by 0x7C4B1BA: (below main) (libc-start.c:308)
      Address 0xf520f60 is 96 bytes inside a block of size 184 free'd
        at 0x4C2EDAC: free (vg_replace_malloc.c:530)
        by 0x42B9FB: xwl_unrealize_window (xwayland.c:624)
        by 0x541EE9: compUnrealizeWindow (compwindow.c:285)
        by 0x57E1FA: UnrealizeTree (window.c:2816)
        by 0x581189: UnmapWindow (window.c:2874)
        by 0x54EB26: ProcUnmapWindow (dispatch.c:879)
        by 0x554B7D: Dispatch (dispatch.c:479)
        by 0x558BE5: dix_main (main.c:276)
        by 0x7C4B1BA: (below main) (libc-start.c:308)
      Block was alloc'd at
        at 0x4C2FB06: calloc (vg_replace_malloc.c:711)
        by 0x42B307: xwl_realize_window (xwayland.c:488)
        by 0x541E59: compRealizeWindow (compwindow.c:268)
        by 0x57DA40: RealizeTree (window.c:2617)
        by 0x580B28: MapWindow (window.c:2694)
        by 0x54EA2A: ProcMapWindow (dispatch.c:845)
        by 0x554B7D: Dispatch (dispatch.c:479)
        by 0x558BE5: dix_main (main.c:276)
        by 0x7C4B1BA: (below main) (libc-start.c:308)
    
    This is because UnrealizeTree() traverses the tree from top to bottom,
    which invalidates the assumption that if the Window doesn't feature an
    xwl_window on its own, it's the xwl_window of its first ancestor with
    one.
    
    This reverts commit 82df2ce3
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>

commit 12a6b189fb17894d2c3851b70a396bbf41f444c6
Author: David Woodhouse <dwmw2@infradead.org>
Date:   Tue Apr 17 22:22:21 2018 +0100

    glamor: fix glamor_xv_query_image_attributes() for odd-width images
    
    Images which are one pixel wider than a multiple of 8 are being handled
    incorrectly. Other drivers round up the width to a multiple of two
    before they start calculating. Do the same.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=795235
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: David Woodhouse <dwmw2@infradead.org>

commit ac7a4bf44c68c5f323375974b208d4530fb5b60f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Apr 15 15:40:03 2018 +0100

    os/WaitFor: Check timers on every iteration
    
    Currently we only check timer expiry if there are no client fd (or
    other input) waiting to be serviced. This makes it very easy to starve
    the timers with long request queues, and so miss critical timestamps.
    
    The timer subsystem is just another input waiting to be serviced, so
    evaluate it on every loop like all the others, at the cost of calling
    GetTimeInMillis() slightly more frequently. (A more invasive and likely
    OS specific alternative would be to move the timer wheel to the local
    equivalent of timerfd, and treat it as an input fd to the event loop
    exactly equivalent to all the others, and so also serviced on every
    pass. The trade-off being that the kernel timer wheel is likely more
    efficiently integrated with epoll, but individual updates to each timer
    would then require syscalls.)
    
    Reviewed-by: Peter Harris <pharris@opentext.com>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

commit 78b6f940217c127f0f345b7710aa5994c6ded99c
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Apr 16 14:08:27 2018 -0400

    modesetting: Fix inverted check in dri2 WaitMSC
    
    ms_queue_vblank() returns false on failure.
    
    Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Frank Binns <frank.binns@imgtec.com>
    Tested-by: Mike Lothian <mike@fireburn.co.uk>

commit 4e92c51ce4d6ab50c1507a23a01c6be0d1954d79
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Mon Apr 16 08:14:47 2018 +0200

    dri3: Fix dri3_buffers_from_pixmap request.
    
    Sending pixmap depth and bpp was omitted, so the Mesa
    X11 + EGL + DRI3 side of things always failed to
    dri3_create_image_khr_pixmap_from_buffers(), which led
