commit 23e60f917a5af652cd83b8a3a9951c79838721b3
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Feb 8 18:32:57 2016 -0500

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

commit a0d49b1c660f2453d07ce23bf86b0ef717f3d2c8
Author: Timo Aaltonen <tjaalton@ubuntu.com>
Date:   Wed Jan 27 14:18:50 2016 +0200

    dri2: Sync i915_pci_ids.h and i965_pci_ids.h from mesa
    
    Adds Skylake, Kabylake and Broxton allowing them to use
    modesetting + glamor with dri2.
    
    Signed-off-by: Timo Aaltonen <timo.aaltonen@canonical.com>
    Reviewed-by: Andreas Boll <andreas.boll.dev@gmail.com>
    (cherry picked from commit 50ca286d79f6304b972ea74487308e7794a170fb)

commit bc4b234d6f4b7b211f7a9750a97524e9652d0e6e
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jan 27 11:50:13 2016 -0500

    modesetting: Require sufficiently new libdrm
    
    Bugzilla: https://bugs.freedesktop.org/93883
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Julien Cristau <jcristau@debian.org>
    (cherry picked from commit bf23db42a4e5943129501223a47b48884cdeb62f)

commit 0b95625cecc7dc2cb6aff61edbc8366e8ffd516f
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jan 19 02:01:09 2016 +0000

    glamor: don't do copy if we have 0 boxes to copy.
    
    This happens if you run twm + mplayer + xclock and drag
    the clock over the mplayer. If we don't catch it, we cause
    an illegal draw elements command to be passed to GL.
    
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit 1fd82c764d5b24107e60f2173e30e5d24a2f2667)

commit 71be56c426bd9b66cbc5ab23923f4564e066cd75
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Jan 21 11:30:15 2016 -0800

    glamor: Fix copy-like Render operations between 15 and 16 depth.
    
    Reading and writing to 16-depth pixmaps using PICT_x1r5g5b5 ends up
    failing, unless you're doing a straight copy at the same bpp where the
    misinterpretation matches on both sides.
    
    Fixes rendercheck/blend/over and renderhceck/blend/src in piglit.
    
    Please cherry-pick this to active stable branches.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 510c8605641803f1f5b5d2de6d3bb422b148e0e7)

commit 6a4f771c5da99d5f723d61e1a780390a5e6b161b
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jan 20 15:43:10 2016 -0500

    glx: Fix GLX_EXT_create_context_es2_profile support
    
    As of v4 of this extension, any GLES version number may be requested (to
    enable GLES3 and later). To comply with this, simply remove the API
    version checks and leave it to the DRI driver to validate. This happens
    to also enable using GLES1 in direct contexts, so if that's the dire
    situation you find yourself in, your client driver at least stands a
    chance of working.
    
    v4 also specifies that both extension strings should be advertised for
    compatibility with clients written against v1 of the extension spec, so
    add the es_profile bit to the extension list and enable it whenever we
    would enable es2_profile.
    
    Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit bc415fb1e0031ad23bda6e9c3f4664532876a0e5)

commit ff562c9f98bbce91b61b06dfc51aa30c14180cdd
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jan 15 18:22:21 2016 +0900

    present: Handle wraparound when comparing MSC values
    
    When a window moves from one CRTC to another, present_window_to_crtc_msc
    updates window_priv->msc_offset according to the delta between the
    current MSC values of the old and new CRTC:
    
                window_priv->msc_offset += new_msc - old_msc;
    
    window_priv->msc_offset is initially 0, so if new_msc < old_msc,
    window_priv->msc_offset wraps around and becomes a large number. If the
    window_msc parameter passed in is small (in particular if it's 0, such as
    is the case when the client just wants to know the current window MSC
    value), the returned CRTC MSC value may still be a large number. In that
    case, the existing MSC comparisons in pixmap_present weren't working as
    intended, resulting in scheduling a wait far into the future when the
    target MSC had actually already passed. This would result in the client
    (e.g. the Chromium browser) hanging when moving its window between CRTCs.
    
    In order to fix this, introduce msc_is_(equal_or_)after helper functions
    which take the wraparound into account for comparing two MSC values.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Reviewed-by: Martin Peres <martin.peres@linux.intel.com>
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (cherry picked from commit 25eca80265654cfbf8768024e027426fedeb0918)

commit 9505783c2270b6da13cc5691b94f48ff72d7b625
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 12 15:42:47 2016 +0900

    glamor: Disable debugging messages other than GL API errors
    
    According to Nicolai Hähnle, the relevant specification says "All
    messages are initially enabled unless their assigned severity is
    DEBUG_SEVERITY_LOW", so we need to explicitly disable the messages we
    don't want to get. Failing that, we were accidentally logging e.g.
    shader stats intended for shader-db.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93659
    Tested-by: Laurent Carlier <lordheavym@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Eric Anholt <eric@anholt.net>
    (cherry picked from commit 1db6de7b6a6ee240eb50a13fe1fa1e135d7cb93b)

commit 9e45b28e998a4e0aacd1224b5d4f479ee453fdb9
Author: Dave Airlie <airlied@redhat.com>
Date:   Tue Jan 12 14:19:24 2016 +1000

    glamor: store old fonts in double width textures.
    
    There is a problem with some fonts that the height necessary
    to store the font is greater than the max texture size, which
    causes a fallback to occur. We can avoid this by storing two
    macro columns side-by-side in the texture and adjusting
    the calculations to suit.
    
    This fixes
    xfd -fn -*-*-*-*-*-*-*-*-*-*-*-*-*-*
    falling back here, when it picks
    -arabic-newspaper-medium-r-normal--32-246-100-100-p-137-iso10646-1
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 8116fd8a760b5935645def1b2c3b155c05927850)

commit f673c6cffb033286bf4f31fbb64f0863dfbe77f6
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Jan 11 17:02:57 2016 +1000

    glamor: fallback if font is too large for FBO size.
    
    running xfontsel on haswell here, with a max texture size
    of 8kx8k, one font wants 9711 height. This fallsback to
    sw in this case.
    
    A proper solution probably involves using an array texture.
    
    Reviewed-by: Keith Packard <keithp@keithp.com>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 64081d0eacf3e53a029b8e8b63096cc153e98549)

commit f7da9e4cd8237795cea4c0cf82148bdd18ec0f92
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Jan 6 10:03:23 2016 -0500

    os: Failure to remove a non-existent log file is not an error
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit 6dcb73375e0ce389315d55587623eb84e9d13543)

commit 4dfb05aaae9dc7a45294f60ebd3ad454a4707966
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Wed Nov 11 13:32:05 2015 +0100

    Fix build when XSERVER_PLATFORM_BUS is not defined.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
    (cherry picked from commit 862cbf4c870c9ed913206c6ef4988bdb470e1c39)

commit 88f2aa2940b6fb9deea0a1b53d05df02912dc17c
Author: Thomas Klausner <wiz@NetBSD.org>
Date:   Tue Jan 5 12:51:41 2016 -0500

    Fix uninitialized variable warnings reported by clang
    
    v2: Move initializing pos into the first clause of the for statement. We
    have to keep this macro equivalent to a plain for statement from the
    user's perspective, otherwise callers need to {} things to keep control
    flow correct. [ajax]
    
    Signed-off-by: Thomas Klausner <wiz@NetBSD.org>
    Acked-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 63f83d1b7f496d05b409352749cdb6674d71cf80)

commit 320b169c225fa05d83928bad438c4b15481cea1f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 1 18:11:14 2016 -0800

    Use unique logfile names when starting server with -displayfd
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=93212
    
    Previously all X servers started with -displayfd would overwrite
    Xorg.0.log - now a temporary name of Xorg.pid-<pid>.log is used
    until after -displayfd finds an open display - then it is renamed
    to the traditional Xorg.<display>.log name.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit edcb6426f20c3be5dd5f50b76a686754aef2f64e)

commit a32b85bf192bd15e9585e4c13a24407634478b05
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Fri Jan 1 18:10:08 2016 -0800

    modesetting should not reference gbm when it's not defined
    
    Fixes build errors of:
    present.c: In function 'ms_do_pageflip':
    present.c:410:17: error: 'drmmode_bo' has no member named 'gbm'
         new_front_bo.gbm = glamor_gbm_bo_from_pixmap(screen, new_front);
                     ^
    present.c:412:22: error: 'drmmode_bo' has no member named 'gbm'
         if (!new_front_bo.gbm) {
                          ^
    present.c: In function 'ms_present_check_flip':
    present.c:536:36: error: 'drmmode_bo' has no member named 'gbm'
             if (drmmode_crtc->rotate_bo.gbm)
                                        ^
    Introduced by commit 13c7d53d
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    (cherry picked from commit fe8562f5316d8c74ca074ad145295c65ddff5fc2)

commit 4457fd45efef85b567d4a0ac085d252ffe49020d
Author: Siim Põder <siim@p6drad-teel.net>
Date:   Mon Jun 8 22:14:12 2015 +0000

    vfb: add randr support (v2)
    
    The motivation for getting this is chrome remote desktop that runs under
    Xvfb and wants to use RANDR to adjust screen size according to the
    remote desktop client screen size. Apparently there are other use cases
    as well, the bug mentions gnome-settings-daemon testing.
    
    [ajax: massaged commit message]
    
    Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=26391
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Lambros Lambrou <lambroslambrou@google.com>
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>
    Signed-off-by: Michal Srb <msrb@suse.com>
    Signed-off-by: Siim Põder <siim@p6drad-teel.net>
    (cherry picked from commit 3d68d1f26709ecb5ce22a9baa0d3d8162574ed6a)

commit 5a89a6336d6b70781101e6395c276649956b9d80
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 8 15:56:17 2015 -0500

    glxproxy: Silence shadowed-variable warnings
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit b5f04a79df8b5aab8b558461261d14721f0b3e41)

commit c10def69e1d92741ab79eee0b26ae80d143c93fb
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 8 15:53:35 2015 -0500

    glxproxy: Silence set-but-unused-variable warnings
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 18729a211a5fdd4f733e44eded754a0e6210b687)

commit e36834cee865152dee5fbe1e8d480b7010466f75
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 8 16:04:44 2015 -0500

    dmx: Run 'doxygen -u' to upgrade the doxygen config file
    
    Also change the dot font setting back to the default of Helvetica as
    doxygen no longer ships FreeSans.
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit bc996fa4e3c06f65eafe0a88ef491dbf01f31422)

commit bb9bdb213250dbd28a61f91dba2145d20ef5f569
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 8 16:00:19 2015 -0500

    dmx: Silence unused variable warning in dmxcompat
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit a55e0bc56fd8f9da8f066dc344af19535dd092ca)

commit 1f5afbba4513c0e0d2d8827f3bbbbc383fd918f0
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Dec 8 15:37:12 2015 -0500

    dmx: Silence lex/yacc-related config parser warnings
    
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 2730ccb803c55af74dbdd1bfd982fc23e643554d)

commit b63a8cc4f24012267b0cb88bc358e68ab3ceb427
Author: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
Date:   Thu Dec 3 08:05:59 2015 -0200

    systemd-logind.c: don't parse VT settings for non-seat0 X servers
    
    Since non-seat0 X servers no longer touch VTs, I believe these settings
    are unnecessary.
    
    Signed-off-by: Laércio de Sousa <laerciosousa@sme-mogidascruzes.sp.gov.br>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 718223d27452862eedcf1bee6278eae6040d45ea)

commit a8b746948db1871c0b28663b99fa839582693087
Author: Bob Ham <bob.ham@collabora.com>
Date:   Fri Dec 4 12:30:47 2015 +0000

    xserver: Fix configure.ac check for libsystemd/-daemon
    
    The configure script looks for the libsystemd-daemon pkg-config
    module.  If the configure script finds it, the script will add
    libsystemd-daemon to a list of modules which are used to consolidate
    CFLAGS and LIBS.
    
    The check for libsystemd-daemon was altered to fallback to libsystemd
    if libsystemd-daemon was not found (libsystemd-daemon was brought into
    libsystemd).  Unfortunately, the configure script still adds
    "libsystemd-daemon" to the list of modules to consolidate, instead of
    "libsystemd".  With this patch, we set a variable depending on which
    pkg-config module is found and add that to the module list instead.
    
    Changes since v1:
    - Rearranged logic so that we do a versioned check for libsystemd
      first, then look for libsystemd-daemon.
    - Cleaned up the check a bit, only performing the module checks if we
      don't have --with-systemd-daemon=no, in a similar style to
      --with-dtrace.
    - Changed the variable name to LIBSYSTEMD_DAEMON as per feedback.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Bob Ham <bob.ham@collabora.com>
    (cherry picked from commit 7c0ba32ddd5f1d5c65279365fa307dec3433caf3)

commit b564cc9121bade2fee22eb14edd360036b7ba0b9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 3 17:04:09 2015 +0900

    prime: Damage full destination rectangle when we start dirty tracking
    
    This makes sure that the destination pixmap contents will be fully
    initialized. Without this, a PRIME output starts out with garbage.
    
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    (cherry picked from commit 530d3e5ca0a02039b04ec6a677bbb4e05b78e5f4)

commit 00f65597c80d01e1c0759527ed1c72bc5af46c29
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 7 17:03:02 2015 -0500

    x86emu: Squash a warning
    
    Apologies, should have caught this one when applying the previous x86emu
    patch.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    (cherry picked from commit 2a52c06e235bd79f91851121f53f7c1808fde321)

commit 4415b0cd6f1ddd75f2dc8b2096a89716baa38405
Author: Julian Pidancet <julian.pidancet@gmail.com>
Date:   Sun Jul 1 18:49:25 2012 +0100

    x86emu: Correctly handle 0x66 prefix for some instructions
    
    (Sorry for double posting)
    
    I repost this patch because I havn't got any replies from maintainers
    since I posted the initial patch back in March.
    
    Some instructions are not emulated correctly by x86emu when they
    are prefixed by the 0x66 opcode.
    I've identified problems in the emulation of these intructions: ret,
    enter, leave, iret and some forms of call.
    
    Most of the time, the problem is that these instructions should push or
    pop 32-bit values to/from the stack, instead of 16bit, when they are
    prefixed by the 0x66 special opcode.
    
    The SeaBIOS project aims to produce a complete legacy BIOS
    implementation as well as a VGA option ROM, entirely written in C and
    using the GCC compiler.
    
    In 16bit code produced by the GCC compiler, the 0x66 prefix is used
    almost everywhere. This patch is necessary to allow the SeaBIOS VGA
    option ROM to function with Xorg when using the vesa driver.
    
    SeaBIOS currently use postprocessing on the ROM assembly output to
    replace the affected instruction with alternative unaffected instructions.
    This is obviously not very elegant, and this fix in x86emu would be
    more appropriate.
    
    v2: - Decrement BP instead of EBP in accordance with the Intel Manual
        - Assign EIP instead of IP when poping the return address from the
        stack in 32-bit operand size mode in ret_far_IMM, ret_far, and iret
        - When poping EFLAGS from the stack in iret in 32-bit operand size
        mode, apply some mask to preserve Read-only flags.
    
    v3: - Rebase
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
    (cherry picked from commit 59b618227ebd024e57720aaaea17596953f5b80e)

commit cc0cefed4f098ce6e933f2142a4fee93df5f652d
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Feb 8 09:47:42 2015 +0000

    present: Do not replace Pixmaps on redirected Window on unflip
    
    When unflipping, we may find that our flip window has been redirected.
    If we replace the redirected Window with the Screen Pixmap we then have
    mutliple fullscreen Windows believing that their own the Screen Pixmap -
    multiple fullscreen Windows that are being flipped by Clients, and so
    continue to flip causing popping between e.g. the compositor and the
    game.
    
    [ajax: Fix up present_execute() hunk to account for changes introduced
    in fe07ec19e212a68076560d243a2a935c54589068]
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 72f0724cdc65dc9abbbf70b9feb6cce7c2b9f8a0)

commit cfeea6382b5aaac0dcf59d88f7735b0703c9929f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Feb 8 09:47:41 2015 +0000

    present: When cancelling a pending synchronous flip, requeue it
    
    The vblank event request for a synchronous flip is scheduled for the
    vblank before the target flip msc (so that the flip itself appears at
    the right frame). If we cancel that flip and so wish to schedule a
    copy instead, that copy needs to be postponed by a frame in order for it
    be performed at the requested time.
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 180b09912c0d2c4a43b5a08678bcad4b818924c7)

commit 4d48ceb8a15fcf521e8be3dba2756b69e54f20cc
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Feb 8 09:47:40 2015 +0000

    present: Requery pending flips with the right sync_flip mode
    
    When verifying whether a pending flip is still valid, we need to pass
    down the orignal sync_flip mode (e.g. if the driver only supports sync
    flips, verifying a async flip will falsely fail).
    
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit b2d55338f6b8f43ebcb49994abad123a797248cf)

commit 54c74aa952ac7eecaeeb3f3cba6d2fe8a98cf450
Author: Dave Airlie <airlied@gmail.com>
Date:   Mon Nov 16 09:05:27 2015 +1000

    modesetting: create entities for pci and old probe. (v2)
    
    This moves the code from the platform case into
    a common function, and calls that from the
    other two.
    
    v2: Emil convinced me we don't need to lookup pEnt
    here, so let's not bother.
    
    Reported-by: Mark Kettenis <mark.kettenis@xs4all.nl>
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 548a3d5fd69bb059bbaf26ededdc94c212712cd7)

commit d94118fa1b75ea773857b7bbeda96ac181feb994
Author: Dave Airlie <airlied@gmail.com>
Date:   Mon Nov 16 09:05:26 2015 +1000

    modesetting: drop platform_dev pointer.
    
    This isn't used anywhere, so no point storing it until we need it.
    
    Reviewed-by: Mark Kettenis <kettenis@openbsd.org>
    Signed-off-by: Dave Airlie <airlied@redhat.com>
    (cherry picked from commit 771016f0705909c908917b4ccaeafc950ba93c05)

commit 067c4dd5ce06c2f17d54c3b89e23efbc0822a194
Author: Arkadiusz Miśkiewicz <arekm@maven.pl>
Date:   Mon Nov 16 11:06:57 2015 +0100

    Xorg.wrap: activate libdrm based detection for KMS drivers
    
    Xorg.wrap includes code guarded with WITH_LIBDRM for detecting KMS drivers.
    Unfortunately it is never activated since code missed to include file
    which defines WITH_LIBDRM.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92894
    Signed-off-by: Arkadiusz Miśkiewicz <arekm@maven.pl>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 19b0249a5e07b9fc008e5d8709d7e489874415de)

commit 8f41c32bb5f3b962d4db105f96d47d8b74f5af79
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Tue Dec 1 17:16:03 2015 +0100

    xwayland: Update screen size on output removal
    
    When unplugging an output, it's still listed in xrandr and the size
    of the root window still includes the removed output.
    
    The RR output should be destroyed when its Wayland counterpart is
    destroyed and the screen dimensions must be updated in both the done
    and the destroy handlers.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=92914
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Reviewed-by: Marek Chalupa <mchqwerty@gmail.com>
    (cherry picked from commit ab9837cc6a11f46b9df780f131b69de3822c3dd9)

commit 2b356cb50139601dcd5393646aad30552fa778a1
Author: Jonas Ådahl <jadahl@gmail.com>
Date:   Wed Oct 7 12:01:53 2015 +0800

    xwayland: Always update the wl_pointer cursor on pointer focus
    
    In Wayland, a client (in this case XWayland) should set the cursor
    surface when it receives pointer focus. Not doing this will leave the
    curser at whatever it was previously.
    
    When running on XWayland, the X server will not be the entity that
    controls what actual pointer cursor is displayed, and it wont be notified
    about the pointer cursor changes done by the Wayland compositor. This
    causes X11 clients running via XWayland to end up with incorrect pointer
    cursors because the X server believes that, if the cursor was previously
    set to the cursor C, if we receive Wayland pointer focus over window W
    which also has the pointer cursor C, we do not need to update it. This
    will cause us to end up with the wrong cursor if cursor C was not the
    same one that was already set by the Wayland compositor.
    
    This patch works around this by, when receiving pointer focus, getting
    the private mipointer struct changing the "current sprite" pointer to
    an invalid cursor in order to trigger the update path next time a cursor
    is displayed by dix.
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Signed-off-by: Jonas Ådahl <jadahl@gmail.com>
    (cherry picked from commit 07941a50a547f2ca094e242588298695f48903ed)

commit 74354c4b0086ea1a952b5591846803719e3e3e91
Author: Olivier Fourdan <ofourdan@redhat.com>
Date:   Mon Nov 23 08:51:48 2015 +0100

    xwayland: Do not set root clip when rootless
    
    Otherwise the server may try to draw onto the root window when closing
    down, but when running rootless the root window has no storage thus
    causing a memory corruption.
    
    Thanks to Adam Jackson <ajax@redhat.com> for helping tracking this down!
    
    Reviewed-by: Adam Jackson <ajax@redhat.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93045
    Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
    Tested-by: Marek Chalupa <mchqwerty@gmail.com>
    (cherry picked from commit 51a4399b94f9adfac5f7718d4cbf73f793dcca56)

commit 0a500c3cc74e39a01be24053e152dd52469dd908
Author: Marek Chalupa <mchqwerty@gmail.com>
Date:   Fri Nov 27 14:27:46 2015 +0100

    xwayland: check if creating xwl_output succeeded
    
    check return values of RR.*Create calls
    
    v2. do not bail out if we don't have any output
    
    Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit 5b2ca3413203210d112a08a4e20d14382abae437)

commit c2e6eddb1bfc5106596729bc3f0a6a381f5be9f4
Author: Marek Chalupa <mchqwerty@gmail.com>
Date:   Fri Nov 27 14:59:27 2015 +0100

    xwayland: fix memory leaks on error paths in xwl_realize_window
    
    don't leak memory when realizing window fails
    
    v2. take care of all memory allocation and return values,
        not just one leak
    
    Signed-off-by: Marek Chalupa <mchqwerty@gmail.com>
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit 646ebea456b4c5251ae997eab8d9b971f97de836)

commit 68168c764662c0ce4ac8193d293b8befd934f666
Author: Egbert Eich <eich@suse.de>
Date:   Tue Nov 24 17:37:36 2015 +0100

    kdrive/UnregisterFd: Fix off by one
    
    The number of FDs has been decremented already, therefore the
    number contained the index of the top one that is to me moved down.
    
    This problem was introduced by:
      commit 1110b71e360195aab040d835b54540ab558638c5
      Author: Chris Clayton <chris2553@googlemail.com>
    
        kdrive: fix build error on gcc 4.8 for out-of-bounds array access
    
    The reason for the warning was likely a confused compiler.
    Hoping to reduce the confusion by moving the decrement behind the end
    if the copy loop.
    
    Signed-off-by: Egbert Eich <eich@suse.de>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit 44d0fd435a4eaf45e252b4f00409152a6d599dfc)

commit 84fbfa8a7d40553c5129a667b532ea3a8b63bfb3
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Nov 19 12:21:08 2015 -0500

    xnest: Fix needless build dependency on xcb-util-keysyms
    
    This was added in:
    
        commit 43014795087a0a8774dd9687f5967329b15f06a2
        Author: Olivier Fourdan <ofourdan@redhat.com>
        Date:   Mon Jan 5 16:44:22 2015 +0100
    
            Synchronize capslock in Xnest and Xephyr
    
    Which is fine if you're building both, but if you don't happen to have
    xcb-util-keysyms' headers installed Xnest will configure as enabled but
    fail to build.
    
    Fortunately <X11/X.h> has a corresponding #define, so use that instead.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Olivier Fourdan <ofourdan@redhat.com>
    (cherry picked from commit 4affa75a90d2455c81087b930126ad7adfd019f0)

commit 115913d9ec8f7961e9a5789972aeb33da9cfd1e4
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Mon Nov 23 07:59:24 2015 +1000

    xfree86: fix minor memory leak
    
    xf86*StrOption returns a strdup
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Hans de Goede <hdegoede@redhat.com>
    (cherry picked from commit 71ba82690158f46d50a455e69a83ee0d685bb274)

commit c9bd60790c6636a7911ca479e0f9439bc118d74c
Author: Eric Anholt <eric@anholt.net>
Date:   Sun Oct 18 19:16:20 2015 -0700

    glamor: No need to glFlush before destroying a pixmap.
    
    I assume this was a workaround for an old, broken, closed driver.  The
    driver doesn't get to throw away rendering just because the rendering
    context's shared-across-processes render target is getting freed from
    the local address space.  If the rendering isn't to a shared render
    target, then we *do* want to throw away the rendering to it.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 98a1993536add730b7ec29a9e37f62b1cd70ad31)

commit 9379c6a3f6109fe2cca3bf2dc45dc92fcf1e302f
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Nov 5 16:35:56 2015 -0800

    glamor: Fix segfault in fallback picture uploading.
    
    If the source/mask pixmap is a pixmap that doesn't have an FBO
    attached, and it doesn't match the Render operation's size, then we'll
    composite it to a CPU temporary (not sure why).  We would take the
    PictFormatShort from the source Picture, make a pixmap of that depth,
    and try to look up the PictFormat description from the depth and the
    PictFormatShort.  However, the screen's PictFormats are only attached
    to the screen's visuals' depths.  So, with an x2r10g10b10 short format
    (depth 30), we wouldn't find the screen's PictFormat for it
    (associated with depth 32).
    
    Instead of trying to look up from the screen, just use the pFormat
    that came from our source picture.  The only time we need to look up a
    PictFormat when we're doing non-shader gradients, which we put in
    a8r8g8b8.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit 9a5972801f7789833062e5711e77483b643eef92)

commit 6bb58ea2a9c1931f4e04075f19ed22bb50b1d709
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Nov 5 16:03:14 2015 -0800

    glamor: Fix assert failures when fallback picture upload alloc fails.
    
    If the glTexImage (or glTexSubImage) out-of-memories, error out
    cleanly so that we can fall back to software.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit e7aa4d3c7420d45cca2b7e1e69e22cebc64d5b74)

commit ade2ed4f8bb66127ad46df22b12d201dad318c3d
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Nov 5 15:13:55 2015 -0800

    glamor: Fix rendering when core font texture allocation fails.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit ff8ef975df9cd99ec6f0b8b8047445091bf35ef0)

commit 90fe7266ab67aa3e45a0a68c71987c70c0496504
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Nov 5 15:05:11 2015 -0800

    glamor: Fix crashes when the glyph atlas allocation fails.
    
    We already have a fallback path, so we just need to jump to it when we
    hit the failure.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit a6b05d10da2fe476f46e6dc4ad8a603964735905)

commit 701b4347aca1a9b81492b05cf3ae35fe0499325c
Author: Eric Anholt <eric@anholt.net>
Date:   Thu Nov 5 14:47:42 2015 -0800

    glamor: Handle GL_OUT_OF_MEMORY when allocating texture images.
    
    The spec allows general undefined behavior when GL_OOM is thrown.  But
    if the driver happens to throw the error at this point, it probably
    means the pixmap was just too big, so we should delete that texture
    and have this pixmap fall back to software.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    (cherry picked from commit de959ec939b262cb1cb4c0b6146826e3092843f9)

commit 73799de77f551c22308af1e7ef0b2f83ae49b0e0
Author: Eric Anholt <eric@anholt.net>
Date:   Mon Nov 9 15:47:05 2015 -0800

    glamor: Avoid GL errors from mapping with size == 0.
    
    GL 4.5 / GLES 3.0 require throwing GL errors at map time, and Mesa
    before that might throw errors accidentally if a malloc(0) call was
    made to return the mapping.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Rob Clark <robdclark@gmail.com>
    (cherry picked from commit 74be466d40080545117628c376cb59b696db33bc)

commit 7727e433459675f80cb38857a6c82ebb29393072
Author: Michael Stapelberg <stapelberg@google.com>
Date:   Tue Nov 3 03:51:48 2015 -0800

    Also dump passive grabs on XF86LogGrabInfo
    
    Signed-off-by: Michael Stapelberg <stapelberg@google.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    (cherry picked from commit a6cddb8c04ddc3c48aae3f3611ad9f336fecb09d)

commit 43fb888bd01cf9d3d277e77a52a3d0c93ccff8bd
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Nov 9 16:00:26 2015 -0500

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

commit 2203735887ab548b3ee004400d1b89149aae412c
Author: Axel Davy <axel.davy@ens.fr>
Date:   Wed Nov 4 18:42:42 2015 +0100

    present: Fix Async swap logic
    
    According to the spec, PresentOptionAsync should only
    trigger a different behaviour when the target msc has been reached.
    
    In this case if the driver is able to do async swaps, we use
    them to avoid a screen copy.
    
    When the target msc hasn't been reached yet, we want to use sync swaps.
    
    v2: Fix indentation and simplify checks for Async flips
    
    Signed-off-by: Axel Davy <axel.davy@ens.fr>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

commit 3f35909acba117dc8934920d788c7ce612bce444
Author: Jammy Zhou <Jammy.Zhou@amd.com>
Date:   Wed Oct 28 18:39:10 2015 +0800

    present: Execute right away if target_msc equals current_msc
    
    It is according to the protocol:
    
    "If 'options' contains PresentOptionAsync, and the 'target-msc'
    is less than or equal to the current msc for 'window', then
    the operation will be performed as soon as possible, not
    necessarily waiting for the next vertical blank interval."
    
    Signed-off-by: Jammy Zhou <Jammy.Zhou@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Reviewed-by: Axel Davy <axel.davy@ens.fr>

commit 7d1e4783853f9830344d101ceab087feb19995be
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Thu Oct 29 14:58:11 2015 +0100

    modesetting: Remove XF86_CRTC_VERSION checks
    
    The ifdef checks for XF86_CRTC_VERSION >= 3/5 are remnants from the
    out-of-tree driver. Within the tree, we can rely on:
        xf86Crtc.h:#define XF86_CRTC_VERSION 6
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 45c83a266d18eb515313aa3f1a4d7ff6af53be5d
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Thu Oct 29 14:58:10 2015 +0100

    modesetting: Free output_ids in drmmode_set_mode_major()
    
    We calloc() output_ids. Let's free() it, too.
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2674d424020bd71d4f99b8d8de8b0b21aa490d54
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Thu Oct 29 14:58:09 2015 +0100

    modesetting: Handle failures in setting a CRTC to a DRM mode properly
    
    This fixes a bug where running the card out of PPLL's when hotplugging
    another monitor would result in all of the displays going blank and
    failing to work properly until X was restarted or the user switched to
    another VT.
    
    [Michel Dänzer: Pass errno instead of -ret to strerror()]
    [Daniel Martin: Add \n to log message]
    
    Picked from xf86-video-ati
        7186a87 Handle failures in setting a CRTC to a DRM mode properly
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 250666586e2b6f3ed1371340452dc2be2d094d40
Author: Adam Jackson <ajax@redhat.com>
Date:   Thu Oct 29 10:08:17 2015 -0400

    vidmode: Drop the unused event code
    
    As the code says, this is "far from complete".  So far, in fact, that
    it's been basically untouched for twenty years (XFree86 3.1!).  As far
    as I can tell it was never enabled in any XFree86 build, and certainly
    has never been enabled since Xorg 7.0.
    
    Also, K&R.
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

commit 478efe285a440c33b053bdf0bfbfdd482f429f01
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Oct 27 19:44:28 2015 -0700

    Xserver.man: document more transports for -nolisten & -listen options
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit 8fc295bde9a736f3c8c047031a6698d140d5266f
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Oct 27 19:44:27 2015 -0700

    Xorg.man: update to reflect -nolisten tcp becoming default
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit 75157b7dbf4ed4db0492328a44e4e67dda83f769
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Tue Oct 27 19:44:26 2015 -0700

    Xorg.man: move XLOCAL details to X(7) man page instead
    
    These settings affect clients, not server, so belong there, next to
    the information about how to set $DISPLAY.
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>

commit 50c167164700e8ead9b7ccf9f9eafc7541baac75
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 bb78c464f09f515db557182a458b12b63c3b52d7
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Oct 27 13:28:37 2015 -0400

    build: Remove stale miext/cw include paths
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

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

