commit 36703f66c3b06875651606a6280d5dc9d9dad51e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 19 18:01:02 2019 +0100

    Bump version for 19.0.1 release

commit 4407c78bd86da4460ee07a15a365e07d99e0dd27
Author: Dave Airlie <airlied@redhat.com>
Date:   Thu Mar 14 11:17:32 2019 +0100

    modesetting: add tile property support
    
    This adds tiling support to the driver, it retrieves the tile info from
    the kernel and translates it into the server format and exposes the
    property.
    
    (Ported from xserver commits 8fb8bbb3062f1a06621ab7030a9e89d5e8367b35
     and 6abdb54a11dac4e8854ff94ecdcb90a14321ab31)
    (Ported from amdgpu commit 6ee857726166f495abcd68e4ff60e3a09593d079)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 79bc0e054f37026377d54cac6cd8127d4aa9baca
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 14 11:10:51 2019 +0100

    Use radeon_finish in drmmode_crtc_scanout_update
    
    radeon_glamor_finish only works if we're using glamor, otherwise it'll
    crash.
    
    Fixes: ce7db51020d3 "Cancel pending scanout update in drmmode_crtc_scanout_update"
    Bug: https://bugs.debian.org/924540
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f6cd4a67d7de5d3ff1a6e58a8c83749fc8ffc310
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 8 11:48:10 2019 +0100

    Revert "glamor: Avoid glamor_create_pixmap for pixmaps backing windows"
    
    This reverts commit 274703087f80342f51fa69c935bb9a1cb0c4ae47.
    
    Reports of visual corruption were bisected to this, e.g.
    https://bugs.archlinux.org/task/61941 . I can reproduce this with Turks,
    but not with Bonaire. I assume it's a Mesa/glamor bug, but let's revert
    for now.
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 0d132d99e0b750896a78f47d73a8639680495d8c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 6 17:48:03 2019 +0100

    Bump version for 19.0.0 release

commit c301b8af25d2c2cd49035a4395ebe6c3612df366
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 1 18:28:11 2019 +0100

    dri2: Call drm_queue_handle_deferred in dri2_deferred_event
    
    drm_queue_handler just puts the event on the signalled list; without
    calling drm_queue_handle_deferred, actual processing of the event may be
    delayed indefinitely, e.g. until another event arrives from the kernel.
    
    This could result in DRI2 clients hanging during DPMS off.
    
    Fixes: ba83a866af5a "Add radeon_drm_handle_event wrapper for
                         drmHandleEvent"
    (Ported from amdgpu commit 09be74a3d1dd9604336d9a27f98d132b262dcbaf)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 705020b6247eaa062edc9c88e6ad52f8c5468051
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 1 18:23:30 2019 +0100

    present: Check that flip and screen pixmap pitches match
    
    If they don't, flipping will result in corrupted display.
    
    Test case:
    
    * Run Xorg at 1920x1080 with no window manager
    * glxgears -geometry 2048x1080
    
    The Present extension code in xserver 1.21 will check for this.
    
    (Ported from amdgpu commit a636f42b496b0604ca00a144690ece61d1a88a27)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 15697ee242c30b9ea6775624e8282e0171a113a7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:27:10 2019 +0100

    Keep waiting for a pending flip if drm_handle_event returns 0
    
    drm_wait_pending_flip stopped waiting if drm_handle_event returned 0,
    but that might have processed only some unrelated DRM events. As long as
    the flip is pending, we have to keep waiting for its completion event.
    
    Noticed while working on the previous fix.
    
    (Ported from amdgpu commit 9045fb310f88780e250e60b80431ca153330e61b)

commit 227123de3d862e691131708b7f55260bee17f2b7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:24:41 2019 +0100

    Call drmHandleEvent again if it was interrupted by a signal
    
    drmHandleEvent can be interrupted by a signal in read(), in which case
    it doesn't process any events but returns -1, which
    drm_handle_event propagated to its callers. This could cause the
    following failure cascade:
    
    1. drm_wait_pending_flip stopped waiting for a pending flip.
    2. Its caller cleared drmmode_crtc->flip_pending before the flip
       completed.
    3. Another flip was attempted but got an unexpected EBUSY error because
       the previous flip was still pending.
    4. TearFree was disabled due to the error.
    
    The solution is to call drmHandleEvent if it was interrupted by a
    signal. We can do that in drm_handle_event, because when that is called,
    either it is known that there are events ready to be processed, or the
    caller has to wait for events to arrive anyway.
    
    Bugzilla: https://bugs.freedesktop.org/109364
    (Ported from amdgpu commit 3ff2cc225f6bc08364ee007fa54e9d0150adaf11)

commit 1bfdccf7639ee2f655dc659cafa63830ba28be85
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:11:10 2019 +0100

    Only update drmmode_crtc->flip_pending after actually submitting a flip
    
    And only clear it if it matches the framebuffer of the completed flip
    being processed.
    
    Fixes
    
     (WW) RADEON(0): flip queue failed: Device or resource busy
     (WW) RADEON(0): Page flip failed: Device or resource busy
     (EE) RADEON(0): present flip failed
    
    due to clobbering drmmode_crtc->flip_pending.
    
    Reproducer: Enable TearFree, run warzone2100 fullscreen, toggle
    Vertical sync on/off under Video Options. Discovered while investigating
    https://bugs.freedesktop.org/109364 .
    
    (Ported from amdgpu commit e72a02ba1d35743fefd939458b9d8cddce86e7f5)

commit dcd3527299c1f6d6faa401c565fa884f4d8f3287
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:08:35 2019 +0100

    Don't allow TearFree scanout flips to complete in the same vblank period
    
    We were using a relative target of 0, meaning "complete the flip ASAP".
    This could result in the flip sometimes, but not always completing in
    the same vertical blank period where the corresponding drawing occurred,
    potentially causing judder artifacts with applications updating their
    window contents synchronized to the display refresh. A good way to test
    this is the vsynctester.com site in a windowed browser, where the judder
    results in the large "VSYNC" text intermittently appearing red or cyan
    instead of the expected gray.
    
    To avoid this, use a relative target MSC of 1, meaning that if a
    vertical blank period is in progress, the flip will only complete in the
    next one.
    
    Reported by Julian Tempel and Brandon Wright in
    https://bugs.freedesktop.org/106175 .
    
    (Ported from amdgpu commit a1b479c7d0066c481af920f297d6af9009dda11e)

commit 274703087f80342f51fa69c935bb9a1cb0c4ae47
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:06:50 2019 +0100

    glamor: Avoid glamor_create_pixmap for pixmaps backing windows
    
    If the compositing manager uses direct rendering (as is usually the case
    these days), the storage of a pixmap allocated by glamor_create_pixmap
    needs to be reallocated for sharing it with the compositing manager.
    Instead, allocate pixmap storage which can be shared directly.
    
    (Ported from amdgpu commit bf326f2ea19daa6c8da23d6788ff301ae70b8e69)

commit 6d1dfe2523e900517bd1e8743c87d6990a82c800
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:04:41 2019 +0100

    dri2: Flush in dri2_create_buffer2 after calling glamor_set_pixmap_bo
    
    To make sure the client can't use the shared pixmap storage for direct
    rendering first, which could produce garbage.
    
    Bugzilla: https://bugs.freedesktop.org/109235
    (Ported from amdgpu commit ebd32b1c07208f8dbe853e089f5e4b7c6a7a658a)

commit 77d7abf46446522e686c6b6f1e4857458589ef37
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 28 18:00:20 2019 +0100

    dri3: Flush if necessary in dri3_fd_from_pixmap
    
    To make sure the client can't use the shared pixmap storage for direct
    rendering first, which could produce garbage.
    
    Bugzilla: https://bugs.freedesktop.org/109235
    (Ported from amdgpu commit d168532ee739f7e33a2798051e64ba445dd3859f)

commit b1c01698f577577e4a88bad0ae08fb5d998e7ebb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 9 11:26:14 2019 +0100

    Only call drmmode_validate_leases if RandR is enabled
    
    It would crash if RandR is disabled, e.g. because Xinerama is enabled.
    
    Bugzilla: https://bugs.freedesktop.org/109230
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 38db1bbcfc019c92884c7819a6630c70e543f6b2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 9 11:33:18 2019 +0100

    Only call drmmode_uevent_init if RandR is enabled
    
    There's no point in listening for hotplug events if RandR is disabled,
    as there's no other mechanism for them to be propagated. We were already
    mostly ignoring them in that case.
    
    Inspired by
    https://gitlab.freedesktop.org/xorg/driver/xf86-video-intel/commit/1a489142c8e6a4828348cc9afbd0f430d3b1e2d8
    (via https://bugs.freedesktop.org/109230#c11).
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 803f872f7d4b2d80be434bb42ce64dfd295b122c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 18:04:21 2018 +0100

    Use two HW cursor buffers per CRTC
    
    Switch to the other buffer when xf86_config->cursor changes. Avoids
    these issues possible when re-using the same buffer:
    
    * The HW may intermittently display a mix of the old and new cursor
      images.
    * If the hotspot changes, the HW may intermittently display the new
      cursor image at the location corresponding to the old image's hotspot.
    
    Bugzilla: https://bugs.freedesktop.org/108832
    (Ported from amdgpu commit 0d60233d26ec70d4e1faa343b438e33829c6d5e4)

commit 91e557f78ad261e76a1829f54722c2c0781742d2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 18:00:09 2018 +0100

    Update cursor position in drmmode_show_cursor if hotspot changed
    
    The cursor position is updated to be consistent with the new hotspot in
    the same ioctl call.
    
    (Ported from amdgpu commit b04697de5270e8e45744a7025c24df1f454a4cf0)

commit 92df709786830d4e30a106dd49d8e0355c50c8f0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 17:54:36 2018 +0100

    Use drmIoctl in drmmode_show_cursor
    
    This should be functionally equivalent to what drmModeSetCursor(2) do
    behind the scenes, but allows for new tricks in following changes.
    
    (Ported from amdgpu commit b344e1559e936046ef02c777fc4f6bcefa3830bc)

commit e14c3d2f86c7be2b5c3d06a47bf0abe954207d0b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 17:38:51 2018 +0100

    Drop RADEONInfoRec::cursor_bo array
    
    Not needed or even useful for anything.
    
    (Ported from amdgpu commit e95044e45350870fa7e237860e89ade91ac03550)

commit f66254c171f5a3b052a2a9e0339f17dfb5a60dc2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 12:49:27 2018 +0100

    Automatically try re-enabling TearFree after a flip failed
    
    Specifically, after both the page flip and vblank ioctls failed, but
    then the vblank ioctl started working again. This can happen
    intermittently e.g. when hotplugging a DP display. Previously, TearFree
    would stay disabled in that case until a modeset was triggered somehow.
    
    Bugzilla: https://bugs.freedesktop.org/103791
    (Ported from amdgpu commit bcfa6c258fdf41a9928f8a3c78fc528d0fafee25)

commit ce7db51020d32f17e442338bfd305220feb51630
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 12:47:18 2018 +0100

    Cancel pending scanout update in drmmode_crtc_scanout_update
    
    drmmode_crtc_scanout_update does the equivalent of a scanout update,
    so no need to do it again. This might also avoid issues if there's a
    pending scanout update at this point.
    
    (Ported from amdgpu commit 4e7a24ac5a64e402146953ec5850d13c05742116)

commit 21d65e5b78c8889e363aee8596cd0b0f942fee46
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 21 12:38:04 2018 +0100

    Perform scanout buffer update immediately if drmmode_wait_vblank fails
    
    Otherwise the damaged screen contents may never be displayed in that
    case.
    
    (Ported from amdgpu commit 500fadb16285146e91f62fce3a0ce1360ca684ba)

commit 64942d2c49f9fa1afcc42c07943d076a40963e51
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 20 19:00:08 2018 +0100

    Move deferred vblank events to separate drm_vblank_deferred list
    
    It was still possible for nested xorg_list_for_each_entry_safe loops
    to occur over the drm_vblank_signalled list, which could mess up that
    list. Moving deferred events to a separate list allows processing the
    drm_vblank_signalled list without xorg_list_for_each_entry_safe.
    
    Bugzilla: https://bugs.freedesktop.org/108600
    (Ported from amdgpu commit 51ba6dddee40c3688d4c7b12eabeab516ed153b7)

commit f450632077843a95a6ef269febbfb64a605045ed
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 20 18:48:19 2018 +0100

    Explicitly keep track of whether a DRM event is for a flip or not
    
    When an async flip is performed, and TearFree is enabled on the CRTC
    used for timing, we schedule a vblank event for completing the page
    flip. The DRM event queuing code treated this event like a vblank event,
    but it needs to be treated like a page flip event.
    
    (Ported from amdgpu commit e2c7369cae65069aa93eed1c0b678f975ce5c274)

commit 189b6facb3988c00c96d970f8c13ed8d58fa3998
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 20 18:44:24 2018 +0100

    Use drm_abort_one in drm_queue_handler
    
    At this point, we've already established that e->handler is NULL, no
    need to check again in drm_queue_handle_one. This also makes it clearer
    what's happening.
    
    (Ported from amdgpu commit eda571222f5a6be47f8897e82d85199bb9d95251)

commit 06957e3067b9eb38d30b32d98a07895399f4cb36
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 20 18:40:19 2018 +0100

    glamor: Can work at depth >= 15 with current xserver Git master
    
    (Ported from amdgpu commit 0734cdf544ffd3f2ac8749ad0e4bf43f8a5cea50)

commit 99ac121770da53196124d80375a5c8edbcf827fa
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 20 18:38:33 2018 +0100

    Skip gamma correction of cursor data if premultiplied R/G/B > alpha
    
    The un-premultiplied R/G/B values would overflow the gamma LUT, so just
    pass through the data unchanged, and leave it up to the HW how to
    interpret such weird premultiplied alpha pixels.
    
    Bugzilla: https://bugs.freedesktop.org/108355
    (Ported from amdgpu commit 13c94a373b4858a2d2aa14c22b5f98d53c84c0d9)

commit 0c40a76d1c050d018e6d59bebb5efc9c62be308c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Dec 20 18:25:21 2018 +0100

    Detect and fix up non-premultiplied cursor data
    
    X server >= 1.18 already has code for this, but handle it with older X
    servers as well.
    
    (Ported from amdgpu commits ad6dfb0124860cf67730bde85867f81d9258c84d &
     426f9a49655f01863cf4d898f525e5f95984e0c4)

commit 0058fd2ebf4c900b12f129984e98886a7ac84b2f
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Tue Dec 18 11:40:35 2018 +0100

    Fix crash when page flipping in multi-X-Screen/Zaphod mode
    
    radeon_do_pageflip() indexed the flipdata->fb[] array
    indexing over config->num_crtc, but the flip completion
    routines, e.g., drmmode_flip_handler(), index that array
    via the crtc hw id from drmmode_get_crtc_id(crtc).
    
    This is mismatched and causes indexing into the wrong
    array slot at flip completion -> Server crash.
    
    Always use drmmode_get_crtc_id(crtc) for indexing into
    the array to fix this.
    
    Tested on a dual-X-Screen setup with one video output
    assigned to each X-Screen, page-flipping an OpenGL app
    on either of both X-Screens. This used to crash when
    flipping on X-Screen 1, now it doesn't anymore.
    
    Fixes: 740f0850f1e4 "Store FB for each CRTC in drmmode_flipdata_rec"
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>

commit b559fd83b2b026b50fe39a2b69bdc0901fd3330c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Nov 19 11:38:22 2018 +0100

    Post-release version bump

commit 33cbd449b5305b8e8c0319af8becc1ab1832c101
Author: Alan Coopersmith <alan.coopersmith@oracle.com>
Date:   Sun Nov 18 12:22:16 2018 -0800

    Update README for gitlab migration
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>

commit 5e6fa5c17a810127f0049816f20db6b871ca77e0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 24 18:22:05 2018 +0200

    Allow up to six instances in Zaphod mode
    
    Corresponding to up to six CRTCs being available in the hardware.
    
    (Ported from amdgpu commit c9d43c1deb9a9cfc41a8d6439caf46d12d220853)

commit c480fd066fe129fa6561fca8c09f037613b753e8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 24 18:19:42 2018 +0200

    Make wait_pending_flip / handle_deferred symmetric in set_mode_major
    
    We were always calling the latter, but not always the former, which
    could result in handling deferred DRM events prematurely.
    
    (Ported from amdgpu commit 955373a3e69baa241a1f267e96d04ddb902f689f)

commit 86fe8d27b9a3f043e5288ce50eaf1f5fffd24516
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Oct 24 18:14:02 2018 +0200

    Handle pending scanout update in drmmode_crtc_scanout_free
    
    We have to wait for a pending scanout flip or abort a pending scanout
    update, otherwise the corresponding event handler will likely crash
    after drmmode_crtc_scanout_free cleaned up the data structures.
    
    Fixes crash after VT switch while dedicated scanout pixmaps are enabled
    for any CRTC.
    
    (Ported from amdgpu commit 0cd2c337d2c02b8ec2bd994d6124b4aaaad10741)

commit f892d3791219d1041e0cbb1b866e15774004aa18
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Oct 15 17:14:41 2018 +0200

    dri3: Handle radeon_get_pixmap_bo returning NULL
    
    We were trying to already, but testing the wrong pointer.
    
    Fixes: b85b7b11f5b5 "Add struct radeon_buffer"
    Bug: https://bugs.debian.org/910846
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 80514b7b1b88f46f3965ff023035dea83b57e652
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Sep 14 17:48:49 2018 +0200

    Bump version for 18.1.0 release

commit 2d58830c3feafc54dccc0b7bf761a466437d4a09
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 5 18:23:29 2018 +0200

    Fix uninitialized use of local variable pitch in radeon_setup_kernel_mem
    
    Fixes server reset.
    
    Pointed out by clang:
    
    ../../src/radeon_kms.c:2721:9: warning: variable 'pitch' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
        if (!info->front_buffer) {
            ^~~~~~~~~~~~~~~~~~~
    ../../src/radeon_kms.c:2765:27: note: uninitialized use occurs here
        pScrn->displayWidth = pitch / cpp;
                              ^~~~~

commit 5d5d883496842da84d9418e91cb13454751da625
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Sep 7 18:16:22 2018 +0200

    Bail early from drm_wait_pending_flip if there's no pending flip
    
    No need to process any events in that case.
    
    (Ported from amdgpu commit ca5eb9894fff153c0a1df7bdc4a4745713309e27)

commit 4c7d5e50a5e469a541bc463cecb505fe850c0824
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 5 11:29:43 2018 +0200

    Don't use xorg_list_for_each_entry_safe for signalled flips
    
    drm_wait_pending_flip can get called from drm_handle_event, in which
    case xorg_list_for_each_entry_safe can end up processing the same entry
    in both. To avoid this, just process the first list entry until the list
    is empty.
    
    (Ported from amdgpu commit 26770be44b89b83bf39c28f2fe284c8cb92ed0c0)

commit 87b9a3e516d19dd1b89a64f6cac990fae53fc1b3
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Sep 5 11:27:25 2018 +0200

    Always delete entry from list in drm_queue_handler
    
    We left entries without a handler hook in the list, so the list could
    keep taking longer to process and use up more memory.
    
    (Ported from amdgpu commit 7eea3e2cd74eed22e982319144e18ae5b1087b78)

commit de88ea2755611bdcb18d91d8234d2ab5be8ff2e9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 24 11:00:16 2018 +0200

    glamor: Handle ihandle == -1 in radeon_glamor_set_shared_pixmap_backing

commit 84bde2df5b453f8aab35aa18b0cf1f20b8d20488
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 24 10:58:51 2018 +0200

    EXA: Handle ihandle == -1 in RADEONEXASharePixmapBacking

commit 1799680f7bd84e0618f34f4c7486799521ddaf83
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 24 10:56:58 2018 +0200

    Handle ihandle == -1 in radeon_set_shared_pixmap_backing
    
    It means to stop using the shared pixmap backing.
    
    Fixes crash when changing PRIME slave output configuration.

commit 3c42bd04800211f64a17640c7ce7c4111ffd4978
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 24 10:55:49 2018 +0200

    EXA: Handle NULL BO pointer in radeon_set_pixmap_bo

commit cba8fe4d64819aaa8ba516aa68dbe6d2aa153046
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 23 18:59:18 2018 +0200

    Use AC_CONFIG_MACRO_DIR instead of AC_CONFIG_MACRO_DIRS
    
    Older versions of autoconf only supported the former.
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 7b01c10137aba24c8f61dd9b2a19ea257ad24371
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 23 18:42:28 2018 +0200

    Add m4 directory
    
    Although normally it only warns about it, under some circumstances,
    aclocal can error out if this directory doesn't exist.
    
    Reported-by: John Lumby <johnlumby@hotmail.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 60cd28bbbe4f9db391b4f27c5ff9289d5c2bef40
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 16 18:06:31 2018 +0200

    Remove drmmode_crtc_private_rec::present_vblank_* related code
    
    Not needed anymore with the more robust mechanisms for preventing nested
    drmHandleEvent calls introduced in the previous changes.
    
    (Ported from amdgpu commit 85cd8eef0cbed7b409b07f58d76dacd34aa3ddea)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit c42f6e2e61d166c8d3ef3fcad175d7050a00288b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jul 20 16:56:22 2018 +0200

    Defer vblank event handling while waiting for a pending flip
    
    This is to avoid submitting more flips while we are waiting for pending
    ones to complete.
    
    (Ported from amdgpu commit e52872da69ecc84dafb3355839e35b0383f0d228)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit ba83a866af5a3784fc4822614375cc081e93197c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 16 17:44:45 2018 +0200

    Add radeon_drm_handle_event wrapper for drmHandleEvent
    
    Instead of processing DRM events directly from drmHandleEvent's
    callbacks, there are three phases:
    
    1. drmHandleEvent is called, and signalled events are re-queued to
       _signalled lists from its callbacks.
    2. Signalled page flip completion events are processed.
    3. Signalled vblank events are processed.
    
    This should make sure that we never call drmHandleEvent from one of its
    callbacks, which would usually result in blocking forever.
    
    (Ported from amdgpu commit 739181c8d3334ff14b5a607895dfdeb29b0d9020)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 93621e408c17dd9e082236c17f051c06558d7f4d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 16 17:27:06 2018 +0200

    Add radeon_drm_wait_pending_flip function
    
    Replacing the drmmode_crtc_wait_pending_event macro.
    
    (Ported from amdgpu commit 6029794e8a35417faf825491a89b85f713c77fc1)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit ecdf0b7ec9378bc386ce8276f16fb16d09f72812
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 16 17:14:42 2018 +0200

    Move DRM event queue related initialization to radeon_drm_queue_init
    
    And make radeon_drm_queue_handler not directly accessible outside of
    radeon_drm_queue.c.
    
    (Ported from amdgpu commit 0148283984c77f7a6e97026edc3093497547e0a4)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 824189b3da9edc33e1a4f5c6130a043da73c1a4c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 16 18:22:27 2018 +0200

    Use correct FB handle in radeon_do_pageflip
    
    We were always using the handle of the client provided FB, which
    prevented RandR transforms from working, and could result in a black
    screen.
    
    Bugzilla: https://bugs.freedesktop.org/107519
    Fixes: 740f0850f1e4 "Store FB for each CRTC in drmmode_flipdata_rec"
    (Ported from amdgpu commit f6cd72e64e85896b6d155bee0930e59771dcb701)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 740f0850f1e40403c8dd727e074eae36caeb1f63
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 2 18:49:48 2018 +0200

    Store FB for each CRTC in drmmode_flipdata_rec
    
    We were only storing the FB provided by the client, but on CRTCs with
    TearFree enabled, we use a separate FB. This could cause
    drmmode_flip_handler to fail to clear drmmode_crtc->flip_pending, which
    could result in a hang when waiting for the pending flip to complete. We
    were trying to avoid that by always clearing drmmode_crtc->flip_pending
    when TearFree is enabled, but that wasn't reliable, because
    drmmode_crtc->tear_free can already be FALSE at this point when
    disabling TearFree.
    
    Now that we're keeping track of each CRTC's flip FB separately,
    drmmode_flip_handler can reliably clear flip_pending, and we no longer
    need the TearFree hack.
    
    (Ported from amdgpu commit 9b6782c821e0bdc53336d98f87ddde752faf7902)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit ef2a6b818fa47ad571bb0bc105aa8193d51a2190
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 2 18:48:04 2018 +0200

    glamor: Set RADEON_CREATE_PIXMAP_DRI2 for DRI3 pixmaps
    
    Not doing this resulted in falling back to software for DRI3 client
    presentation operations with ShadowPrimary.
    
    (Ported from amdgpu commit 2989d40ef74d9966e8e8df2ef7727b2cc48d4960)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit db28d35ce9fd07a2a4703f3df0633d4c8291ff9b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jul 27 11:30:57 2018 +0200

    glamor: Use glamor_egl_create_textured_pixmap_from_gbm_bo when possible
    
    Inspired by the modesetting driver.
    
    Fixes screen pixmap corruption with Xorg < 1.20, and as a bonus,
    simplifies the code slightly.
    
    Bugzilla: https://bugs.freedesktop.org/107385
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7de4ea15880565c6536ed6859fd32ec89ce0b4c0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jul 27 09:13:12 2018 +0200

    Bump version to 18.0.99
    
    Forgot to do this after the 18.0.1 release.

commit fed411290b696ecf9f0e799ec4bad054e4a95017
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 24 17:28:46 2018 +0200

    Use strcpy for RandR output property names
    
    Instead of strncpy with the string length. Avoids new warnings with GCC
    8:
    
    ../../src/drmmode_display.c: In function ‘drmmode_output_create_resources’:
    ../../src/drmmode_display.c:2240:2: warning: ‘strncpy’ output truncated before terminating nul copying 8 bytes from a string of the same length [-Wstringop-truncation]
      strncpy(tearfree_prop->name, "TearFree", 8);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../src/drmmode_display.c:2244:2: warning: ‘strncpy’ output truncated before terminating nul copying 3 bytes from a string of the same length [-Wstringop-truncation]
      strncpy(tearfree_prop->enums[0].name, "off", 3);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../src/drmmode_display.c:2245:2: warning: ‘strncpy’ output truncated before terminating nul copying 2 bytes from a string of the same length [-Wstringop-truncation]
      strncpy(tearfree_prop->enums[1].name, "on", 2);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ../../src/drmmode_display.c:2247:2: warning: ‘strncpy’ output truncated before terminating nul copying 4 bytes from a string of the same length [-Wstringop-truncation]
      strncpy(tearfree_prop->enums[2].name, "auto", 4);
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    (Ported from amdgpu commit f3b2ed37d683f8616a0a31ff63133ddb8fe1a4a3)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d258413c956cd46a237d4b5b94a35817ca7ce8f4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 23 18:54:40 2018 +0200

    Remove drmmode_terminate_leases
    
    The RandR screen private is already freed when our CloseScreen runs, so
    this can't do anything useful. This cleanup has to be done by the X
    server itself.
    
    (Ported from amdgpu commit 5f06d6b8ba570b500956ad26fee711d5ac427818)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit ffdbd46b0abcf8cbe73eb8930ddcd7fd2485d9b5
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 23 11:02:32 2018 +0200

    Hardcode "non-desktop" RandR property name
    
    It's a bit silly to require current randrproto just for this definition,
    which can't really change anyway.
    
    Suggested-by: Qiang Yu <qiang.yu@amd.com>
    (Ported from amdgpu commit ae8e02c6fc4ef5d5340b8cd4739e66b19b9e3386)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 64bd009d17986c71726724859f100ad40a6e3096
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 19 11:33:42 2018 +0200

    Don't allocate drmmode_output->props twice
    
    This was accidentally duplicated when porting RandR lease support from
    amdgpu.
    
    Trivial.

commit 499d2f9d5d301ef1efd4ffc2952677609ef05122
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 17 11:43:12 2018 +0200

    glamor: Invalidate cached GEM handle in radeon_set_pixmap_bo
    
    We continued using the stale cached handle, causing issues e.g. when
    resizing the screen via RandR.
    
    Reported-by: iive on IRC
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit d9a139bc6d453d33593685de67d1425611f3ab6f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 16 12:51:26 2018 +0200

    glamor: Fix glamor_block_handler argument in radeon_glamor_finish
    
    I missed this before because this code isn't compiled with current
    xserver.
    
    Trivial.

commit f533b1f654952cee794de49d28d01947a6571daf
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jul 11 19:13:28 2018 +0200

    Add RandR leases support
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (Ported from xserver commit e4e3447603b5fd3a38a92c3f972396d1f81168ad)
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    (Ported from amdgpu commit 61040bdfa360975614fb47aa7ea1b3a1abac3427)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit b4f0f44a9f67f2eafd4a2b5ab919e6ea7fa2acf7
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jul 11 19:10:20 2018 +0200

    modesetting: Create CONNECTOR_ID properties for outputs [v2]
    
    This lets a DRM client map between X outputs and kernel connectors.
    
    v2:
            Change CONNECTOR_ID to enum -- Adam Jackson <ajax@nwnk.net>
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (Ported from xserver commit 023d4aba8d45e9e3630b944ecfb650c081799b96)
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    (Ported from amdgpu commit ab7e39c5a03e24c3ce3ee2f22ada7572bc2d9aa7)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 612bda0a5e769f23478b364cf89620222cfac349
Author: Keith Packard <keithp@keithp.com>
Date:   Wed Jul 11 19:07:59 2018 +0200

    modesetting: Record non-desktop kernel property at PreInit time
    
    Save any value of the kernel non-desktop property in the xf86Output
    structure to avoid non-desktop outputs in the default configuration.
    
    [Also bump randrproto requirement to a version that defines
    RR_PROPERTY_NON_DESKTOP - ajax]
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    (Ported from xserver commit b91c787c4cd2d20685db69426c539938c556128a)
    Signed-off-by: Michel Dänzer <michel.daenzer@amd.com>
    (Ported from amdgpu commit 14db71a606128c4a207f43298809af279b77e2a8)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 4b3e5f81c6032003237bb05c3ab96423c39524fc
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 11 19:04:26 2018 +0200

    Call drmmode_crtc_gamma_do_set from drmmode_setup_colormap
    
    Instead of from drmmode_set_mode_major. There's no need to re-set the
    gamma LUT on every modeset, the kernel should preserve it.
    
    (Ported from amdgpu commit baea4fa492f635cdfe746a84be2e337d9aeae8a9)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 16ddc109660dbe813c457765eda66422fb745a3e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 11 19:03:12 2018 +0200

    Remove #if 0'd code
    
    This has always been disabled, no need to keep it.
    
    (Ported from amdgpu commit 19a40758be04e1d451a030f452efb49e8aaad541)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 447ef0458fac047919d021f2ba1753a647f5c503
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 11 19:01:31 2018 +0200

    Check dimensions passed to drmmode_xf86crtc_resize
    
    When enabling a secondary GPU output, Xorg can try resizing the screen
    beyond the limit advertised by the driver, leading to drmModeAddFB
    failing and primary GPU outputs turning off. Check for this and bail
    instead.
    
    (Ported from amdgpu commit 940c8b39f79789d4d5ddb8ab8d25a8ae05932756)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 6a0c01bbd4ed48c696c38952ee33ce21afec9f91
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 11 18:59:58 2018 +0200

    Use drmmode_crtc_dpms in drmmode_set_desired_modes
    
    Simplifies the latter slightly.
    
    (Ported from amdgpu commit 74124f2c17dbb4b752707bb7eee398ae099e8a2c)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 59441ee3dae15e0e81ed20688b0ba6dba12d7917
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 11 18:58:20 2018 +0200

    Call drmmode_do_crtc_dpms from drmmode_crtc_dpms as well
    
    Leo pointed out that drmmode_do_crtc_dpms wasn't getting called when
    turning off an output with
    
     xrandr --output <output> --off
    
    This meant that the vblank sequence number and timestamp wouldn't be
    saved before turning off the CRTC in this case.
    
    Reported-by: Leo (Sunpeng) Li <sunpeng.li@amd.com>
    (Ported from amdgpu commit ceeacb455cd058492a493aac954deab8455804b5)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 4050b0ad51b1c65945c6474981d1228888738cd4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 11 18:42:58 2018 +0200

    Replace 'foo == NULL' with '!foo'
    
    Shorter and sweeter. :)
    
    (Ported from amdgpu commit e8e688f3852fb06b0c34ed5bce47c9493bcd1613)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit cf8bc72e3473cef2b511e2c938eb00aca82de909
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 10 18:57:49 2018 +0200

    Wait for pending flips in drmmode_output_set_tear_free
    
    This prevents a nested call to drmHandleEvent, which would hang.
    
    Fixes hangs when disabling TearFree on a CRTC while a DRI3 client is
    page flipping.
    
    (Ported from amdgpu commit 04947b83cce3a7782e59dece2c7797cc396c1e05)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit f01d8cf2bd9681b8f5f0e2eddec0a79614389771
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 10 18:53:54 2018 +0200

    Refactor drmmode_output_set_tear_free helper
    
    Preparation for the following fix, no functional change intended.
    
    (Ported from amdgpu commit fa30f4601de7a44edfb4a95873bd648946fd4292)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit ee7e15746148122abf6728fb0f59d6c8ae329e4e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 10 18:53:06 2018 +0200

    Set drmmode_crtc->scanout_id = 0 when TearFree is disabled
    
    When disabling TearFree, drmmode_crtc->scanout_id could remain as 1,
    but drmmode_set_mode_major would destroy drmmode_crtc->scanout[1], so
    scanout_do_update() would keep bailing, and the scanout buffer would
    stop being updated.
    
    Fixes freeze after disabling TearFree on a CRTC with active RandR
    rotation or other transform.
    
    (Ported from amdgpu commit 7db0c8e9d7586cff4312d4b93684d35de3e6376f)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit e9d2d149481e2a9c7cba50d43c6a5146124be3f2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jul 10 18:52:08 2018 +0200

    Simplify drmmode_handle_transform
    
    Set crtc->driverIsPerformingTransform for any case we can handle before
    calling xf86CrtcRotate. We already clear it afterwards when the latter
    clears crtc->transform_in_use.
    
    This should allow our separate scanout buffer mechanism to be used in
    more cases.
    
    (Cherry picked from amdgpu commit 8e544b4a0de6717feb4abf00052d57c5b726b5ce)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 89d38e976fd6ba6e026cda7c5d05971f1f177f13
[--snip--]
