commit f9aca8c1a7a423b9e738c88400ae821bdfbcdb1c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Sep 8 17:02:59 2017 +0900

    Bump version for 7.10.0 release

commit 5cdd334b3402c2431deb3a87a8d04ef590da53ee
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 30 18:48:19 2017 +0900

    Require xserver >= 1.13
    
    xserver 1.13.0 was released on September 6th, 2012, almost 5 years ago.
    
    This allows cleaning up a bunch of backwards compatibility code.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>

commit 9d9c565c84601f4c6c73ad769f86491088683f7a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 18:07:51 2017 +0900

    Use a timer for unreferencing the all-black FB
    
    The timer fires 1 second after LeaveVT. This gives the next DRM master
    enough time to set up scanout of its own buffers.
    
    Fixes prolonged intermittent black screen when switching from Xorg to
    e.g. the GDM Wayland mode login VT.
    
    Fixes: 06a465484101 ("Make all active CRTCs scan out an all-black
                          framebuffer in LeaveVT")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit e4a3df19d588a4310fcb889ef34e205d0e92e4d7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Aug 28 17:54:23 2017 +0900

    Remove drmmode_scanout_free
    
    Not used anymore.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 06a465484101f21e99d3a0a62fb03440bcaff93e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 23 18:00:15 2017 +0900

    Make all active CRTCs scan out an all-black framebuffer in LeaveVT
    
    And destroy all other FBs. This is so that other DRM masters can only
    get access to this all-black FB, not to any other FB we created, while
    we're switched away and not DRM master.
    
    Fixes: 55e513b978b2 ("Use reference counting for tracking KMS
                          framebuffer lifetimes")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7f0cd68d1b0c132e32ae736371bce3e12ed33c7a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Aug 28 17:53:19 2017 +0900

    Create radeon_master_screen helper
    
    Preparatory, no functional change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 20f6b56fdb74d88086e8e094013fedbb14e50a24
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 24 17:10:29 2017 +0900

    Create radeon_pixmap_get_fb_ptr helper
    
    Preparatory, no functional change intended yet.
    
    Also inline radeon_pixmap_create_fb into radeon_pixmap_get_fb, since
    there's only one call-site anymore.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4bc992c31059eb50e22df4ebf5b92d08411f41ef
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 23 17:24:53 2017 +0900

    Create drmmode_set_mode helper
    
    Preparatory, no functional change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 3f6210ca2c8ef60d59efc8139151d3b9838bb875
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jun 22 18:37:26 2017 +0900

    Create radeon_pixmap_clear helper
    
    Preparatory, no functional change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 0472a605e0ec8fec1892bbc3a84698b7ef9c5296
Author: Martin Peres <martin.peres@linux.intel.com>
Date:   Mon Apr 10 16:48:21 2017 +0300

    modesetting: re-set the crtc's mode when link-status goes BAD
    
    Despite all the careful planning of the kernel, a link may become
    insufficient to handle the currently-set mode. At this point, the
    kernel should mark this particular configuration as being broken
    and potentially prune the mode before setting the offending connector's
    link-status to BAD and send the userspace a hotplug event. This may
    happen right after a modeset or later on.
    
    Upon receiving a hot-plug event, we iterate through the connectors to
    re-apply the currently-set mode on all the connectors that have a
    link-status property set to BAD. The kernel may be able to get the
    link to work by dropping to using a lower link bpp (with the same
    display bpp). However, the modeset may fail if the kernel has pruned
    the mode, so to make users aware of this problem a warning is outputed
    in the logs to warn about having a potentially-black display.
    
    This patch does not modify the current behaviour of always propagating
    the events to the randr clients. This allows desktop environments to
    re-probe the connectors and select a new resolution based on the new
    (currated) mode list if a mode disapeared. This behaviour is expected in
    order to pass the Display Port compliance tests.
    
    (Ported from xserver commit bcee1b76aa0db8525b491485e90b8740763d7de6)
    
    [ Michel: Bump libdrm dependency to >= 2.4.78 for
      DRM_MODE_LINK_STATUS_BAD ]
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d822a0f47070374ad0c1a97b559bae27724dc52a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 17 16:20:52 2017 +0900

    Make radeon_scanout_do_update take a PixmapPtr instead of a DrawablePtr
    
    All callers were already passing in a pixmap.
    
    This allows simplifying the rotated scanout case slightly.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 3e24770b1b472fc15df56d06f5f04778c9db63dd
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 9 13:02:34 2017 +0900

    Use xorg_list_append for the DRM event list
    
    We were adding entries at the start of the list, i.e. the list was
    ordered from most recently added to least recently added. However, the
    corresponding DRM events are generally expected to arrive in the same
    order as they are queued, which means that radeon_drm_queue_alloc would
    generally have to traverse the whole list to find the entry
    corresponding to an arrived event. Fix this by adding entries at the end
    of the list.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 36ce7920136c0d723c9397a84e7dd5926a9c7943
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 9 19:01:15 2017 +0900

    Consolidate radeon_scanout_flip_abort/handler helpers
    
    While at it, make them use crtc->driver_private.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d314cbfb228bb4b8762714f98d0c114a8ee3f061
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 31 17:12:59 2017 +0900

    Always allow DRI2 page flipping with TearFree
    
    Even if TearFree is enabled for the CRTC we're synchronizing to.
    
    v2:
    * Move manpage hunk here from previous change.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1

commit 4445765af5b97d0cfd10889fe6d6f58f2ce85659
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 9 13:01:03 2017 +0900

    Always allow Present page flipping with TearFree
    
    Even if TearFree is active for the the CRTC we're synchronizing to. In
    that case, for Present flips synchronized to vertical blank, the other
    scanout buffer is immediately synchronized and flipped to during the
    target vertical blank period. For Present flips not synchronized to
    vertical blank, we simply use the MSC and timestamp values of the last
    vertical blank period for timing purposes, and let the normal TearFree
    mechanism handle display updates.
    
    v2:
    * Move manpage hunk to next change, since TearFree can still prevent
      DRI2 page flipping with this change.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1

commit 65e0c5ea1b4adff21d673dbf54af99704c429627
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Feb 8 17:52:28 2017 +0900

    Pass extents to radeon_scanout_do_update
    
    Preparation for following change, no functional change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 1443270e52e8562bd8dc3603f301963bd4027cef
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 7 18:58:23 2017 +0900

    Add source drawable parameter to radeon_scanout_do_update
    
    Preparation for following changes, no functional change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7c10ee9c88378d773c0bcf651fdc5d9f2c6dc5e5
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 3 18:16:36 2017 +0900

    Handle multiple "pending" Present flips
    
    The xserver Present code can submit a flip in response to notifying it
    that a vblank event arrived. This can happen before the completion event
    of the previous flip is processed. In that case, we were clearing the
    drmmode_crtc->flip_pending field prematurely.
    
    Prevent this by only clearing drmmode_crtc->flip_pending when it matches
    the framebuffer being scanned out since the flip whose completion event
    we're processing.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit e6d7dc2070f4d21a6900916bb70a31839112882c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 3 17:51:20 2017 +0900

    Wait for pending flips synchronously before turning off a CRTC
    
    Allows removing drmmode_clear_pending_flip and the pending_dpms_mode
    field and cleaning up the code considerably.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f87acdbfb1b0b6d2769764772a52ea8b81675e20
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jul 28 12:28:53 2017 +0900

    Create drmmode_crtc_wait_pending_event helper macro
    
    Preparation for following change, no functional change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 99f1d7a474af3683fe1a66f50c0bb8935478ff0a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Aug 14 12:23:04 2017 +0900

    Create drmmode_wait_vblank helper
    
    Allows cleaning up the code considerably.
    
    v2:
    * Fix "drmWaiVBlank" typo, add blank line for readability (Slava Abramov)
    * Rename in/out sequence parameters to "target_seq" and "result_seq",
      hopefully that will be clearer.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1

commit 49cc61ab970ee28d4509b4e2dd0a57165136889f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 1 18:45:53 2017 +0900

    Pass reference CRTC to radeon_do_pageflip directly
    
    Simplifies the code slightly.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 3f120fa1d5d921656a367751bc079e020e9ab105
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 3 17:42:51 2017 +0900

    Remove drmmode_crtc->scanout_destroy[] array
    
    No longer necessary since we're reference counting framebuffers.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com

commit 01b040b4a80754b8c8a305cbe968416182b54246
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 15 17:15:27 2017 +0900

    Adapt to PixmapDirtyUpdateRec::src being a DrawablePtr

commit 5309bde0c4e28adf2b167191c6d7011a19e31eed
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 27 16:11:19 2017 +0900

    Allow DRI page flipping when some CRTCs use separate scanout buffers
    
    As long as the CRTC we're synchronizing to doesn't.
    
    v2:
    * Remove redundant checks from can_exchange which still prevented DRI2
      page flipping
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 9bc3eef74452d924f9101c024f66ad9b14c404c8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 27 15:46:41 2017 +0900

    Add drmmode_crtc_can_flip helper
    
    To reduce code duplication between DRI2 and Present. No functional
    change intended yet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit c2d26890691ec105858f086b63170ad94c6f7f05
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 12 12:13:03 2017 +0900

    Use root window (pixmap) instead of screen pixmap for scanout updates
    
    Preparation for following changes, no functional change intended yet.
    
    v2:
    * Add drmmode_screen_damage_destroy callback to prevent use-after-free
      on server shutdown
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 377c9dc7e51cc8ebd06816b08682a8098a49508a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 27 15:27:54 2017 +0900

    autogen.sh: Pass -f to autoreconf
    
    To ensure that any existing copies of autotools files will be replaced
    with the current versions.
    
    (Cherry picked from amdgpu commit a47c0093338d80d84e7033ad15d051925d542ca0)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit bf0a759e3bced3a93bead033a26871cc340bd309
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 27 15:26:23 2017 +0900

    Makefile.am: Set ACLOCAL_AMFLAGS = -I m4
    
    Suggested by one of the tools called by autoreconf.
    
    (Cherry picked from amdgpu commit 842bad4b951296ca25f47b50cb358e502bf30ebb)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit e628f604d032d32971a1ca8670469e88939e3de2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 27 15:24:37 2017 +0900

    Add AC_CONFIG_MACRO_DIRS([m4]) to configure.ac
    
    Suggested by one of the tools called by autoreconf.
    
    (Cherry picked from amdgpu commit 227b399badaad9bbef0be5a776ce008d0d243449)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 7d7abf99b5441ddb04dbee99bc8fa7abc30d4c46
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 26 18:13:35 2017 +0900

    Only handle reflection in the driver with Xorg < 1.16
    
    Xorg doesn't handle the hardware cursor correctly in that case for
    rotation and general transforms, and we can't force the SW cursor.
    
    Fixes: f2bc882f1c10 ("Handle rotation in the driver also with Xorg
                          1.12-1.18")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 94dc2b80f3ef0b2c17c20501d824fb0447d52e7a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 14 16:57:17 2017 +0900

    If a TearFree flip fails, fall back to non-TearFree operation
    
    In order to avoid possible freeze / log file spam in that case.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99769
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit aff267ee36cc6a703a532f91f82adc1ba1425ff3
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 14 16:23:45 2017 +0900

    Use drmmode_crtc->scanout_id instead of 0 to check for scanout buffer
    
    Preparation for following change, no functional change intended.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit df88d51c5005476e6fbfca3f31b54be079ec5aaa
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jun 27 19:15:18 2017 +0900

    Use pRADEONEnt->fd exclusively for the DRM file descriptor
    
    This brings us closer to amdgpu.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 19626bce4e5e31c863eedb503ea3884ac3f60bea
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jun 27 18:32:28 2017 +0900

    Improve drmmode_fb_reference debugging code
    
    If a reference count is <= 0, call FatalError with the call location
    (in case it doesn't get resolved in the backtrace printed by
    FatalError).
    
    (Ported from amdgpu commit 1b6ff5fd9933c00ec1ec90dfc62e0b531927749b)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit bc46ffdf71ab3dfa0f95572529e818f2b619d380
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jun 27 18:19:31 2017 +0900

    Increase reference count of FB assigned to drmmode_crtc->flip_pending
    
    Otherwise, it could happen that we destroy the FB before the flip
    completes, resulting in use-after-free and most likely a crash.
    
    (Ported from amdgpu commit af7221e1c4d2dbdfd488eb0976a835584ea8441c)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit c9dd28cb0c9c3de676eadac61e727732510f6b9b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jun 22 12:38:55 2017 +0900

    Only call drmmode_scanout_free for non-GPU screens in LeaveVT
    
    Destroying the scanout buffers of GPU screens resulted in a crash when
    switching back to the Xorg VT.
    
    Fixes: 4cfa4615f79f ("Use drmmode_crtc_scanout_* helpers for RandR 1.4
                          scanout pixmaps")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 78fad9ca1635cca04b89807e3db029477cf46681
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jun 26 18:58:30 2017 +0900

    Include xf86Pci.h for DRICreatePCIBusID with xserver Git master
    
    The declaration has been moved there from dri.h.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit ef95e3a3cc9189c8906fe5b4d70bfa9f1055d7ce
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jun 13 09:32:44 2017 -0400

    modesetting: Validate the atom for enum properties
    
    The client could have said anything here, and if what they said doesn't
    actually name an atom NameForAtom() will return NULL, and strcmp() will
    be unhappy about that.
    
    [copied from xserver d4995a3936ae283b9080fdaa0905daa669ebacfc]
    
    Signed-off-by: Adam Jackson <ajax@redhat.com>
    Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>

commit d80d01a73c2eaba2e3649b7bc0a3541b3ff782f6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu May 18 11:12:34 2017 +0900

    Update URLs
    
    * Point to the amd-gfx mailing list
    * Specify the component in all bugzilla URLs
    * Use https:// for all HTML URLs
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2b7d77b90108911777a11ecaa63435552000c958
Author: Eric Anholt <eric@anholt.net>
Date:   Tue May 16 11:04:29 2017 -0700

    Use plain glamor_egl_create_textured_screen().
    
    Since 5064ffab631 (2014), glamor's implementation of _ext just drops the
    back_pixmap arg, which we were passing NULL (the default) to anyway.
    
    Signed-off-by: Eric Anholt <eric@anholt.net>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

commit 3a9f7e87c30b9f6334d38dfdd1cb15b28fe37fcb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu May 11 18:57:25 2017 +0900

    Remove unused struct members from drmmode_display.h
    
    (Ported from amdgpu commit 462ac3341e5bfbded9086d3d9043821d19352b3e)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7dc68e26755466f9056f8c72195ab8690660693d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 2 11:47:58 2017 +0900

    Simplify tracking of PRIME scanout pixmap
    
    Remember the shared pixmap passed to drmmode_set_scanout_pixmap for each
    CRTC, and just compare against that.
    
    Fixes leaving stale entries in ScreenRec::pixmap_dirty_list under some
    circumstances, which would usually result in use-after-free and a crash
    down the line.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 55e513b978b2afc52b7cafc5bfcb0d1dc78d75f6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Sat Apr 29 17:05:58 2017 +0900

    Use reference counting for tracking KMS framebuffer lifetimes
    
    References are held by the pixmaps corresponding to the FBs (so
    the same KMS FB can be reused as long as the pixmap exists) and by the
    CRTCs scanning out from them (so a KMS FB is only destroyed once it's
    not being scanned out anymore, preventing intermittent black screens and
    worse issues due to a CRTC turning off when it should be on).
    
    v2:
    * Only increase reference count in drmmode_fb_reference if it was sane
      before
    * Make drmmode_fb_reference's indentation match the rest of
      drmmode_display.h
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 944391b0052466b71bf9919b56139dc197a7e072
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Feb 8 18:14:30 2017 +0900

    Pass pixmap instead of handle to radeon_do_pageflip
    
    This brings us in line with amdgpu and prepares for the following
    change, no functional change intended.
    
    (Ported from amdgpu commit e463b849f3e9d7b69e64a65619a22e00e78d297b)
    
    v2:
    * Be more consistent with the amdgpu code, which should make porting
      the following change to amdgpu easier
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f32c45194ac6f82cbe42d255ed72f857018778e0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 9 11:18:00 2017 +0900

    Apply gamma correction to HW cursor
    
    The display hardware CLUT we're currently using for gamma correction
    doesn't affect the HW cursor, so we have to apply it manually when
    uploading the HW cursor data.
    
    This currently only works in depth 24/32.
    
    (Ported from amdgpu commit 82fa615f38137add75f9cd4bb49c48dd88de916f)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4c91f36d3058180b5a2d6a23e9b82f5c933d8716
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Apr 17 18:32:31 2017 +0900

    Don't set modes before RADEONWindowExposures_oneshot is called
    
    The root window contents may be undefined before that, so we don't want
    to show anything yet.
    
    Fixes a crash on startup with rotation and virtual resolution set in
    xorg.conf.
    
    Bugzilla: https://bugs.freedesktop.org/100276
    Fixes: cc9d6b7db9c2 ("Move DPMS check from radeon_scanout_do_update to
                          radeon_scanout_flip")
    (Ported from amdgpu commit 981bac185cfd74ae50dffc28f57cf34623a9595f)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d6c29250dbc293c932ca14997eb23399610b106d
Author: Daniel Stone <daniels@collabora.com>
Date:   Fri Apr 7 14:27:58 2017 +0100

    Set correct DRM event context version
    
    DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
    whatever version of libdrm is present. We were blindly asserting we
    supported whatever version that may be, even if we actually didn't.
    
    Set the version as 2, which should be bumped only with the appropriate
    version checks.
    
    Signed-off-by: Daniel Stone <daniels@collabora.com>
    (Ported from xserver commit 0c8e6ed85810e96d84173a52d628863802a78d82)
    v2: Remove second paragraph of commit log, we always initialize
        page_flip_handler2 = NULL (Emil Velikov)
    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1

commit 23985d3ef3150ef8cad30b92ef0cd8ba6cfa1f4d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 23 18:06:45 2017 +0900

    manpage: Don't put "'" at the beginning of a line
    
    It caused the whole line to be dropped.
    
    Fixes: 58cd1600057e ("Allow toggling TearFree at runtime via output
                          property")
    Reported-by: Andy Furniss <adf.lists@gmail.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (amdgpu commit)
    (Ported from amdgpu commit 165b51447643ce37f391f25ca6aecb8d76fabaa3)

commit dc30f5e27ef8a8e980adb21c1fea7c4f60c7e896
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 23 18:06:23 2017 +0900

    Post-release version bump

commit 66227060872219c1a0dc84fa4cea6264f7548446
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 16 16:38:15 2017 +0900

    Bump version for 7.9.0 release

commit 9a71445094b728f3d78db8f6808b4782ee19a453
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 8 17:42:56 2017 +0900

    Pass TRUE to drmmode_set_desired_modes the first time for GPU screens
    
    This is the only place we call drmmode_set_desired_modes for GPU screens
    during server startup. Without this change, the display outputs of
    secondary GPUs may stay on even while Xorg isn't using them.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 67ae5e00a748ad52cf92738d401afff2947b1891
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 8 11:20:30 2017 +0900

    Skip some initialization steps for GPU screens
    
    Xorg doesn't use the following functionality of GPU screens, so don't
    bother initializing it:
    
    * DRI page flipping
    * DRI3 / Present / SYNC fences
    * XVideo / XvMC
    * Root window with background None
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f0e7948e1c0e984fc27f235f365639e9cf628291
Author: Jochen Rollwagen <joro-2013@t-online.de>
Date:   Sun Mar 5 11:32:38 2017 +0100

    Fix build for XServer 1.13
    
    Latest git build stops with the error message
    
    radeon_kms.c: In function 'RADEONWindowExposures_oneshot':
    radeon_kms.c:1644:45: error: expected expression before 'RegionPtr'
         pScreen->WindowExposures(pWin, pRegion, RegionPtr pBSRegion);
    
    This patch fixes the build.
    
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

commit d63881623f0686a66a2e3e3c1f84e496aa52ec6b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 2 16:22:51 2017 +0900

    Don't call radeon_cs_flush_indirect & radeon_bo_wait in drmmode_copy_fb
    
    RADEONWindowExposures_oneshot takes care of it.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit cc9d6b7db9c2078be1e530a64af6d517c6a42024
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 1 17:35:59 2017 +0900

    Move DPMS check from radeon_scanout_do_update to radeon_scanout_flip
    
    When radeon_scanout_do_update is called from
    drmmode_crtc_scanout_update, drmmode_crtc->pending_dpms_mode may still
    be != DPMSModeOn, e.g. during server startup.
    
    Fixes intermittently showing garbage with TearFree enabled.

commit 0a12bf1085505017068dfdfd31d23133e51b45b9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 1 18:00:40 2017 +0900

    Call drmmode_set_desired_modes from a WindowExposures hook
    
    This is the earliest opportunity where the root window contents are
    guaranteed to be initialized, and prevents drmmode_set_mode_major from
    getting called before drmmode_set_desired_modes via RADEONUnblank ->
    drmmode_crtc_dpms. Also, in contrast to the BlockHandler hook, this is
    called when running Xorg with -pogo.
    
    Fixes intermittently showing garbage on server startup or after server
    reset.
    
    As a bonus, this avoids trouble due to higher layers (e.g. the tigervnc
    Xorg module) calling RADEONBlockHandler_oneshot repeatedly even after
    we set pScreen->BlockHandler = RADEONBlockHandler_KMS.
    
    v2:
    * Drop spaces between XORG_VERSION_NUMERIC arguments
    * Call radeon_bo_wait after radeon_cs_flush_indirect
    
    Bugzilla: https://bugs.freedesktop.org/99457
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)

commit df2d749a4db33298c8ce9f2cfb77c20c5538c9cc
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 2 16:05:42 2017 +0900

    Fix bogus indentation
    
    Trivial.
    
    Fixes: 58cd1600057e ("Allow toggling TearFree at runtime via output property")

commit 9035b6abea557828e672ee455f0c84e43da0906f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 28 18:13:42 2017 +0900

    present: Flush before flipping
    
    This isn't necessary for DRI clients, but the Present extension can also
    be used for presenting normal pixmaps rendered to via the X11 protocol.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 0a4eb0e12f0c9c653cf4cea6fd62e1a507eb261c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Feb 10 12:52:02 2017 +0900

    present: Use async flip for unflip if possible
    
    In that case, unflip operations should finish faster in general.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 9a951a3e551db58ba50e7a594521ceac54d90615
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 28 18:06:55 2017 +0900

    present: Also flush before using a flip to unflip
    
    Not doing so might result in intermittently scanning out stale contents
    of the screen pixmap.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f2bc882f1c1082bed9f496cfab6c8f07a76bc122
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 28 17:31:14 2017 +0900

    Handle rotation in the driver also with Xorg 1.12-1.18
    
    We cannot use the HW cursor in that case, but in turn we get more
    efficient and less teary updates of rotated outputs.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit ae921a3150f69c38b5b3c88a9e37d54fdf0d5093
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 28 17:47:09 2017 +0900

    Fold drmmode_crtc_scanout_allocate into drmmode_crtc_scanout_create
    
    Not used anywhere else anymore.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 987a34adb319923ad36e2b47a26837248f187c3e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 28 17:17:20 2017 +0900

    Call drmmode_crtc_scanout_create in drmmode_crtc_shadow_allocate as well
    
    Calling drmmode_crtc_scanout_allocate in drmmode_crtc_shadow_allocate
    resulted in drmmode_crtc_scanout_create called from
    drmmode_crtc_shadow_create passing an uninitialized pitch value to
    drmmode_create_bo_pixmap.
    
    Fixes issues such as failure to allocate the scanout pixmap or visual
    corruption and GPUVM faults when attempting to use rotation with Xorg
    <1.19.
    
    Bugzilla: https://bugs.freedesktop.org/99916
    Fixes: ea30d856ba5e ("Pass pitch from drmmode_crtc_scanout_allocate to drmmode_create_bo_pixmap")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 244d4bc7f8c8f6bc90f49556c0b9344c8aa40295
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 9 18:55:04 2017 +0900

    present: Wait for screen pixmap BO idle before setting modes for unflip
    
    To make sure the screen pixmap contents are up to date when it starts
    being scanned out.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 3ff29e5a14451916bc66b4e0028e9a317f0723f8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 9 18:50:40 2017 +0900

    present: Only call drmModeRmFB after setting modes for unflip
    
    Fixes display intermittently blanking when a modeset is used for unflip.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 0c29deb5a97d9a57e994cc0053c49ddf7aca6ecb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 21 16:56:27 2017 +0900

    Use drmmode_crtc_scanout_free in drmmode_fini
    
    We were leaking drmmode_crtc->scanout_damage, which caused trouble on
    server reset. Fixes server reset with active separate scanout pixmaps.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 58cd1600057e41aade0106d4acf78e23eac6e44f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 1 18:37:57 2016 +0900

    Allow toggling TearFree at runtime via output property
    
    Option "TearFree" now sets the default value of the output property.
    See the manpage update for details.
    
    TearFree is now enabled by default for outputs using rotation or other
    RandR transforms, and for RandR 1.4 slave outputs.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 305e2cbf335837a2ab6a24e9ff65815afe038296
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 21 15:55:13 2017 +0900

    Factor out drmmode_crtc_scanout_update helper
    
    Cleanup in preparation for following change, no functional change
    intended.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 649644a88347a6d03de68f8c41db03a82deeb23b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 14 17:36:31 2017 +0900

    Factor out radeon_prime_dirty_to_crtc helper
    
    Cleanup in preparation for the following change, no functional change
    intended.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 1351e48efe7a2c28eab447e16f36a00fbd02ae48
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 7 18:43:56 2017 +0900

    Don't destroy current FB if drmModeAddFB fails
    
    It would probably result in a black screen.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 481394e3c9f9f7d88bb66fe9ae8834c87952a8ab
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 7 18:39:05 2017 +0900

    Fix flip event data leak if calloc or drmModeAddFB fails
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 80fc78633962c1ec996b1721bfb757b98dc85bfc
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 31 16:25:37 2017 +0900

    Don't handle Option "SwapbuffersWait" at all with glamor
    
    It never had any effect with glamor.
    
    v2: Better formatting, no functional change from v1.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> (v1)

commit d611d21d9bf9aaa100ff7a5762e5980634846207
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 24 18:05:45 2017 +0900

    Enable tiling by default with glamor on PALM
    
    The DFS check is only relevant for EXA.
    
    The lack of tiling prevented DRI3 clients from using page flipping,
    resulting in tearing.
    
    Bugzilla: https://bugs.freedesktop.org/99491
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 55a33205cb9bd8091b4bcd478c2d1d191248681b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 24 18:22:49 2017 +0900

    Add 10-radeon.conf xorg.conf.d snippet
    
    This instructs Xorg >= 1.16 to try loading the radeon driver for devices
    managed by the radeon kernel driver, even if the ati wrapper driver
    isn't available.
    
    Copied from the amdgpu driver.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 8e6a4e96b7b27559e186f71b5547abb0a80b96dd
Author: Mihail Konev <k.mvc@ya.ru>
Date:   Thu Jan 26 14:00:22 2017 +1000

    autogen: add default patch prefix
    
    Signed-off-by: Mihail Konev <k.mvc@ya.ru>

commit e062933b5489705bdcba7a266d14ba6fd3e767ba
Author: Emil Velikov <emil.l.velikov@gmail.com>
Date:   Mon Mar 9 12:00:52 2015 +0000

    autogen.sh: use quoted string variables
    
    Place quotes around the $srcdir, $ORIGDIR and $0 variables to prevent
    fall-outs, when they contain space.
    
    Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
    Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 4fe183111f82d412760b175b3c9c8583acba804a
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Tue Jan 24 10:32:07 2017 +1000

    autogen.sh: use exec instead of waiting for configure to finish
    
    Syncs the invocation of configure with the one from the server.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: Emil Velikov <emil.velikov@collabora.com>

commit a1787e4615a76ab0bb12498be66591c86a6b07ae
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 18 19:07:11 2017 +0900

    ati: Support loading the amdgpu driver from the ati wrapper
    
    If .../share/X11/xorg.conf.d/10-amdgpu.conf doesn't exist, but the ati
    wrapper is loaded, it will otherwise try to use the radeon driver even
    for GPUs driven by the amdgpu kernel driver. This can only fail,
    potentially in bad ways.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 41b82c776b571e1556f300d77c715aebdd87d8e6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 24 18:14:23 2017 +0900

    .editorconfig: src/ati.c only uses spaces for indentation
    
