[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-amdgpu: Changes to 'debian-unstable'



 ChangeLog                    |  644 +++++++++++++++++++++++++++++++++++++
 Makefile.am                  |    2 
 README                       |   14 
 autogen.sh                   |    2 
 configure.ac                 |   15 
 debian/changelog             |    7 
 debian/control               |    2 
 man/amdgpu.man               |   12 
 src/Makefile.am              |    1 
 src/amdgpu_bo_helper.c       |   32 +
 src/amdgpu_bo_helper.h       |    2 
 src/amdgpu_dri2.c            |  183 ++--------
 src/amdgpu_drm_queue.c       |    5 
 src/amdgpu_drv.h             |   50 ++
 src/amdgpu_glamor.c          |   16 
 src/amdgpu_glamor.h          |    4 
 src/amdgpu_glamor_wrappers.c |    4 
 src/amdgpu_kms.c             |  448 ++++++++++++++++----------
 src/amdgpu_list.h            |   40 --
 src/amdgpu_pixmap.h          |   66 +++
 src/amdgpu_present.c         |  119 ++++---
 src/amdgpu_probe.h           |   14 
 src/amdgpu_video.c           |    2 
 src/compat-api.h             |   70 ----
 src/drmmode_display.c        |  729 +++++++++++++++++++++++--------------------
 src/drmmode_display.h        |   99 ++++-
 26 files changed, 1703 insertions(+), 879 deletions(-)

New commits:
commit 70e5fbf7ad23f7a600dd1a3139674c86348ec603
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Fri Sep 29 00:17:51 2017 +0300

    release to sid

diff --git a/debian/changelog b/debian/changelog
index 3e31667..4989ca8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,9 +1,9 @@
-xserver-xorg-video-amdgpu (1.4.0-1) UNRELEASED; urgency=medium
+xserver-xorg-video-amdgpu (1.4.0-1) unstable; urgency=medium
 
   * New upstream release.
   * control: Bump libdrm-dev build-dep to 2.4.78 to match configure.ac.
 
- -- Timo Aaltonen <tjaalton@debian.org>  Thu, 28 Sep 2017 17:17:55 +0300
+ -- Timo Aaltonen <tjaalton@debian.org>  Fri, 29 Sep 2017 00:17:42 +0300
 
 xserver-xorg-video-amdgpu (1.3.0-1) unstable; urgency=medium
 

commit 12ff37303e7231e1e1fdf9a6e464f0a4510314d8
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Fri Sep 29 00:17:02 2017 +0300

    control: Bump libdrm-dev build-dep to 2.4.78 to match configure.ac.

diff --git a/debian/changelog b/debian/changelog
index 531a8ea..3e31667 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,7 @@
 xserver-xorg-video-amdgpu (1.4.0-1) UNRELEASED; urgency=medium
 
   * New upstream release.
+  * control: Bump libdrm-dev build-dep to 2.4.78 to match configure.ac.
 
  -- Timo Aaltonen <tjaalton@debian.org>  Thu, 28 Sep 2017 17:17:55 +0300
 
diff --git a/debian/control b/debian/control
index 8cd2499..f1204ac 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Build-Depends:
  debhelper (>= 9),
  dh-autoreconf,
  quilt,
- libdrm-dev (>= 2.4.72) [!hurd-i386],
+ libdrm-dev (>= 2.4.78) [!hurd-i386],
  libgl1-mesa-dev | libgl-dev,
  libgbm-dev,
  libudev-dev [linux-any],

commit 251726afe8362ad63a1743baab72aed1c8968dc0
Author: Timo Aaltonen <tjaalton@debian.org>
Date:   Thu Sep 28 17:18:47 2017 +0300

    update the changelogs

diff --git a/ChangeLog b/ChangeLog
index b01bdde..39d63c4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,647 @@
+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>
+
+commit 82fa615f38137add75f9cd4bb49c48dd88de916f
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Tue May 2 11:53:25 2017 +0900
+
+    Apply gamma correction to HW cursor
+    
+    The display hardware CLUT we're currently using for gamma correction
+    doesn't affect the HW cursor, so we have to apply it manually when
+    uploading the HW cursor data.
+    
+    This currently only works in depth 24/32.
+    
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+
+commit 981bac185cfd74ae50dffc28f57cf34623a9595f
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Thu Mar 23 18:51:38 2017 +0900
+
+    Don't set modes before AMDGPUWindowExposures_oneshot is called
+    
+    The root window contents may be undefined before that, so we don't want
+    to show anything yet.
+    
+    Fixes a crash on startup with rotation and virtual resolution set in
+    xorg.conf.
+    
+    Bugzilla: https://bugs.freedesktop.org/100276
+    Fixes: ad53635af150 ("Move DPMS check from amdgpu_scanout_do_update to
+                          amdgpu_scanout_flip")
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+
+commit 51e17041cb89806c934c5cf795207940a6aaccfe
+Author: Daniel Stone <daniels@collabora.com>
+Date:   Mon Apr 10 17:36:01 2017 +0900
+
+    Set correct DRM event context version
+    
+    DRM_EVENT_CONTEXT_VERSION is the latest context version supported by
+    whatever version of libdrm is present. We were blindly asserting we
+    supported whatever version that may be, even if we actually didn't.
+    
+    Set the version as 2, which should be bumped only with the appropriate
+    version checks.
+    
+    Signed-off-by: Daniel Stone <daniels@collabora.com>
+    (Ported from xserver commit 0c8e6ed85810e96d84173a52d628863802a78d82)
+    v2: Remove second paragraph of commit log, we always initialize
+            page_flip_handler2 = NULL (Emil Velikov)
+    Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com> # v1
+
+commit 67d155e62f5e09af242b0181527c162576dae02e
+Author: Nicholas Molloy <nick.a.molloy@gmail.com>
+Date:   Sun Mar 26 02:38:40 2017 +1300
+
+    Fix a misspelling of 'acceleration' in amdgpu_kms.c
+    
+    Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+    Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
+
+commit 165b51447643ce37f391f25ca6aecb8d76fabaa3
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Wed Mar 22 18:58:32 2017 +0900
+
+    manpage: Don't put "'" at the beginning of a line
+    
+    It caused the whole line to be dropped.
+    
+    Fixes: af0b24c1aca4 ("Allow toggling TearFree at runtime via output
+                          property")
+    Reported-by: Andy Furniss <adf.lists@gmail.com>
+    Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
+
+commit 1b476d417f85fd1b97e813adbbf4970db07adf5c
+Author: Michel Dänzer <michel.daenzer@amd.com>
+Date:   Thu Mar 23 18:03:56 2017 +0900
+
+    Post-release version bump
+
 commit 804e30e14e51f94403a0721ef2aae28f1fa9e9f2
 Author: Michel Dänzer <michel.daenzer@amd.com>
 Date:   Thu Mar 16 17:28:11 2017 +0900
diff --git a/debian/changelog b/debian/changelog
index 7e65256..531a8ea 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+xserver-xorg-video-amdgpu (1.4.0-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+
+ -- Timo Aaltonen <tjaalton@debian.org>  Thu, 28 Sep 2017 17:17:55 +0300
+
 xserver-xorg-video-amdgpu (1.3.0-1) unstable; urgency=medium
 
   * New upstream release.

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

diff --git a/configure.ac b/configure.ac
index 506c372..0896fb0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -23,7 +23,7 @@
 # Initialize Autoconf
 AC_PREREQ([2.60])
 AC_INIT([xf86-video-amdgpu],
-        [1.3.99],
+        [1.4.0],
         [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg&component=Driver/AMDgpu],
         [xf86-video-amdgpu])
 

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>

diff --git a/configure.ac b/configure.ac
index 6d7cee4..506c372 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,7 +75,7 @@ PKG_CHECK_MODULES(LIBDRM_AMDGPU, [libdrm_amdgpu >= 2.4.72])
 PKG_CHECK_MODULES(GBM, [gbm])
 
 # Obtain compiler/linker options for the driver dependencies
-PKG_CHECK_MODULES(XORG, [xorg-server >= 1.10 xproto fontsproto xf86driproto $REQUIRED_MODULES])
+PKG_CHECK_MODULES(XORG, [xorg-server >= 1.13 xproto fontsproto xf86driproto $REQUIRED_MODULES])
 PKG_CHECK_MODULES(XEXT, [xextproto >= 7.0.99.1],
                   HAVE_XEXTPROTO_71="yes"; AC_DEFINE(HAVE_XEXTPROTO_71, 1, [xextproto 7.1 available]),
                   HAVE_XEXTPROTO_71="no")
@@ -180,12 +180,6 @@ AC_CHECK_DECL(xf86CursorResetCursor,
 	      [#include <xorg-server.h>
 	       #include <xf86Cursor.h>])
 
-AC_CHECK_DECL(xorg_list_init,
-	      [AC_DEFINE(HAVE_XORG_LIST, 1, [Have xorg_list API])], [],
-	      [#include <X11/Xdefs.h>
-	      #include "xorg-server.h"
-	      #include "list.h"])
-
 AC_CHECK_DECL(GBM_BO_USE_LINEAR,
 	      [AC_DEFINE(HAVE_GBM_BO_USE_LINEAR, 1, [Have GBM_BO_USE_LINEAR])], [],
 	      [#include <stdlib.h>
diff --git a/src/Makefile.am b/src/Makefile.am
index 7468bba..c23c87d 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -62,7 +62,6 @@ EXTRA_DIST = \
 	amdgpu_drm_queue.h \
 	amdgpu_glamor.h \
 	amdgpu_drv.h \
-	amdgpu_list.h \
 	amdgpu_pixmap.h \
 	amdgpu_probe.h \
 	amdgpu_version.h \
diff --git a/src/amdgpu_bo_helper.c b/src/amdgpu_bo_helper.c
index ee52e0c..ba22122 100644
--- a/src/amdgpu_bo_helper.c
+++ b/src/amdgpu_bo_helper.c
@@ -79,13 +79,8 @@ struct amdgpu_buffer *amdgpu_alloc_pixmap_bo(ScrnInfoPtr pScrn, int width,
 			bo_use |= GBM_BO_USE_SCANOUT;
 
 #ifdef HAVE_GBM_BO_USE_LINEAR
-#ifdef CREATE_PIXMAP_USAGE_SHARED
-		if (usage_hint == CREATE_PIXMAP_USAGE_SHARED) {
-			bo_use |= GBM_BO_USE_LINEAR;
-		}
-#endif
-
-		if (usage_hint & AMDGPU_CREATE_PIXMAP_LINEAR) {
+		if (usage_hint == CREATE_PIXMAP_USAGE_SHARED ||
+		    (usage_hint & AMDGPU_CREATE_PIXMAP_LINEAR)) {
 			bo_use |= GBM_BO_USE_LINEAR;
 		}
 #endif
@@ -394,7 +389,6 @@ struct amdgpu_buffer *amdgpu_gem_bo_open_prime(amdgpu_device_handle pDev,
 	return bo;
 }
 
-#ifdef AMDGPU_PIXMAP_SHARING
 
 Bool amdgpu_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle)
 {
@@ -467,5 +461,3 @@ Bool amdgpu_set_shared_pixmap_backing(PixmapPtr ppix, void *fd_handle)
 
 	return ret;
 }
-
-#endif /* AMDGPU_PIXMAP_SHARING */
diff --git a/src/amdgpu_dri2.c b/src/amdgpu_dri2.c
index ccf5477..a8ccd22 100644
--- a/src/amdgpu_dri2.c
+++ b/src/amdgpu_dri2.c
@@ -48,15 +48,10 @@
 #include "amdgpu_bo_helper.h"
 #include "amdgpu_version.h"
 
-#include "amdgpu_list.h"
-
+#include <list.h>
 #include <xf86Priv.h>
 #include <X11/extensions/dpmsconst.h>
 
-#if DRI2INFOREC_VERSION >= 9
-#define USE_DRI2_PRIME
-#endif
-
 #define FALLBACK_SWAP_DELAY 16
 
 typedef DRI2BufferPtr BufferPtr;
@@ -204,14 +199,6 @@ error:
 	return NULL;
 }
 
-DRI2BufferPtr
-amdgpu_dri2_create_buffer(DrawablePtr pDraw, unsigned int attachment,
-			  unsigned int format)
-{
-	return amdgpu_dri2_create_buffer2(pDraw->pScreen, pDraw,
-					  attachment, format);
-}
-
 static void
 amdgpu_dri2_destroy_buffer2(ScreenPtr pScreen,
 			    DrawablePtr drawable, BufferPtr buffers)
@@ -240,11 +227,6 @@ amdgpu_dri2_destroy_buffer2(ScreenPtr pScreen,
 	}
 }
 
-void amdgpu_dri2_destroy_buffer(DrawablePtr pDraw, DRI2BufferPtr buf)
-{
-	amdgpu_dri2_destroy_buffer2(pDraw->pScreen, pDraw, buf);
-}
-
 static inline PixmapPtr GetDrawablePixmap(DrawablePtr drawable)
 {
 	if (drawable->type == DRAWABLE_PIXMAP)
@@ -274,17 +256,14 @@ amdgpu_dri2_copy_region2(ScreenPtr pScreen,
 	dst_drawable = &dst_private->pixmap->drawable;
 
 	if (src_private->attachment == DRI2BufferFrontLeft) {
-#ifdef USE_DRI2_PRIME
 		if (drawable->pScreen != pScreen) {
 			src_drawable = DRI2UpdatePrime(drawable, src_buffer);
 			if (!src_drawable)
 				return;
 		} else
-#endif
 			src_drawable = drawable;
 	}
 	if (dst_private->attachment == DRI2BufferFrontLeft) {
-#ifdef USE_DRI2_PRIME
 		if (drawable->pScreen != pScreen) {
 			dst_drawable = DRI2UpdatePrime(drawable, dest_buffer);
 			if (!dst_drawable)
@@ -292,7 +271,6 @@ amdgpu_dri2_copy_region2(ScreenPtr pScreen,
 			if (dst_drawable != drawable)
 				translate = TRUE;
 		} else
-#endif
 			dst_drawable = drawable;
 	}
 
@@ -320,14 +298,6 @@ amdgpu_dri2_copy_region2(ScreenPtr pScreen,
 	FreeScratchGC(gc);
 }
 
-void
-amdgpu_dri2_copy_region(DrawablePtr pDraw, RegionPtr pRegion,
-			DRI2BufferPtr pDstBuffer, DRI2BufferPtr pSrcBuffer)
-{
-	return amdgpu_dri2_copy_region2(pDraw->pScreen, pDraw, pRegion,
-					pDstBuffer, pSrcBuffer);
-}
-
 enum DRI2FrameEventType {
 	DRI2_SWAP,
 	DRI2_FLIP,
@@ -362,8 +332,9 @@ static void amdgpu_dri2_unref_buffer(BufferPtr buffer)
 {
 	if (buffer) {
 		struct dri2_buffer_priv *private = buffer->driverPrivate;
-		amdgpu_dri2_destroy_buffer(&(private->pixmap->drawable),
-					   buffer);
+		DrawablePtr draw = &private->pixmap->drawable;
+
+		amdgpu_dri2_destroy_buffer2(draw->pScreen, draw, buffer);
 	}
 }
 
@@ -751,8 +722,8 @@ static void amdgpu_dri2_frame_event_handler(xf86CrtcPtr crtc, uint32_t seq,
 			box.x2 = drawable->width;
 			box.y2 = drawable->height;
 			REGION_INIT(pScreen, &region, &box, 0);
-			amdgpu_dri2_copy_region(drawable, &region, event->front,
-						event->back);
+			amdgpu_dri2_copy_region2(drawable->pScreen, drawable, &region,
+						 event->front, event->back);
 			swap_type = DRI2_BLIT_COMPLETE;
 		}
 
@@ -1286,7 +1257,7 @@ blit_fallback:
 		box.y2 = draw->height;
 		REGION_INIT(pScreen, &region, &box, 0);
 
-		amdgpu_dri2_copy_region(draw, &region, front, back);
+		amdgpu_dri2_copy_region2(draw->pScreen, draw, &region, front, back);
 
 		DRI2SwapComplete(client, draw, 0, 0, 0, DRI2_BLIT_COMPLETE, func, data);
 
@@ -1315,10 +1286,6 @@ Bool amdgpu_dri2_screen_init(ScreenPtr pScreen)
 	dri2_info.driverName = SI_DRIVER_NAME;
 	dri2_info.fd = pAMDGPUEnt->fd;
 	dri2_info.deviceName = info->dri2.device_name;
-	dri2_info.version = DRI2INFOREC_VERSION;
-	dri2_info.CreateBuffer = amdgpu_dri2_create_buffer;
-	dri2_info.DestroyBuffer = amdgpu_dri2_destroy_buffer;
-	dri2_info.CopyRegion = amdgpu_dri2_copy_region;
 
 	if (info->drmmode.count_crtcs > 2) {
 		uint64_t cap_value;
@@ -1338,11 +1305,10 @@ Bool amdgpu_dri2_screen_init(ScreenPtr pScreen)
 	}
 
 	if (scheduling_works) {
-		dri2_info.version = 4;
 		dri2_info.ScheduleSwap = amdgpu_dri2_schedule_swap;


Reply to: