Source-Changes-HG archive

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

[xsrc/trunk]: xsrc/external/mit/xf86-video-amdgpu/dist initial import of xf86...



details:   https://anonhg.NetBSD.org/xsrc/rev/e5cd392fb1c0
branches:  trunk
changeset: 7432:e5cd392fb1c0
user:      mrg <mrg%NetBSD.org@localhost>
date:      Sun Feb 26 20:09:14 2023 +0000

description:
initial import of xf86-video-amdgpu-23.0.0

diffstat:

 external/mit/xf86-video-amdgpu/dist/ChangeLog             |    312 +
 external/mit/xf86-video-amdgpu/dist/Makefile.in           |     27 +-
 external/mit/xf86-video-amdgpu/dist/README.md             |      6 +-
 external/mit/xf86-video-amdgpu/dist/aclocal.m4            |    161 +-
 external/mit/xf86-video-amdgpu/dist/compile               |      2 +-
 external/mit/xf86-video-amdgpu/dist/conf/10-amdgpu.conf   |      3 +-
 external/mit/xf86-video-amdgpu/dist/conf/Makefile.in      |     10 +-
 external/mit/xf86-video-amdgpu/dist/config.guess          |   1440 +-
 external/mit/xf86-video-amdgpu/dist/config.h.in           |     15 +-
 external/mit/xf86-video-amdgpu/dist/config.sub            |    708 +-
 external/mit/xf86-video-amdgpu/dist/configure             |  14458 ++++++-----
 external/mit/xf86-video-amdgpu/dist/configure.ac          |      8 +-
 external/mit/xf86-video-amdgpu/dist/depcomp               |      2 +-
 external/mit/xf86-video-amdgpu/dist/install-sh            |    144 +-
 external/mit/xf86-video-amdgpu/dist/ltmain.sh             |    258 +-
 external/mit/xf86-video-amdgpu/dist/m4/libtool.m4         |     64 +-
 external/mit/xf86-video-amdgpu/dist/man/Makefile.in       |     10 +-
 external/mit/xf86-video-amdgpu/dist/man/amdgpu.man        |     25 +-
 external/mit/xf86-video-amdgpu/dist/missing               |      2 +-
 external/mit/xf86-video-amdgpu/dist/src/Makefile.in       |     12 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_dri2.c     |      3 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_drv.h      |      7 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_glamor.c   |     21 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_kms.c      |     87 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_pixmap.c   |      2 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_present.c  |     23 +-
 external/mit/xf86-video-amdgpu/dist/src/amdgpu_video.c    |    203 +-
 external/mit/xf86-video-amdgpu/dist/src/compat-api.h      |      3 +
 external/mit/xf86-video-amdgpu/dist/src/drmmode_display.c |     12 +-
 external/mit/xf86-video-amdgpu/dist/src/simple_list.h     |     10 +-
 30 files changed, 9812 insertions(+), 8226 deletions(-)

diffs (truncated from 25929 to 300 lines):

diff -r eef09248a917 -r e5cd392fb1c0 external/mit/xf86-video-amdgpu/dist/ChangeLog
--- a/external/mit/xf86-video-amdgpu/dist/ChangeLog     Sun Feb 26 20:01:45 2023 +0000
+++ b/external/mit/xf86-video-amdgpu/dist/ChangeLog     Sun Feb 26 20:09:14 2023 +0000
@@ -1,3 +1,315 @@
+commit 7025aefcdf9673665588cf291c5d71beb39cce89
+Author: Shashank Sharma <shashank.sharma%amd.com@localhost>
+Date:   Wed Feb 22 18:00:23 2023 +0100
+
+    Bump version for the 23.0.0 release
+    
+    This release includes some bug fixes.
+    
+    Signed-off-by: Shashank Sharma <shashank.sharma%amd.com@localhost>
+
+commit 6ee320917093ad0f7d68e516d3224d3c04ca13ee
+Author: Shashank Sharma <shashank.sharma%amd.com@localhost>
+Date:   Mon Nov 28 13:08:36 2022 +0100
+
+    config: Add hotplug driver name
+    
+    This patch adds the PCI-hotplug handler driver name in the
+    DDX config file with respect to Xorg commit:82bf391c
+    
+    Cc: Alexander Deucher <alexander.deucher%amd.com@localhost>
+    Signed-off-by: Shashank Sharma <shashank.sharma%amd.com@localhost>
+
+commit 2ec854d48e0e44fc60c3955663f700cbefea3553
+Author: Mario Kleiner <mario.kleiner.de%gmail.com@localhost>
+Date:   Fri Nov 11 02:18:07 2022 +0100
+
+    Fix primary output handling in amdgpu_crtc_covering_box().
+    
+    Commit e39a3ee07c9dea73b0452b71b1ef633b6cd6f389
+    tries to reintroduce the RandR primary output as a tie breaker
+    in amdgpu_crtc_covering_box(), but that function wrongly
+    assigns a void* devPrivate, which is actually a xf86CrtcPtr,
+    to the RRCrtcPtr primary_crtc, a pointer target type mismatch!
+    
+    This causes a later pointer comparison of primary_crtc with
+    RRCrtcPtr crtc to always fail, so that the user selected
+    primary output can not ever successfully act as a tie-breaker
+    when multiple candidate crtcs cover the same box area,
+    defeating the whole purpose of that commit! Not sure how
+    this failure could have ever evaded any basic testing.
+    
+    Fix this trivially by assigning the right variable.
+    
+    Successfully tested on a multi-display setup, verifying
+    that the primary output now works as tie breaker as
+    intended.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de%gmail.com@localhost>
+    Fixes: e39a3ee07c9d ("Prefer crtc of primary output for synchronization when screen has to crtcs with the same coverage")
+
+commit 9c959fac3af28d191105f63236096ad456dca614
+Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer%amd.com@localhost>
+Date:   Thu Sep 29 16:42:09 2022 +0200
+
+    Use DRM_CAP_CURSOR_WIDTH/HEIGHT if possible
+    
+    There's no need to hardcode the cursor size if the kernel can
+    report the value it wants.
+
+commit 4e011b91fa3ef58b85327d3429889efd934b3531
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Tue Aug 2 15:03:19 2022 -0700
+
+    gitlab CI: enable gitlab's builtin static analysis
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit dc81177ef342bf8c2aa5a6fd6687c7a09b4f9709
+Author: tiancyin <tianci.yin%amd.com@localhost>
+Date:   Wed Aug 10 16:46:15 2022 +0800
+
+    Fix screen corruption on secondary GPU
+    
+    [why]
+    On RHEL9+, xorg-server.pc shows that the Xorg no longer depends on dri,
+    and dri.pc provides "/opt/amdgpu/include" path for pkg-config, this
+    cause pkg-config no longer output "-I/opt/amdgpu/include", consequently
+    the configure can't find gbm.h and HAVE_GBM_BO_USE_LINEAR is not
+    declared, that cause the corruption.
+    
+    [how]
+    Since the gbm.pc also provides the "/opt/amdgpu/include" path, in module
+    dependence checking, GBM_CFLAGS get this path, so just explicitly add
+    GBM_CFLAGS into CPPFLAGS can fix this issue.
+    
+    Signed-off-by: tiancyin <tianci.yin%amd.com@localhost>
+
+commit a3a012b649eb9b3066abefe163a72854514792fa
+Author: Kai-Heng Feng <kai.heng.feng%canonical.com@localhost>
+Date:   Mon Aug 8 10:49:11 2022 +0800
+
+    Initialize present extension for GPU screen
+    
+    Some laptops have the external outputs routed to dGPU, when the external
+    output over dGPU is the only display in reverse prime mode, we need
+    present extension so fake CRTC won't be used.
+
+commit f3f57a58342c286808220bdbe6dc6bb7098763b9
+Author: Lukasz Spintzyk <lukasz.spintzyk%displaylink.com@localhost>
+Date:   Fri Jun 11 14:54:35 2021 +0200
+
+    Do not consider disabled crtc anymore when looking for xf86crtc covering drawable.
+    
+    This is commit is removing obsolete switch done in
+    
+    xf86-video-ati at sha 61d0aec40e2521488c2fe43e7a6823e5c87d94d7:  video: add option to include disabled CRTCs in best CRTC search
+    This is not required anymore as with commit done in
+    xorg-server at sha 5c5c1b77982a9af7279a90bc3c2be48adaa9c778:     present: Add Present extension
+    That in case of lack of crtc is using fake_crtc with render 1Hz frequency
+    
+    When consider_disabled is removed then amdgpu_pick_best_crtc is doing the same what rr_crtc_covering_box is doing
+    so it can be reimplemented to reuse that function.
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk%synaptics.com@localhost>
+    Signed-off-by: Shashank Sharma <contactshashanksharma%gmail.com@localhost>
+    Reviewed-by: Alex Deucher <alexander.deucher%amd.com@localhost>
+
+commit e39a3ee07c9dea73b0452b71b1ef633b6cd6f389
+Author: Lukasz Spintzyk <lukasz.spintzyk%displaylink.com@localhost>
+Date:   Mon Jun 21 11:41:40 2021 +0200
+
+    Prefer crtc of primary output for synchronization when screen has to crtcs with the same coverage
+    
+    This is adjusting randr_crtc_covering_drawable to cover scenario fixed in
+    9151f3b1c2ebcc34e63195888ba696f2183ba5e2
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk%synaptics.com@localhost>
+    Signed-off-by: Shashank Sharma <contactshashanksharma%gmail.com@localhost>
+    Reviewed-by: Alex Deucher <alexander.deucher%amd.com@localhost>
+
+commit 92fb43b8e96bbda77e03b7313ccbba75a304a1b1
+Author: Lukasz Spintzyk <lukasz.spintzyk%displaylink.com@localhost>
+Date:   Fri Jun 11 08:52:58 2021 +0200
+
+    Use randr_crtc_covering_drawable used in modesetting
+    
+    Use implementation from modesetting driver that is fixing issue:
+    https://gitlab.freedesktop.org/xorg/xserver/-/issues/1028
+    
+    Instead of returning primary crtc as fallback we can now find and return crtc that belongs to secondary outputs.
+    
+    v2:
+      restore original naming scheme for amdgpu_crtc_is_enabled, amdgpu_box_intersect, amdgpu_box_area functions
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk%synaptics.com@localhost>
+    Signed-off-by: Emilia Majewska <emilia.majewska%synaptics.com@localhost>
+    Signed-off-by: Shashank Sharma <contactshashanksharma%gmail.com@localhost>
+    Reviewed-by: Alex Deucher <alexander.deucher%amd.com@localhost>
+
+commit 57740ae2357ca7b973f78be31327365aaa60ed41
+Author: Łukasz Spintzyk <lukasz.spintzyk%synaptics.com@localhost>
+Date:   Tue Jun 22 07:36:42 2021 +0200
+
+    amdgpu: fixup driver for new X server ABI
+    
+    Signed-off-by: Łukasz Spintzyk <lukasz.spintzyk%synaptics.com@localhost>
+    Signed-off-by: Shashank Sharma <contactshashanksharma%gmail.com@localhost>
+    Reviewed-by: Alex Deucher <alexander.deucher%amd.com@localhost>
+
+commit 89b3eb9fffe2ead4257eee6d65accbac135aedc9
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Sat Feb 19 12:07:46 2022 -0800
+
+    Update URLs to reflect gitlab migration
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 533bd30ceaa373788b3d0bfd4d486f0f1c624d0c
+Author: Shashank Sharma <shashank.sharma%amd.com@localhost>
+Date:   Tue Feb 22 16:25:01 2022 +0100
+
+    Bump version for the 22.0.0 release
+    
+    This release includes some bug fixes and one minor feature.
+    
+    Signed-off-by: Shashank Sharma <shashank.sharma%amd.com@localhost>
+
+commit 402bfdead7d512726c01359c03fcd37b4efdc975
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Mon Jan 17 14:20:53 2022 -0800
+
+    Build xz tarballs instead of bzip2
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit c21bcdd1cbdc340a80d1ebfbf02376e2dad9c67c
+Author: Jesse Zhang <jesse.zhang%amd.com@localhost>
+Date:   Wed Feb 16 16:11:44 2022 +0100
+
+    glamor: unset AMDGPU_CREATE_PIXMAP_SCANOUT on shared pixmap
+    
+    While running multi-display test(for both APUs and DGPUs), if
+    the screen setting mode is changed from "single mode" to "share mode",
+    the screen shows tiled distortion, due to wrongly created pixmap.
+    This is a regression.
+    
+    Fixes: 0732f81a2c67 ("glamor: Make pixmap scanout compatible if its dimensions are")
+    Closes: https://gitlab.freedesktop.org/xorg/driver/xf86-video-amdgpu/-/issues/48
+    
+    Acked-by: Shashank Sharma <shashank.sharma%amd.com@localhost>
+    Signed-off-by: Jesse Zhang <jesse.zhang%amd.com@localhost>
+    Signed-off-by: Shashank Sharma <shashank.sharma%amd.com@localhost>
+
+commit 8bc148f0c14f6a6df1c3643a774e00a00c7942c6
+Author: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+Date:   Mon Jan 17 14:25:12 2022 -0800
+
+    Fix spelling/wording issues
+    
+    Found by using:
+        codespell --builtin clear,rare,usage,informal,code,names
+    
+    Signed-off-by: Alan Coopersmith <alan.coopersmith%oracle.com@localhost>
+
+commit 65c127366a22c03d2ffcdcdf91eec28cac733e83
+Author: Mario Kleiner <mario.kleiner.de%gmail.com@localhost>
+Date:   Tue Jan 25 03:44:47 2022 +0100
+
+    Add option for non-vsynced flips for "secondary" outputs.
+    
+    This is a straightforward port of a patch with the same name
+    "modesetting: Add option for non-vsynced flips for "secondary"
+    outputs." from X-Server master / X-Server 21.1. See server MR 742.
+    The description below is therefore identical to that X-Server commit:
+    
+    Whenever an unredirected fullscreen window uses pageflipping for a
+    DRI3/Present PresentPixmap() operation and the X-Screen has more than
+    one active output, multiple crtc's need to execute pageflips. Only
+    after the last flip has completed can the PresentPixmap operation
+    as a whole complete.
+    
+    If a sync_flip is requested for the present, then the current
+    implementation will synchronize each pageflip to the vblank of
+    its associated crtc. This provides tear-free image presentation
+    across all outputs, but introduces a different artifact, if not
+    all outputs run at the same refresh rate with perfect synchrony:
+    The slowest output throttles the presentation rate, and present
+    completion is delayed to flip completion of the "latest" output
+    to complete. This means degraded performance, e.g., a dual-display
+    setup with a 144 Hz monitor and a 60 Hz monitor will always be
+    throttled to at most 60 fps. It also means non-constant present
+    rate if refresh cycles drift against each other, creating complex
+    "beat patterns", tremors, stutters and periodic slowdowns - quite
+    irritating!
+    
+    Such a scenario will be especially annoying if one uses multiple
+    outputs in "mirror mode" aka "clone mode". One output will usually
+    be the "production output" with the highest quality and fastest
+    display attached, whereas a secondary mirror output just has a
+    cheaper display for monitoring attached. Users care about perfect
+    and perfectly timed tear-free presentation on the "production output",
+    but cares less about quality on the secondary "mirror output". They
+    are willing to trade quality on secondary outputs away in exchange
+    for better presentation timing on the "production output".
+    
+    One example use case for such production + monitoring displays are
+    neuroscience / medical science applications where one high quality
+    display device is used to present visual animations to test subjects
+    or patients in a fMRI scanner room (production display), whereas
+    an operator monitors the same visual animations from a control room
+    on a lower quality display. Presentation timing needs to be perfect,
+    and animations high-speed and tear-free for the production display,
+    whereas quality and timing don't matter for the monitoring display.
+    
+    This commit gives users the option to choose such a trade-off as
+    opt-in:
+    
+    It adds a new boolean option "AsyncFlipSecondaries" to the device section
+    of xorg.conf. If this option is specified as true, then DRI3 pageflip
+    behaviour changes as follows:
+    
+    1. The "reference crtc" for a windows PresentPixmap operation does a
+       vblank synced flip, or a DRM_MODE_PAGE_FLIP_ASYNC non-synchronized
+       flip, as requested by the caller, just as in the past. Typically
+       flips will be requested to be vblank synchronized for tear-free
+       presentation. The "reference crtc" is the one chosen by the caller
+       to drive presentation timing (as specified by PresentPixmap()'s
+       "target_msc", "divisor", "remainder" parameters and implemented by
+       vblank events) and to deliver Present completion timestamps (msc
+       and ust) extracted from its pageflip completion event.
+    
+    2. All other crtc's, which also page-flip in a multi-display configuration,
+       will try to flip with DRM_MODE_PAGE_FLIP_ASYNC, ie. immediately and
+       not synchronized to vblank. This allows the PresentPixmap operation
+       to complete with little delay compared to a single-display present,
+       especially if the different crtc's run at different video refresh
+       rates or their refresh cycles are not perfectly synchronized, but
+       drift against each other. The downside is potential tearing artifacts
+       on all outputs apart from the one of the "reference crtc".
+    
+    Successfully tested on a AMD gpu with single-display and dual-display
+    setups, and with single-X-Screen as well as dual-X-Screen "ZaphodHeads"
+    configurations.
+    
+    Signed-off-by: Mario Kleiner <mario.kleiner.de%gmail.com@localhost>
+


Home | Main Index | Thread Index | Old Index