commit 0d68a91dce88eeacd15bf1159ddc6200a01b1f2e
Author: Alex Deucher <alexander.deucher@amd.com>
Date:   Thu Jul 29 13:20:16 2021 -0400

    Bump version for the 21.0.0 release
    
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

commit aedbf47ffc9459c3654b66d8abf6d4f8515c4815
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Mon Apr 26 15:00:54 2021 +0200

    Include xf86drm.h instead of sarea.h
    
    Fixes build against current xorg-x11-server-devel from Fedora
    34/35/rawhide.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 6ed48634443e15a45f48e3a4ddf91e46041ad38f
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Feb 2 12:45:54 2021 +0100

    Drop dri.h includes
    
    Not needed anymore.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 6234a1b2652f469071c0c9b0d8b0f4a8079efe74
Author: Likun Gao <Likun.Gao@amd.com>
Date:   Fri Oct 30 12:23:20 2020 +0800

    Fix drmmode_crtc_scanout_create logic
    
    If crtc scanout create successfully, the function of
    drmmode_crtc_scanout_create should return TURE.
    This will fix the regression caused by commit: "Make
    drmmode_crtc_scanout_create/destroy static" (442efe73), as it will
    result to some function (such as drmmode_set_scanout_pixmap) go to wrong
    code path and result to NULL pointer.
    Fixes: 442efe73 ("Make drmmode_crtc_scanout_create/destroy static")
    
    Signed-off-by: Likun Gao <Likun.Gao@amd.com>
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>

commit 6bd3dc6bd8af238868154f24a37ff13cc9aa2705
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Aug 28 10:50:50 2020 +0200

    Check for AMDGPU_CREATE_PIXMAP_SCANOUT in amdgpu_glamor_create_pixmap
    
    We must not call glamor_create_pixmap or fbCreatePixmap when it's set.
    
    Closes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/21

commit 2202cdfb0ac79591b6d3a51634e3b9f507970d55
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Jul 10 11:24:02 2020 +0200

    Replace a few more instances of "master"
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 0d1d479ecca424120ae1b0f16f9009aec64e5164
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Jul 10 11:13:21 2020 +0200

    Fix build against ABI_VIDEODRV_VERSION 25.2
    
    Use primary/secondary instead of master/slave where applicable.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 442efe73dd579dc36445a3b232937abbed9d2fbb
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Wed Apr 22 16:47:33 2020 +0200

    Make drmmode_crtc_scanout_create/destroy static
    
    And the latter inline.

commit 99f3c82e940e35642757ccd6dc5267004e1122f6
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Apr 21 19:02:41 2020 +0200

    Drop struct drmmode_scanout altogether in favour of PixmapPtrs

commit cfce4b3e6b05b1be14b7ce716dbfb9a15e7e21f4
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Apr 21 18:48:06 2020 +0200

    Drop bo/width/height members from struct drmmode_scanout
    
    The pixmap is all we really need.

commit 680b9a2976f9eb8010c8160c425c2194fb5429d1
Author: Niclas Zeising <zeising@daemonic.se>
Date:   Wed Apr 15 10:34:32 2020 +0200

    Fix return value check of drmIoctl()
    
    When the drmModeSetCursor2() call was replaced with bare drmIoctl() call in
    b344e155, a bug was introduced.  With the use of drmModeSetCursor2(),
    the return value from drmIoctl() (which calls ioctl()) were mangled, if
    they were negative, they were replaced by -errno by a wrapper function
    in xf86drMode.c in libdrm.  After replacing drmModeSetCursor2() with the
    call to drmIoctl(), this mangling no longer happens, and we need to
    explicitly check if the call to drmIoctl() fails, which is indicated by
    returning -1, and then why it failed, by checking errno.
    If the error indicated by errno is EINVAL, then we can't use the
    DRM_IOCTL_MODE_CURSOR2 ioctl(), and need to fall back to the
    DRM_IOCTL_MODE_CURSOR ioctl().
    
    This bug can manifest itself by an invisible hw cursor on systems where the
    DRM_IOCTL_MODE_CURSOR2 is not implemented by the graphics driver.
    
    Signed-off-by: Niclas Zeising <zeising@daemonic.se>

commit e923642bae6077f71a8f251fe885342757737224
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Fri May 8 11:14:32 2020 +1000

    gitlab CI: update to use the latest CI templates
    
    Repository was moved there from wayland/ci-templates, and let's update to the
    most recent version..
    
    No real functional changes, we're just making use of the various CI template
    bits and bobs now, specifically the FDO_* variables and the
    .fdo.container-build and .fdo.distribution-image templates.
    
    Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>

commit 0732f81a2c67354ddfa7a495bee6b0997c6ef244
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Tue Apr 21 10:54:47 2020 +0200

    glamor: Make pixmap scanout compatible if its dimensions are
    
    Namely, if its dimensions match those of the screen pixmap (enough that
    it could stand in for it). When that's the case, the pixmap may end up
    being scanned out directly due to page flipping via the Present
    extension, e.g. with xfwm4 --vblank=xpresent .
    
    v2:
    * Use AMDGPU_CREATE_PIXMAP_SCANOUT instead of second-guessing in
      amdgpu_alloc_pixmap_bo, fixes corruption when resizing from smaller
      to larger virtual size via RandR.
    
    Closes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/10

commit cb27a5b1120266e4baaa3eb784ff041977ded43f
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Nov 29 16:37:32 2019 +0100

    Handle NULL fb_ptr in pixmap_get_fb
    
    This can happen when HW acceleration is disabled.
    
    Fixes https://gitlab.freedesktop.org/xorg/driver/xf86-video-ati/issues/188
    (ported from radeon commit 4d84cf438e7f1bebf0053035ef0292e9fed257d1)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit e2cd67abb4aa8b5c942b46dd66dac091b9fad7ad
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Mon Mar 16 17:43:54 2020 +0100

    Bail from amdgpu_pixmap_get_handle with ShadowFB
    
    There's no pixmap private in that case. The callers handle this
    gracefully.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 42a3148ae14c6fd0d2e2e9013971188ca721d8f8
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Dec 10 18:53:37 2016 +0000

    Factor out common code to amdgpu_probe()
    
    Keep the distinct pci/platform screen management in the separate probe
    entry point and fold the rest into a single function.
    
    v2: Rebase
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit eeaaf370854b63966f0b5adbd00d2e6809b773c1
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Mar 31 15:00:16 2018 +0100

    Introduce amdgpu_device_setup helper
    
    It folds the device specifics (open fd, device init) into a single
    place.
    
    v2:
     - Rebase
     - Pass pAMDGPUEnt to amdgpu_device_setup (Michel)
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 1c9742e304f4d198628cdc9487049cde472c7285
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Mar 31 14:27:52 2018 +0100

    Kill off drmOpen/Close/drmSetInterfaceVersion in favour of drmDevices
    
    The former has very subtle semantics (see the implementation in libdrm
    for details) which were required in the UMS days.
    
    With drmDevices around, we have enough information to build our
    heuristics and avoid drmOpen all together.
    
    In the odd case drmGetDevices2() can take a few extra cycles, so use a
    reasonably sized local array.
    
    v2:
     - Rebase
     - Rework now that amdgpu_kernel_mode_enabled() is staying
     - Keep amdgpu_bus_id()
     - Use local drmDevice array.
    
    v3:
     - Correct error handling (Michel)
     - Preserve the "am I master" check (Michel)
     - Always initialise the fd variable
    
    v4:
     - Don't print "-1" on drmGetDevices2 failure (Michel)
     - Use uppercase DRM (Michel)
    
    v5:
     - Rebase on top of amdgpu_bus_id() rework
     - Pass both pci and platform dev to amdgpu_kernel_open_fd() (Michel)
     - Indent local_drmIsMaster() with tabs (Michel)
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 2dd730784e632056c75a0fd62b33206b5fc01602
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Tue Jul 16 22:04:57 2019 +0100

    Use the device_id straight from gpu_info
    
    This way we can remove the PciInfo and Chipset from the AMDGPUInfoRec.
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 655b3c55b9a6233091d4dc5d2e80a0373aa3e2d6
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Wed Jul 17 00:04:39 2019 +0100

    Reuse the existing busid string
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit b357a8474074d911d1c03572d4d9db3ee420633a
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Wed Jul 17 00:01:51 2019 +0100

    Store the busid string in AMDGPUEnt
    
    This way we can reuse it, instead of redoing it later on.
    
    v2: Pass the AMDGPUEnt as argument.
    v3: free() the string at AMDGPUFreeRec (Michel)
    v4: Inline amdgpu_bus_id, move at top of mdgpu_kernel_open_fd (Michel)
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> (v3)
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 2c0c154a838060eb683599faf9cbfa3e66dd42c8
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Tue Jul 16 23:39:30 2019 +0100

    Remove NULL check after a "cannot fail" function
    
    XNFasprintf cannot fail - aka busid cannot be NULL.
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 16ae0d06c6711a36c814618e06bf2be53079af81
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Tue Jul 16 23:37:05 2019 +0100

    Fixup the amdgpu_bus_id() string format
    
    The func is a u, instead of a signed int.
    
    v2: Drop the precision - s/1u/u/ (Michel)
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit abbe23fae70b7f3bc7033d7603d331570677d431
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Dec 10 14:30:16 2016 +0000

    Remove drmCheckModesettingSupported and kernel module loading, on Linux
    
    The former of these is a UMS artefact which gives incorrect and
    misleading promise whether KMS is supported. Not to mention that
    AMDGPU is a only KMS driver.
    
    In a similar fashion xf86LoadKernelModule() is a relic of the times,
    where platforms had no scheme of detecting and loading the appropriate
    kernel module.
    
    Notes:
     - Since there is no reply from Robert the code is still around, behind
    a FreeBSD guard.
     - If FreeBSD still needs this they should look and fix it ASAP, as:
       - wayland itself or compositors do _not_ load kernel modules
       - the kernel module should be loaded early to control the clocks/fan,
    hence temperature of the card
    
    v2: Keep the code as FreeBSD only, add 'Notes' in the commit message.
    
    Cc: Robert Millan <rmh@freebsd.org>
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 0b3bc7addf9b5989bfad7c2c31979a15f5ba701d
Author: Emil Velikov <emil.velikov@collabora.com>
Date:   Sat Dec 10 14:28:19 2016 +0000

    Use ODEV_ATTRIB_PATH where possible for the device node.
    
    Use the device node path, if the server knows it.
    
    Note:
    ODEV_ATTRIB_PATH was introduced with xserver 1.13 - the minimum version
    required to build amdgpu. Yet it's defined in xf86platformBus.h. With
    the header included only when XSERVER_PLATFORM_BUS is set.
    
    Keep things obvious and use a ODEV_ATTRIB_PATH guard.
    
    v2: Rebase, add commit message
    
    Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit edcbe5f52ddfceee3d66d69bbcebbceac06b6d0d
Author: Adam Jackson <ajax@redhat.com>
Date:   Tue Feb 4 16:38:06 2020 -0500

    Fix link failure with gcc 10
    
    Without the 'extern' this looks like a definition not just a
    declaration, in every file that includes the header. gcc 10 is stricter
    about this kind of multiple definition.

commit fd66f5c0bea2b7c22a47bfd5eb1f22d32d166d9c
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Oct 30 12:33:09 2019 -0400

    kms: Handle changes to SourceValidate call chain in xserver 19
    
    xserver 19 expects the SourceValidate hook to always be filled in with
    something valid. For earlier servers it's harmless to simply fill this
    in with a do-nothing function instead of NULL.
    
    Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>

commit b467d2569a003da05ad222b0dc095bee5eec450a
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Fri Oct 11 17:10:10 2019 +0200

    Bump version for the 19.1.0 release

commit a1b7263277c033e109629829c370c0e95978e061
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Thu Sep 26 15:56:59 2019 +0200

    Don't unreference FBs of pixmaps from different screens in LeaveVT
    
    FindClientResourcesByType finds pixmaps from all screens, but trying to
    process ones from other screens here makes no sense and likely results
    in a crash or memory corruption.
    
    Fixes: c16ff42f927d ("Make all active CRTCs scan out an all-black
                          framebuffer in LeaveVT")
    (Ported from radeon commit 2faaecc69b127248718e759c6c98c84d56dd1b6b)

commit 5b8bc9fc505c551dcd9b0ed5ab835a49fa4f9fda
Author: Michel Dänzer <mdaenzer@redhat.com>
Date:   Wed Sep 18 12:55:45 2019 +0200

    Don't set up black scanout buffer if LeaveVT is called from CloseScreen
    
    Avoids a crash described in
    https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/merge_requests/43#note_223718
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit e6fce59a071220967fcd4e2c9e4a262c72870761
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 24 16:05:05 2019 +0200

    present: Don't check pixmap pitch in check_flip with non-DC >= 3.34
    
    The current non-DC kernel driver also handles flipping between different
    pitches correctly.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 5bb2580b266468f87843b5585ae64e056b63bb88
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 24 15:55:19 2019 +0200

    present: Don't check pixmap pitch in check_flip with current DC
    
    Current DC handles flipping between different pitches correctly.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit ac66086613cbd0974b421cd5eda872adc15242ed
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jul 24 15:45:21 2019 +0200

    present: Also check pixmap pitch in check_flip with current xserver
    
    The corresponding check in the xserver Present code was removed again,
    because flipping between different pitches can work in some cases.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 98f172eb2d2353e19edd8167f22215ce596811f8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Jul 29 18:54:24 2019 +0200

    gitlab-ci: Use templates from wayland/ci-templates
    
    These are already used by xserver, Mesa and some other projects.
    
    Current Debian testing brings e.g. GCC 8.3.0 and clang 7.0.1.

commit 87f41ace4920fd2069794211683659eb25b025a6
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Jul 5 12:43:53 2019 +0200

    Don't disable page flipping completely with SW cursor
    
    Even with SW cursor, page flipping can be used while no X cursor is
    visible.
    
    Occurred to me in the context of xorg/xserver#828.

commit 7d3fef72e0c871e1677e9e544f4cae5e238b5c52
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu May 9 17:39:49 2019 +0200

    present: Check that we can get a KMS FB for flipping
    
    This can legitimately fail if the pixmap's storage is shared from
    another device, e.g. when using PRIME render offloading.

commit ea19a5207054bb159fc7fb6d88e0ceb10c3da010
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jun 6 11:02:15 2019 +0200

    Remove dri2_drawable_crtc parameter consider_disabled
    
    All callers were passing TRUE.
    
    Reviewed-and-tested-by: Flora Cui <flora.cui@amd.com>

commit 3109f088fdbd89c2ee8078625d4f073852492656
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jun 6 11:22:09 2019 +0200

    dri2: Re-use previous CRTC when possible if pick_best_crtc returns NULL
    
    This way, the MSC will continue ticking at the rate of (the last mode
    which was enabled for) that CRTC, instead of the client running
    unthrottled.
    
    Reviewed-and-tested-by: Flora Cui <flora.cui@amd.com>

commit fb06fb814700a47464abd756e1111dcc76d0d776
Author: Flora Cui <flora.cui@amd.com>
Date:   Wed May 29 14:18:50 2019 +0800

    dri2: reply to client for WaitMSC request in any case
    
    otherwise client would wait for reply forever and desktop appears hang.
    
    Signed-off-by: Flora Cui <flora.cui@amd.com>
    Acked-by: Feifei Xu <Feifei.Xu@amd.com>
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>

commit 4b17533fcb30842caf0035ba593b7d986520cc85
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Apr 30 17:50:15 2019 +0200

    dri3: Always flush glamor before sharing pixmap storage with clients
    
    Even if glamor_gbm_bo_from_pixmap / glamor_fd_from_pixmap themselves
    don't trigger any drawing, there could already be unflushed drawing to
    the pixmap whose storage we share with a client.

commit bf61e6d7ac1a5754b1026d7f80acf25ef622c491
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Apr 18 19:21:40 2019 +0200

    Retry get_fb_ptr in get_fb
    
    If get_fb_ptr returns NULL, try again after pixmap_get_handle, it should
    work then.
    
    Fixes spurious Present page flipping failures using "normal" pixmaps
    which aren't shared with direct rendering clients, e.g. with a
    compositor using the RENDER extension.
    
    Bugzilla: https://bugs.freedesktop.org/110417
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit bd4ffd4ebbdf1c43ab9e1ef9ba8b812fd2dde4a4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Mar 19 18:44:31 2019 +0100

    Bump version for the 19.0.1 release

commit 6ee857726166f495abcd68e4ff60e3a09593d079
Author: Dave Airlie <airlied@redhat.com>
Date:   Mon Mar 23 11:33:23 2015 +1000

    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)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 9534bf3bb33d14cd3a5af08e36ef42b309647fc7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Mar 6 12:05:14 2019 +0100

    Bump version for the 19.0.0 release

commit a2b32e72fdaff3007a79b84929997d8176c2d512
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 1 17:42:08 2019 +0100

    present: Don't check tiling parameters with DC & DRM minor version >= 31
    
    Current DC handles any changes of tiling parameters for flips.
    
    v2:
    * Just check all tiling bits if DRM minor < 31 or DC is disabled.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 2798244be78df3ef3a7841597577506bfbe50156
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 1 17:47:24 2019 +0100

    Make drmmode_cm_enabled an inline function
    
    So that it can be used outside of drmmode_display.c as well.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 72653455e4f652ca6c7c290c7f1e8a889b77f5ce
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Mar 1 17:35:48 2019 +0100

    Revert "Remove set but unused amdgpu_dri2::pKernelDRMVersion"
    
    This reverts commit 720a61000aeb139005bd8125908cec66a6e69554.
    
    We're going to make use of it now.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 28cd209ebf20561e65d14fa2e8bbfaedf6965948
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Feb 27 17:35:26 2019 +0100

    Revert "gitlab-ci: Only run docker-image stage if relevant source files change"
    
    This reverts commit 9c23076b9e81c36ac2408c491f9b2d546829ee8e.
    
    Some scenarios have come to light where this failed to ensure the docker
    image exists:
    
    * If the master branch of a forked repository is used for an MR which
      doesn't modify .gitlab-ci.yml, the docker-image job may not run.
    * If the docker-image job of the first pipeline in a forked repository
      is cancelled or fails for any reason, and .gitlab-ci.yml isn't
      modified for the next pipeline run.

commit 09be74a3d1dd9604336d9a27f98d132b262dcbaf
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 28 17:31:55 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: 739181c8d3334 "Add amdgpu_drm_handle_event wrapper for
                          drmHandleEvent"
    Reviewed-by: Aaron Liu <aaron.liu@amd.com>
    Tested-by: Aaron Liu <aaron.liu@amd.com>

commit a636f42b496b0604ca00a144690ece61d1a88a27
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Feb 27 18:43:27 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.
    
    Tested-by: Jax Lin <jax.lin@amd.com>

commit bd090f389f19f1f4a3f662ffdd891345a3899539
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 12 17:57:17 2019 +0100

    Call amdgpu_present_set_screen_vrr from amdgpu_vrr_property_update
    
    If the window is currently flipping.
    
    This might make a difference when the property gets disabled: Variable
    refresh will now be disabled immediately in that case, instead of only
    when the window can no longer use page flipping at all.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit d9be5d712d469595e1e610f7294bc670ca3b1985
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 12 12:26:25 2019 +0100

    Make use of property request wrappers for VRR property
    
    Instead of scanning for PropertyNotify events. Reasons:
    
    * Works even if no client listens to PropertyNotify events for the
      window.
    * No overhead on delivery of unrelated events, and no overhead at all
      if Option "VariableRefresh" is disabled.
    
    v2:
    * Use shorter variable name amdgpu_vrr_atom.
    * Call MakeAtom regardless of info->instance_id, for robustness vs VRR
      being enabled in some but not all AMDGPU screens.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit ef8fbe33b7d97f7fb5518db9c0e4d2dcbf2fab6f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jan 17 18:41:11 2019 +0100

    Wrap change/delete window property request handlers
    
    Preparation for the following change.
    
    v2:
    * Add comments explaining what the wrappers are wrapping.
    * Use global amdgpu_property_vectors_wrapped to keep track of whether
      the vectors need to be (un)wrapped, for robustness against VRR being
      enabled in some but not all AMDGPU screens.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 09a45ff8fe3ac07bafa3a0822b1598c41f9ca200
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 12 13:01:04 2019 +0100

    Don't enable the VRR support code for GPU screens
    
    Windows aren't associated with GPU screens, and amdgpu_present_flip is
    never called for them, so VRR can never actually be enabled for them.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 2a3d00dc7ed2b4fca698e2d699e1b94da6d0ddb8
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Feb 12 18:12:23 2019 +0100

    Don't register a window private if VRR is disabled
    
    It's not used in that case.
    
    Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>

commit 5f91be77e059d0c4a4268ec10cbd9aa1052f53eb
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Feb 11 18:32:07 2019 +0100

    gitlab-ci: Don't rely on $CI_PROJECT_NAME
    
    The name of a forked repository can be changed later, in which case this
    would fail to refer to the main repository.
    
    Pointed out by Eric Engestrom in
    https://gitlab.freedesktop.org/mesa/mesa/merge_requests/224 .

commit 9c23076b9e81c36ac2408c491f9b2d546829ee8e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Feb 7 17:35:13 2019 +0100

    gitlab-ci: Only run docker-image stage if relevant source files change
    
    Otherwise there's normally no need to run it. It will also run when a
    new branch is created, which ensures that the docker image always exists
    (e.g. in a newly forked repository).
    
    Inspired by https://gitlab.freedesktop.org/mesa/mesa/merge_requests/143

commit 9045fb310f88780e250e60b80431ca153330e61b
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jan 24 18:31:40 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.
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit 3ff2cc225f6bc08364ee007fa54e9d0150adaf11
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 22 18:36:56 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.
    
    v2:
    * Use ErrorF instead of xf86DrvMsg with hard-coded screen 0.
    
    Bugzilla: https://bugs.freedesktop.org/109364
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1

commit e72a02ba1d35743fefd939458b9d8cddce86e7f5
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 16 10:26:59 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) AMDGPU(0): flip queue failed: Device or resource busy
     (WW) AMDGPU(0): Page flip failed: Device or resource busy
     (EE) AMDGPU(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 .
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit a1b479c7d0066c481af920f297d6af9009dda11e
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Jan 15 17:55:27 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 .
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit bf326f2ea19daa6c8da23d6788ff301ae70b8e69
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jan 10 18:33:04 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.
    
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit ebd32b1c07208f8dbe853e089f5e4b7c6a7a658a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 9 18:57:08 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
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d168532ee739f7e33a2798051e64ba445dd3859f
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Wed Jan 9 17:24:11 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
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 2058c4c469b172d4a3b0443f75466d84281a64c7
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jan 10 17:03:04 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
    (Ported from radeon commit b1c01698f577577e4a88bad0ae08fb5d998e7ebb)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f3c0939a0cbb93c367ece3d41dc69824f585af42
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Jan 10 17:00:12 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).
    (Ported from radeon commit 38db1bbcfc019c92884c7819a6630c70e543f6b2)
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit f3ddda618ec86650ed85f8b140a5db1394676748
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Mon Dec 17 17:54:05 2018 +0100

    gitlab-ci: Use kaniko instead of docker-in-docker for image generation
    
    kaniko can also work in unprivileged runners.
    
    Based on v2 of
    https://gitlab.freedesktop.org/xorg/xserver/merge_requests/92 .
    Acked-by: Alex Deucher <alexander.deucher@amd.com>

commit b689dc5081493377a31759d24a8dc9fcde12948a
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Dec 18 16:39:28 2018 +0100

    Remove superfluous vrr_flipping field and clean up related code
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit 233a0be82d5c317e58002f4daf836d4f95048465
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Tue Dec 18 16:42:53 2018 +0100

    Don't clear info->flip_window in present_unflip
    
    present_unflip can get called between present_check_flip and
    present_flip, in which case the latter would pass a NULL WindowPtr to
    the former, resulting in a crash.
    
    present_flip should never get called for a window which has already been
    destroyed, so there's no need to clear info->flip_window.
    
    Bugzilla: https://bugs.freedesktop.org/109067
    Fixes: 2d18b37159edc "Check last flip window instead of screen root
                          before flipping"
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit d4eab5d108c4569f3a9e2892704ea89b7ee797b6
Author: Mario Kleiner <mario.kleiner.de@gmail.com>
Date:   Wed Dec 19 07:56:15 2018 +0100

    Fix crash when page flipping in multi-X-Screen/Zaphod mode
    
    amdgpu_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: 9b6782c821e0 "Store FB for each CRTC in drmmode_flipdata_rec"
    (Ported from radeon commit 0058fd2ebf4c900b12f129984e98886a7ac84b2f)
    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
    Signed-off-by: Mario Kleiner <mario.kleiner.de@gmail.com>

commit 0d60233d26ec70d4e1faa343b438e33829c6d5e4
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Thu Nov 22 19:02:20 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
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit b04697de5270e8e45744a7025c24df1f454a4cf0
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Nov 23 18:41:00 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.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

commit b344e1559e936046ef02c777fc4f6bcefa3830bc
Author: Michel Dänzer <michel.daenzer@amd.com>
Date:   Fri Nov 23 18:22:25 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.
    
    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
