commit 9f37a44473ded8c669897379acbc750362c15ec6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 15 16:34:19 2018 +0100

    Bump version for 18.0.1 release

commit 8af989546907ad9fb491d940e1936d3bfc89276b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Mar 8 18:48:28 2018 +0100

    Pass extents to amdgpu_scanout_do_update by value
    
    amdgpu_scanout_extents_intersect could leave the scanout damage region
    in an invalid state, triggering debugging checks in pixman:
    
    *** BUG ***
    In pixman_region_append_non_o: The expression r->x1 < r->x2 was false
    Set a breakpoint on '_pixman_log_error' to debug

commit 29649652a08ece7e07741be161b067a4484455ca
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 7 17:51:25 2018 +0100

    Wrap the whole miPointerScreenFuncRec, instead of only Set/MoveCursor
    
    We were clobbering entries in mi's global miSpritePointerFuncs struct,
    which cannot work correctly with multiple primary screens. Instead,
    assign a pointer to our own wrapper struct to PointPriv->spriteFuncs.
    
    Fixes crashes with multiple primary screens.
    
    Fixes: 69e20839bfeb ("Keep track of how many SW cursors are visible on
                          each screen")
    Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>

commit b4a28bdcfa7089e1cf708490ddf048b7df4c7eed
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 6 17:59:26 2018 +0100

    Only change Set/MoveCursor hooks from what we expect
    
    Since xf86CursorCloseScreen runs after AMDGPUCloseScreen_KMS,
    PointPriv->spriteFuncs doesn't point to the same struct in the latter as
    in AMDGPUCursorInit_KMS. So we were restoring info->Set/MoveCursor to
    the wrong struct. Then in the next server generation,
    info->Set/MoveCursor would end up pointing to
    drmmode_sprite_set/move_cursor, resulting in an infinite loop if one of
    them was called.
    
    To avoid this, only change the Set/MoveCursor hooks if their values
    match our expectations, otherwise leave them as is. This is kind of a
    hack, but the alternative would be invasive and thus risky changes to
    the way we're wrapping CloseScreen, and it's not even clear that can
    work without changing xserver code.
    
    Fixes: 69e20839bfeb ("Keep track of how many SW cursors are visible on
                          each screen")
    (Ported from radeon commit 504b8721b17a672caf1ed3eab087027c02458cab)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 5cfba7b6221779832be915993765cb128a561087
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 2 18:10:40 2018 +0100

    Bump version for 18.0.0 release

commit 374cb8fef4fdbb648af089ee80803ec78321f1b2
Author: Keith Packard <keithp@keithp.com>
Date:   Thu Dec 21 18:54:34 2017 -0800

    modesetting: Update property values at detect and uevent time
    
    We were updating the link-status property when a uevent came in, but
    we also want to update the non-desktop property, and potentially
    others as well. We also want to check at detect time in case we don't
    get a hotplug event.
    
    This patch updates every property provided by the kernel, sending
    changes to DIX so it can track things as well.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>
    
    (Ported from xserver commit a12485ed846b852ca14d17d1e58c8b0f2399e577,
     slightly modifying logic to reduce indentation depth)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 10054b6c3d9a755b30abb43020121b9631fa296d
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Mon Nov 20 10:47:41 2017 +0100

    modesetting: Reset output_id if drmModeGetConnector failed
    
    If drmModeGetConnector() fails in drmmode_output_detect(), we have to
    reset the output_id to -1 too.
    
    Yet another spot leading to a potential NULL dereference when handling
    the mode_output member as output_id was != -1. Though, this case should
    be very hard to hit.
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
    
    (Ported from xserver commit 6804875662363764683a86c1614e4cf3cc70a20a)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit fb58e06acd6c6bd59de2dbdadbca27eb1dd0025b
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Mon Oct 23 10:31:21 2017 +0200

    modesetting: Use helper to fetch drmModeProperty(Blob)s
    
    Replace the various loops to lookup drmModeProperty(Blob)s by
    introducing helper functions.
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
    
    (Ported from xserver commit f44935cdb7321af242ce9f242975f096807b97f7)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 7854ace03f12207600ec8159ef8b2c5a562c4aee
Author: Christoph Haag <haagch@frickel.club>
Date:   Thu Mar 1 15:07:00 2018 +0100

    fix include order for present.h configure test
    
    xorg-server.h defines _XSERVER64 which is used in X.h to choose the
    correct definition of XID
    
    this prevents a failure in the present.h configure test that disables
    DRI3 on X.Org 1.20
    
    Reviewed-and-Tested-by: Michel Dänzer <michel.daenzer@amd.com>

commit e3aae7a24296f640c0153d1459f3e0820485468a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Feb 16 17:15:24 2018 +0100

    Disable all unused CRTCs before setting desired modes
    
    This might avoid modeset failures in some cases where a CRTC which isn't
    used by Xorg was enabled before.

commit f5ac5f385f41d1547cfd7ccc8bb35a537a8fffeb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 15 18:37:09 2018 +0100

    Don't bail from drmmode_set_desired_modes immediately
    
    If we fail to find or set the mode for a CRTC, keep trying for the
    remaining CRTCs, and only return FALSE if we failed for all CRTCs that
    should be on.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
    Acked-by: Harry Wentland <harry.wentland@amd.com>

commit 37c7260bdef3a53b0f0295a531f33938e9aad8cf
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Feb 14 19:06:33 2018 +0100

    If glamor is too old for depth 30, fall back to ShadowFB
    
    Instead of not starting up at all.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 63b0c73a99fdf0eb7550a88df3a0052ce784e758
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Feb 14 18:50:18 2018 +0100

    Revert "Guard against pAMDGPUEnt == NULL in AMDGPUFreeRec"
    
    This reverts commit a23d1ff700d486138c624c2023d8d251c73709af.
    
    pAMDGPUEnt cannot be NULL anymore here now that we no longer call
    AMDGPUFreeRec directly from AMDGPUPreInit_KMS.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 103b7285845b786929fb509083c57e074c48f9be
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 13 19:11:00 2018 +0100

    Don't call AMDGPUFreeRec from AMDGPUPreInit_KMS
    
    If the latter fails, Xorg will call AMDGPUFreeScreen_KMS, which calls
    the former.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit a23d1ff700d486138c624c2023d8d251c73709af
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 13 18:57:48 2018 +0100

    Guard against pAMDGPUEnt == NULL in AMDGPUFreeRec
    
    This can happen if PreInit fails early.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit b3095710b7c240ddefce794033a77033806f639d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 13 18:26:06 2018 +0100

    Always use screen depth/bpp for KMS framebuffers
    
    DRI clients can use depth 32 pixmaps while the screen is depth 24, in
    which case page flipping would fail.
    
    Reported-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    (Ported from radeon commit 733f606dd6ca8350e6e7f0858bfff5454ddc98ed)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 6aee5770fb913713bb1b9a1af8f0d0892a66f21a
Author: Hawking Zhang <Hawking.Zhang@amd.com>
Date:   Sat Jul 16 00:09:21 2016 +0800

    Add 30bit RGB color format support
    
    Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
    
    [ Michel Dänzer:
    * Require Xorg >= 1.19.99.1 for depth 30, otherwise it can't work with glamor
    * Update manpage, per radeon commit
      574bfab4bf1fcd95163a8f33cea2889189429d30 ]
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit ec397f7d3bfc89a5d8b8429c96e1b9572f6ee47d
Author: Qiang Yu <Qiang.Yu@amd.com>
Date:   Thu Nov 2 14:00:23 2017 +0800

    Disable gamma set when deep color
    
    gamma set is disabled in kernel driver when deep color.
    Enable it will confuse the user.
    
    Signed-off-by: Qiang Yu <Qiang.Yu@amd.com>
    
    [ Michel Dänzer: Align drmmode_pre_init change with radeon commit
      1f1d4b1fa7d4b22dd8553f7e71251bf17ca7a7b1 ]
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit c849081e24377a81afc1a05f2a5634b1e60c67db
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Mon Feb 12 18:18:46 2018 +0100

    Define per x-screen individual drmmode_crtc_funcs
    
    This allows to en-/disable some functions depending on individual screen
    settings.
    
    Prep work for more efficient depth 30 support.
    
    Suggested-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>
    (Ported from radeon commit 21f6753462464acfd3c452393328c977a375ce26)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 348023cea43e0474352df0c2aa6345eb0b25c2f7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jan 22 18:23:18 2018 +0100

    Fix linear check in amdgpu_glamor_share_pixmap_backing
    
    We were incorrectly interpreting the tiling information.
    
    Reported-by: Marek Olšák <marek.olsak@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>
    Reviewed-by: Marek Olšák <marek.olsak@amd.com>

commit 69e20839bfeb3ee0b0a732d72de0a32d6c5435fc
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 22 18:33:58 2017 +0100

    Keep track of how many SW cursors are visible on each screen
    
    And use this to determine when we cannot use page flipping for DRI
    clients. We previously did this based on whether the HW cursor cannot
    be used on at least one CRTC, which had at least two issues:
    
    * Even while the HW cursor cannot be used, no SW cursor may actually be
      visible (e.g. because all cursors are disabled), in which case we can
      use page flipping for DRI clients anyway
    * Even while the HW cursor can be used, there may be SW cursors visible
      from non-core pointer devices, in which case we cannot use page
      flipping for DRI clients anyway
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit dfccaa7043ccb157a1f8be7313123792bb7e7001
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Dec 22 17:09:07 2017 +0100

    Move cursor related ScreenInit calls into AMDGPUCursorInit_KMS
    
    And bail if xf86_cursors_init fails.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 1d65ac395971571094df21ca0408d5972c6b56ec
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Nov 15 18:22:27 2017 +0100

    Add amdgpu_dirty_src_drawable helper
    
    Allows tidying up amdgpu_dirty_src_equals and redisplay_dirty slightly.
    
    v2:
    * Different approach for amdgpu_dirty_master
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 3a4f7422913093ed9e26b73ecd7f9e773478cb1e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Nov 8 18:44:25 2017 +0100

    Use correct ScrnInfoPtr in redisplay_dirty
    
    We used the destination pixmap's screen for flushing glamor. But when
    we are the master screen, the destination pixmap is from the slave
    screen.
    
    Fixes crash when the slave screen isn't using glamor as well.
    
    Bugzilla: https://bugs.freedesktop.org/103613
    Fixes: e15b23663cd1 ("Adapt to PixmapDirtyUpdateRec::src being a
                         DrawablePtr")
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 875339c1064f666a2391b4a5a495eddda9407ab6
Author: Daniel Martin <consume.noise@gmail.com>
Date:   Fri Oct 20 10:05:35 2017 +0200

    modesetting: Check crtc before searching link-status property
    
    No need to lookup the link-status property if we don't have a crtc.
    
    Signed-off-by: Daniel Martin <consume.noise@gmail.com>
    (Ported from xserver commit 8d7f7e24261e68459e6f0a865e243473f65fe7ad)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 91cd0ceab2cabba75e3552d0fbfcfc55f6d132ee
Author: Keith Packard <keithp@keithp.com>
Date:   Mon Sep 25 16:18:22 2017 -0700

    modesetting: Skip no-longer-present connectors when resetting BAD links
    
    Outputs may have NULL mode_output (connector) pointers if the
    connector disappears while the server is running. Skip these when
    resetting outputs with BAD link status.
    
    (Ported from xserver commit 37f4e7651a2fd51efa613a08a1e705553be33e76)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f6b39bcd45cb06976ba8a3600df77fc471c63995
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 19 18:02:05 2017 +0200

    Always call drmModeFreeProperty after drmModeGetProperty
    
    We were not doing so in all cases, leaking memory allocated by the
    latter.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 84aad09f18fed6b52b0c073f0bbd675a6de07807
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 19 17:54:13 2017 +0200

    Call TimerFree for timer created in LeaveVT
    
    We were leaking the memory allocated by TimerSet.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit cfccf4c4e7e5c73fe4040fabeb1b43283cf29b33
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 19 17:41:44 2017 +0200

    Free memory returned by xf86GetEntityInfo
    
    We were leaking it.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 9d84934309e4ccd9a43c73d958b8ff10ef2fc990
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 19 17:28:53 2017 +0200

    Free pAMDGPUEnt memory in AMDGPUFreeRec
    
    We were freeing it earlier but then still trying to access it in
    AMDGPUFreeRec.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit b67a2b62b20c17db7471f5bbea591ab55806cb29
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 19 16:46:35 2017 +0200

    Bail if there's a problem with ShadowFB
    
    If we hit a problem while setting up ShadowFB, just carrying on trying
    to set up HW acceleration instead is unlikely to work.
    
    (Ported from radeon commit 7d435354099119234d443b07e2df1c7b9f97cf3c)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 55396cc45c9aae3b1985ced1044b6b93064667c3
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 19 16:20:03 2017 +0200

    Fix VT switching with ShadowFB
    
    We were trying to call acceleration specific functions from LeaveVT.
    Instead, memset the scanout buffer to all 0 in LeaveVT and allocate a
    new one in EnterVT.
    
    Bugzilla: https://bugs.freedesktop.org/102948
    Fixes: c16ff42f927d ("Make all active CRTCs scan out an all-black
                          framebuffer in LeaveVT")
    (Ported from radeon commit 34da04daec82077571558ac3fe1ec0c1203a01ad)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2f72be038d22c54620e436af30121dd89f79a003
Author: Darren Salt <devspam@moreofthesa.me.uk>
Date:   Wed Sep 13 03:22:19 2017 +0100

    Clarify when TearFree is automatically enabled.
    
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

commit 2ce59dfa1c57655137fcc7ccdf15a341e51383ff
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Oct 5 11:15:34 2017 +0200

    Post-release version bump

commit cf1767a9a58a3ec95622a7b8ca661113e2148da9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Sep 8 16:19:48 2017 +0900

    Bump version for 1.4.0 release

commit 114de91e3548cd30b709b19f1447f597e71175e0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Aug 31 17:59:08 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.
    
    (Ported from radeon commit 5cdd334b3402c2431deb3a87a8d04ef590da53ee)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 456e5841233a8a79c23ad13649bbdaf8428b50f3
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 30 17:17:49 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: c16ff42f927d ("Make all active CRTCs scan out an all-black
                          framebuffer in LeaveVT")
    (Ported from radeon commit 9d9c565c84601f4c6c73ad769f86491088683f7a)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 639076efb06cdf13a211a8df1acb00c3908992b9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 17:24:18 2017 +0900

    Remove drmmode_scanout_free
    
    Not used anymore.
    
    (Cherry picked from radeon commit e4a3df19d588a4310fcb889ef34e205d0e92e4d7)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit c16ff42f927df805619a5255bc383841474daff8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 17:06:58 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: b09fde0d81e0 ("Use reference counting for tracking KMS
                          framebuffer lifetimes")
    (Ported from radeon commit 06a465484101f21e99d3a0a62fb03440bcaff93e)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 19672625df0531c12acc05999ea09ea763e5db59
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 17:05:19 2017 +0900

    Create amdgpu_master_screen helper
    
    Preparatory, no functional change intended yet.
    
    (Ported from radeon commit 7f0cd68d1b0c132e32ae736371bce3e12ed33c7a)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 6b376c8d73b20c92755527edb0527a233886e4eb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 16:56:56 2017 +0900

    Create amdgpu_pixmap_get_fb_ptr helper
    
    Preparatory, no functional change intended yet.
    
    Also inline amdgpu_pixmap_create_fb into amdgpu_pixmap_get_fb, since
    there's only one call-site.
    
    (Ported from radeon commit 20f6b56fdb74d88086e8e094013fedbb14e50a24)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 5af396253f6a03fa3f8f92e81da231dd581b50c9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 16:54:10 2017 +0900

    Create drmmode_set_mode helper
    
    Preparatory, no functional change intended yet.
    
    (Ported from radeon commit 4bc992c31059eb50e22df4ebf5b92d08411f41ef)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 1afd4a526c97e77ec882988e35d4977880b9d16c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 29 16:46:33 2017 +0900

    Create amdgpu_pixmap_clear helper
    
    Preparatory, no functional change intended yet.
    
    (Ported from radeon commit 3f6210ca2c8ef60d59efc8139151d3b9838bb875)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 0de05767adb79d417284dae83e9a77857633fd80
Author: Martin Peres <martin.peres@linux.intel.com>
Date:   Tue Aug 22 18:43:24 2017 +0900

    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 ]
    (Ported from radeon commit 0472a605e0ec8fec1892bbc3a84698b7ef9c5296)
    Acked-by: Harry Wentland <harry.wentland@amd.com>
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit a2ee5c36c7d4fdcd067fdc1ef424be474f1ad2cb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 17:24:45 2017 +0900

    Make amdgpu_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.
    
    (Ported from radeon commit d822a0f47070374ad0c1a97b559bae27724dc52a)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 828fb44cf953f78bd65d8f391bdabe2b1b3d53ae
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 17:22:12 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 amdgpu_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.
    
    (Ported from radeon commit 3e24770b1b472fc15df56d06f5f04778c9db63dd)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 22740f86d028cdd0f556543df7444516a86f923b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 17:15:54 2017 +0900

    Consolidate amdgpu_scanout_flip_abort/handler helpers
    
    While at it, make them use crtc->driver_private.
    
    (Ported from radeon commit 36ce7920136c0d723c9397a84e7dd5926a9c7943)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2692508ae8920ce62f488a9384444c1645964913
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 17:12:15 2017 +0900

    Always allow DRI2 page flipping with TearFree
    
    Even if TearFree is enabled for the CRTC we're synchronizing to.
    
    (Ported from radeon commit d314cbfb228bb4b8762714f98d0c114a8ee3f061)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 8c82878c6ef1b984ba289383dc17152192c916ee
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 16:57:13 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.
    
    (Ported from radeon commit 4445765af5b97d0cfd10889fe6d6f58f2ce85659)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d8e8f0107bb3e83a787917f4db16a7a54ce4768b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 16:46:18 2017 +0900

    Pass extents to amdgpu_scanout_do_update
    
    Preparation for following change, no functional change intended yet.
    
    (Ported from radeon commit 65e0c5ea1b4adff21d673dbf54af99704c429627)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit cc1dfb88eb6714fcdcb9b576a70f400a5d0d58ca
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 16:34:50 2017 +0900

    Add source drawable parameter to amdgpu_scanout_do_update
    
    Preparation for following changes, no functional change intended yet.
    
    (Ported from radeon commit 1443270e52e8562bd8dc3603f301963bd4027cef)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit b82d1b6063a36facc9cdd0e0189fdb6932be94e2
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 16:23:39 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.
    
    (Ported from radeon commit 7c10ee9c88378d773c0bcf651fdc5d9f2c6dc5e5)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2cbe7f2dff5eef159486f875b3ec67516c85862d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 16:13:17 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.
    
    (Ported from radeon commit e6d7dc2070f4d21a6900916bb70a31839112882c)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit e8d0bfab276d47338c337955b9d2fcbff3af225f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 16:11:41 2017 +0900

    Create drmmode_crtc_wait_pending_event helper macro
    
    Preparation for following change, no functional change intended yet.
    
    (Ported from radeon commit f87acdbfb1b0b6d2769764772a52ea8b81675e20)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit fd5b78b7edff2021111bca37642b8b508f0c3328
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 15:12:35 2017 +0900

    Create drmmode_wait_vblank helper
    
    Allows cleaning up the code considerably.
    
    (Ported from radeon commit 99f1d7a474af3683fe1a66f50c0bb8935478ff0a)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 24b2718992e4bbc859c07e5b29b571f53314045d
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 15:03:52 2017 +0900

    Pass reference CRTC to amdgpu_do_pageflip directly
    
    Simplifies the code slightly.
    
    (Ported from radeon commit 49cc61ab970ee28d4509b4e2dd0a57165136889f)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 87a1f577f1de62f6b628bbe221cd8d551531e708
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Aug 18 14:56:10 2017 +0900

    Remove drmmode_crtc->scanout_destroy[] array
    
    No longer necessary since we're reference counting framebuffers.
    
    (Ported from radeon commit 3f120fa1d5d921656a367751bc079e020e9ab105)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit e15b23663cd1a6f85394253b3fb566b55828b1c5
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Apr 18 18:21:24 2017 +0900

    Adapt to PixmapDirtyUpdateRec::src being a DrawablePtr

commit 9caa9dd9cc5eb9882c4bb85275bc318948dab71f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 2 19:07:40 2017 +0900

    Allow DRI page flipping when some CRTCs use separate scanout buffers
    
    As long as the CRTC we're synchronizing to doesn't.
    
    (Ported from radeon commit 5309bde0c4e28adf2b167191c6d7011a19e31eed)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 4441c7c6dde2d71bd44c3031c5679ee3186ea8f9
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Aug 1 17:29:16 2017 +0900

    Add drmmode_crtc_can_flip helper
    
    To reduce code duplication between DRI2 and Present. No functional
    change intended yet.
    
    (Ported from radeon commit 9bc3eef74452d924f9101c024f66ad9b14c404c8)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 3e08409344a2fd504429522507592f98555bec05
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Aug 2 19:03:40 2017 +0900

    Use root window (pixmap) instead of screen pixmap for scanout updates
    
    Preparation for following changes, no functional change intended yet.
    
    (Ported from radeon commit c2d26890691ec105858f086b63170ad94c6f7f05)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 35106fc0a948957cbb7e1e9649c89993a3d5c95c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 27 15:22:02 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: ba2aa0a8c12a ("Handle rotation in the driver also with Xorg
                          1.12-1.18")
    (Cherry picked from radeon commit 7d7abf99b5441ddb04dbee99bc8fa7abc30d4c46)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit a47c0093338d80d84e7033ad15d051925d542ca0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 26 16:46:14 2017 +0900

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

commit 842bad4b951296ca25f47b50cb358e502bf30ebb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 26 16:44:00 2017 +0900

    Makefile.am: Set ACLOCAL_AMFLAGS = -I m4
    
    Suggested by one of the tools called by autoreconf.
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 227b399badaad9bbef0be5a776ce008d0d243449
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 26 16:42:58 2017 +0900

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

commit 4d36306bcebb8548455a21eae6a7216a9439d9e4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 13 17:40:58 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
    (Ported from radeon commit 94dc2b80f3ef0b2c17c20501d824fb0447d52e7a)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 88147c1a532a9275eb57e14d8c11be41bf4c1fe1
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jul 13 17:35:55 2017 +0900

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

commit e90721ba654d70db5eeb1cf552308c73151530ee
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jun 27 18:13:05 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: b10ecdbd89b0 ("Use drmmode_crtc_scanout_* helpers for RandR 1.4
                          scanout pixmaps")
    (Ported from radeon commit c9dd28cb0c9c3de676eadac61e727732510f6b9b)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 1b6ff5fd9933c00ec1ec90dfc62e0b531927749b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jun 22 16:27:32 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).
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit af7221e1c4d2dbdfd488eb0976a835584ea8441c
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jun 21 19:01:54 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.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 184d50e008b9b31f4dda1425e255af068b6ab068
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Jun 13 09:36:21 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 bbdac40e2af472d37aa0f4f26df77a0b1b12a830
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jun 8 10:46:26 2017 +0900

    Improve AMDGPUPreInitAccel_KMS log messages
    
    Now it should always be clear in the log file why acceleration isn't
    enabled.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit b09fde0d81e07fbe96139289098b4d4b9f5e3c35
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu May 11 19:04:11 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
    
    (Ported from radeon commit 55e513b978b2afc52b7cafc5bfcb0d1dc78d75f6)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 000e5eaeb20607508c5c5371654615a30a8a1b0b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed May 24 10:12:55 2017 +0900

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

commit 2ea2d4d827f086098be198f110ca822ed2c290cd
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri May 12 19:01:18 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.
    
    (Ported from radeon commit 7dc68e26755466f9056f8c72195ab8690660693d)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 8cb41b962eb06b9cb1b3a573a4087e4d89f733fb
Author: Eric Anholt <eric@anholt.net>
Date:   Wed May 17 16:11:52 2017 +0900

    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>
    (Ported from radeon commit 2b7d77b90108911777a11ecaa63435552000c958)

commit e900e48a11a93cde7d8d2d7bdb4a15ec705c56b1
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed May 10 18:37:56 2017 +0900

    Don't enable DRI3 without glamor
    
    Can't work currently. Fixes crash when trying to run a DRI3 client when
    glamor isn't enabled.
    
    Bugzilla: https://bugs.freedesktop.org/100968
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 462ac3341e5bfbded9086d3d9043821d19352b3e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue May 2 17:58:55 2017 +0900

    Remove unused struct members from drmmode_display.h
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

