Skip to content

Commit b344e64

Browse files
committed
Merge tag 'amd-drm-next-6.9-2024-02-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next
amd-drm-next-6.9-2024-02-09: amdgpu: - Validate DMABuf imports in compute VMs - Add RAS ACA framework - PSP 13 fixes - Misc code cleanups - Replay fixes - Atom interpretor PS, WS bounds checking - DML2 fixes - Audio fixes - DCN 3.5 Z state fixes - Remove deprecated ida_simple usage - UBSAN fixes - RAS fixes - Enable seq64 infrastructure - DC color block enablement - Documentation updates - DC documentation updates - DMCUB updates - S3 fixes - VCN 4.0.5 fixes - DP MST fixes - SR-IOV fixes amdkfd: - Validate DMABuf imports in compute VMs - SVM fixes - Trap handler updates radeon: - Atom interpretor PS, WS bounds checking - Misc code cleanups UAPI: - Bump KFD version so UMDs know that the fixes that enable the management of VA mappings in compute VMs using the GEM_VA ioctl for DMABufs exported from KFD are present - Add INFO query for input power. This matches the existing INFO query for average power. Used in gaming HUDs, etc. Example userspace: https://github.com/Umio-Yasuno/libdrm-amdgpu-sys-rs/tree/input_power From: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/msgid/20240209221459.5453-1-alexander.deucher@amd.com
2 parents 0de6239 + d559744 commit b344e64

File tree

296 files changed

+6767
-2541
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

296 files changed

+6767
-2541
lines changed

Documentation/gpu/amdgpu/dgpu-asic-info-table.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,13 @@ Radeon (RX|TM) (PRO|WX) Vega /MI25 /V320 /V340L /8200 /9100 /SSG MxGPU, VEGA10,
1616
AMD Radeon (Pro) VII /MI50 /MI60, VEGA20, DCE 12, 9.4.0, VCE 4.1.0 / UVD 7.2.0, 4.2.0
1717
MI100, ARCTURUS, *, 9.4.1, VCN 2.5.0, 4.2.2
1818
MI200, ALDEBARAN, *, 9.4.2, VCN 2.6.0, 4.4.0
19+
MI300, AQUA_VANGARAM, *, 9.4.3, VCN 4.0.3, 4.4.2
1920
AMD Radeon (RX|Pro) 5600(M|XT) /5700 (M|XT|XTB) /W5700, NAVI10, DCN 2.0.0, 10.1.10, VCN 2.0.0, 5.0.0
2021
AMD Radeon (Pro) 5300 /5500XTB/5500(XT|M) /W5500M /W5500, NAVI14, DCN 2.0.0, 10.1.1, VCN 2.0.2, 5.0.2
2122
AMD Radeon RX 6800(XT) /6900(XT) /W6800, SIENNA_CICHLID, DCN 3.0.0, 10.3.0, VCN 3.0.0, 5.2.0
2223
AMD Radeon RX 6700 XT / 6800M / 6700M, NAVY_FLOUNDER, DCN 3.0.0, 10.3.2, VCN 3.0.0, 5.2.2
2324
AMD Radeon RX 6600(XT) /6600M /W6600 /W6600M, DIMGREY_CAVEFISH, DCN 3.0.2, 10.3.4, VCN 3.0.16, 5.2.4
2425
AMD Radeon RX 6500M /6300M /W6500M /W6300M, BEIGE_GOBY, DCN 3.0.3, 10.3.5, VCN 3.0.33, 5.2.5
2526
AMD Radeon RX 7900 XT /XTX, , DCN 3.2.0, 11.0.0, VCN 4.0.0, 6.0.0
27+
AMD Radeon RX 7800 XT, , DCN 3.2.0, 11.0.3, VCN 4.0.0, 6.0.3
2628
AMD Radeon RX 7600M (XT) /7700S /7600S, , DCN 3.2.1, 11.0.2, VCN 4.0.4, 6.0.2
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
==========
2+
DCN Blocks
3+
==========
4+
5+
In this section, you will find some extra details about some of the DCN blocks
6+
and the code documentation when it is automatically generated.
7+
8+
DCHUBBUB
9+
--------
10+
11+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
12+
:doc: overview
13+
14+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
15+
:export:
16+
17+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
18+
:internal:
19+
20+
HUBP
21+
----
22+
23+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
24+
:doc: overview
25+
26+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
27+
:export:
28+
29+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
30+
:internal:
31+
32+
DPP
33+
---
34+
35+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
36+
:doc: overview
37+
38+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
39+
:export:
40+
41+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/hubp.h
42+
:internal:
43+
44+
MPC
45+
---
46+
47+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
48+
:doc: overview
49+
50+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
51+
:export:
52+
53+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
54+
:internal:
55+
56+
OPP
57+
---
58+
59+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/opp.h
60+
:doc: overview
61+
62+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/opp.h
63+
:export:
64+
65+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/opp.h
66+
:internal:
67+
68+
DIO
69+
---
70+
71+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h
72+
:doc: overview
73+
74+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h
75+
:export:
76+
77+
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/link/hwss/link_hwss_dio.h
78+
:internal:
Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
.. _display_todos:
2+
3+
==============================
4+
AMDGPU - Display Contributions
5+
==============================
6+
7+
First of all, if you are here, you probably want to give some technical
8+
contribution to the display code, and for that, we say thank you :)
9+
10+
This page summarizes some of the issues you can help with; keep in mind that
11+
this is a static page, and it is always a good idea to try to reach developers
12+
in the amdgfx or some of the maintainers. Finally, this page follows the DRM
13+
way of creating a TODO list; for more information, check
14+
'Documentation/gpu/todo.rst'.
15+
16+
Gitlab issues
17+
=============
18+
19+
Users can report issues associated with AMD GPUs at:
20+
21+
- https://gitlab.freedesktop.org/drm/amd
22+
23+
Usually, we try to add a proper label to all new tickets to make it easy to
24+
filter issues. If you can reproduce any problem, you could help by adding more
25+
information or fixing the issue.
26+
27+
Level: diverse
28+
29+
IGT
30+
===
31+
32+
`IGT`_ provides many integration tests that can be run on your GPU. We always
33+
want to pass a large set of tests to increase the test coverage in our CI. If
34+
you wish to contribute to the display code but are unsure where a good place
35+
is, we recommend you run all IGT tests and try to fix any failure you see in
36+
your hardware. Keep in mind that this failure can be an IGT problem or a kernel
37+
issue; it is necessary to analyze case-by-case.
38+
39+
Level: diverse
40+
41+
.. _IGT: https://gitlab.freedesktop.org/drm/igt-gpu-tools
42+
43+
Compilation
44+
===========
45+
46+
Fix compilation warnings
47+
------------------------
48+
49+
Enable the W1 or W2 warning level in the kernel compilation and try to fix the
50+
issues on the display side.
51+
52+
Level: Starter
53+
54+
Fix compilation issues when using um architecture
55+
-------------------------------------------------
56+
57+
Linux has a User-mode Linux (UML) feature, and the kernel can be compiled to
58+
the **um** architecture. Compiling for **um** can bring multiple advantages
59+
from the test perspective. We currently have some compilation issues in this
60+
area that we need to fix.
61+
62+
Level: Intermediate
63+
64+
Code Refactor
65+
=============
66+
67+
Add prefix to DC functions to improve the debug with ftrace
68+
-----------------------------------------------------------
69+
70+
The Ftrace debug feature (check 'Documentation/trace/ftrace.rst') is a
71+
fantastic way to check the code path when developers try to make sense of a
72+
bug. Ftrace provides a filter mechanism that can be useful when the developer
73+
has some hunch of which part of the code can cause the issue; for this reason,
74+
if a set of functions has a proper prefix, it becomes easy to create a good
75+
filter. Additionally, prefixes can improve stack trace readability.
76+
77+
The DC code does not follow some prefix rules, which makes the Ftrace filter
78+
more complicated and reduces the readability of the stack trace. If you want
79+
something simple to start contributing to the display, you can make patches for
80+
adding prefixes to DC functions. To create those prefixes, use part of the file
81+
name as a prefix for all functions in the target file. Check the
82+
'amdgpu_dm_crtc.c` and `amdgpu_dm_plane.c` for some references. However, we
83+
strongly advise not to send huge patches changing these prefixes; otherwise, it
84+
will be hard to review and test, which can generate second thoughts from
85+
maintainers. Try small steps; in case of double, you can ask before you put in
86+
effort. We recommend first looking at folders like dceXYZ, dcnXYZ, basics,
87+
bios, core, clk_mgr, hwss, resource, and irq.
88+
89+
Level: Starter
90+
91+
Reduce code duplication
92+
-----------------------
93+
94+
AMD has an extensive portfolio with various dGPUs and APUs that amdgpu
95+
supports. To maintain the new hardware release cadence, DCE/DCN was designed in
96+
a modular design, making the bring-up for new hardware fast. Over the years,
97+
amdgpu accumulated some technical debt in the code duplication area. For this
98+
task, it would be a good idea to find a tool that can discover code duplication
99+
(including patterns) and use it as guidance to reduce duplications.
100+
101+
Level: Intermediate
102+
103+
Make atomic_commit_[check|tail] more readable
104+
---------------------------------------------
105+
106+
The functions responsible for atomic commit and tail are intricate and
107+
extensive. In particular `amdgpu_dm_atomic_commit_tail` is a long function and
108+
could benefit from being split into smaller helpers. Improvements in this area
109+
are more than welcome, but keep in mind that changes in this area will affect
110+
all ASICs, meaning that refactoring requires a comprehensive verification; in
111+
other words, this effort can take some time for validation.
112+
113+
Level: Advanced
114+
115+
Documentation
116+
=============
117+
118+
Expand kernel-doc
119+
-----------------
120+
121+
Many DC functions do not have a proper kernel-doc; understanding a function and
122+
adding documentation is a great way to learn more about the amdgpu driver and
123+
also leave an outstanding contribution to the entire community.
124+
125+
Level: Starter
126+
127+
Beyond AMDGPU
128+
=============
129+
130+
AMDGPU provides features that are not yet enabled in the userspace. This
131+
section highlights some of the coolest display features, which could be enabled
132+
with the userspace developer helper.
133+
134+
Enable underlay
135+
---------------
136+
137+
AMD display has this feature called underlay (which you can read more about at
138+
'Documentation/GPU/amdgpu/display/mpo-overview.rst') which is intended to
139+
save power when playing a video. The basic idea is to put a video in the
140+
underlay plane at the bottom and the desktop in the plane above it with a hole
141+
in the video area. This feature is enabled in ChromeOS, and from our data
142+
measurement, it can save power.
143+
144+
Level: Unknown
145+
146+
Adaptive Backlight Modulation (ABM)
147+
-----------------------------------
148+
149+
ABM is a feature that adjusts the display panel's backlight level and pixel
150+
values depending on the displayed image. This power-saving feature can be very
151+
useful when the system starts to run off battery; since this will impact the
152+
display output fidelity, it would be good if this option was something that
153+
users could turn on or off.
154+
155+
Level: Unknown
156+
157+
158+
HDR & Color management & VRR
159+
----------------------------
160+
161+
HDR, Color Management, and VRR are huge topics and it's hard to put these into
162+
concise ToDos. If you are interested in this topic, we recommend checking some
163+
blog posts from the community developers to better understand some of the
164+
specific challenges and people working on the subject. If anyone wants to work
165+
on some particular part, we can try to help with some basic guidance. Finally,
166+
keep in mind that we already have some kernel-doc in place for those areas.
167+
168+
Level: Unknown

Documentation/gpu/amdgpu/display/display-manager.rst

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,9 +131,6 @@ The DRM blend mode and its elements are then mapped by AMDGPU display manager
131131
(DM) to program the blending configuration of the Multiple Pipe/Plane Combined
132132
(MPC), as follows:
133133

134-
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
135-
:doc: mpc-overview
136-
137134
.. kernel-doc:: drivers/gpu/drm/amd/display/dc/inc/hw/mpc.h
138135
:functions: mpcc_blnd_cfg
139136

Documentation/gpu/amdgpu/display/index.rst

Lines changed: 71 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,90 @@ drm/amd/display - Display Core (DC)
77
AMD display engine is partially shared with other operating systems; for this
88
reason, our Display Core Driver is divided into two pieces:
99

10-
1. **Display Core (DC)** contains the OS-agnostic components. Things like
10+
#. **Display Core (DC)** contains the OS-agnostic components. Things like
1111
hardware programming and resource management are handled here.
12-
2. **Display Manager (DM)** contains the OS-dependent components. Hooks to the
13-
amdgpu base driver and DRM are implemented here.
12+
#. **Display Manager (DM)** contains the OS-dependent components. Hooks to the
13+
amdgpu base driver and DRM are implemented here. For example, you can check
14+
display/amdgpu_dm/ folder.
15+
16+
------------------
17+
DC Code validation
18+
------------------
19+
20+
Maintaining the same code base across multiple OSes requires a lot of
21+
synchronization effort between repositories and exhaustive validation. In the
22+
DC case, we maintain a tree to centralize code from different parts. The shared
23+
repository has integration tests with our Internal Linux CI farm, and we run a
24+
comprehensive set of IGT tests in various AMD GPUs/APUs (mostly recent dGPUs
25+
and APUs). Our CI also checks ARM64/32, PPC64/32, and x86_64/32 compilation
26+
with DCN enabled and disabled.
27+
28+
When we upstream a new feature or some patches, we pack them in a patchset with
29+
the prefix **DC Patches for <DATE>**, which is created based on the latest
30+
`amd-staging-drm-next <https://gitlab.freedesktop.org/agd5f/linux>`_. All of
31+
those patches are under a DC version tested as follows:
32+
33+
* Ensure that every patch compiles and the entire series pass our set of IGT
34+
test in different hardware.
35+
* Prepare a branch with those patches for our validation team. If there is an
36+
error, a developer will debug as fast as possible; usually, a simple bisect
37+
in the series is enough to point to a bad change, and two possible actions
38+
emerge: fix the issue or drop the patch. If it is not an easy fix, the bad
39+
patch is dropped.
40+
* Finally, developers wait a few days for community feedback before we merge
41+
the series.
42+
43+
It is good to stress that the test phase is something that we take extremely
44+
seriously, and we never merge anything that fails our validation. Follows an
45+
overview of our test set:
46+
47+
#. Manual test
48+
* Multiple Hotplugs with DP and HDMI.
49+
* Stress test with multiple display configuration changes via the user interface.
50+
* Validate VRR behaviour.
51+
* Check PSR.
52+
* Validate MPO when playing video.
53+
* Test more than two displays connected at the same time.
54+
* Check suspend/resume.
55+
* Validate FPO.
56+
* Check MST.
57+
#. Automated test
58+
* IGT tests in a farm with GPUs and APUs that support DCN and DCE.
59+
* Compilation validation with the latest GCC and Clang from LTS distro.
60+
* Cross-compilation for PowerPC 64/32, ARM 64/32, and x86 32.
61+
62+
In terms of test setup for CI and manual tests, we usually use:
63+
64+
#. The latest Ubuntu LTS.
65+
#. In terms of userspace, we only use fully updated open-source components
66+
provided by the distribution official package manager.
67+
#. Regarding IGT, we use the latest code from the upstream.
68+
#. Most of the manual tests are conducted in the GNome but we also use KDE.
69+
70+
Notice that someone from our test team will always reply to the cover letter
71+
with the test report.
72+
73+
--------------
74+
DC Information
75+
--------------
1476

1577
The display pipe is responsible for "scanning out" a rendered frame from the
1678
GPU memory (also called VRAM, FrameBuffer, etc.) to a display. In other words,
1779
it would:
1880

19-
1. Read frame information from memory;
20-
2. Perform required transformation;
21-
3. Send pixel data to sink devices.
81+
#. Read frame information from memory;
82+
#. Perform required transformation;
83+
#. Send pixel data to sink devices.
2284

2385
If you want to learn more about our driver details, take a look at the below
2486
table of content:
2587

2688
.. toctree::
2789

2890
display-manager.rst
29-
dc-debug.rst
3091
dcn-overview.rst
92+
dcn-blocks.rst
3193
mpo-overview.rst
94+
dc-debug.rst
95+
display-contributing.rst
3296
dc-glossary.rst

drivers/gpu/drm/amd/amdgpu/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ amdgpu-y += amdgpu_device.o amdgpu_doorbell_mgr.o amdgpu_kms.o \
8080
amdgpu_umc.o smu_v11_0_i2c.o amdgpu_fru_eeprom.o amdgpu_rap.o \
8181
amdgpu_fw_attestation.o amdgpu_securedisplay.o \
8282
amdgpu_eeprom.o amdgpu_mca.o amdgpu_psp_ta.o amdgpu_lsdma.o \
83-
amdgpu_ring_mux.o amdgpu_xcp.o amdgpu_seq64.o
83+
amdgpu_ring_mux.o amdgpu_xcp.o amdgpu_seq64.o amdgpu_aca.o
8484

8585
amdgpu-$(CONFIG_PROC_FS) += amdgpu_fdinfo.o
8686

0 commit comments

Comments
 (0)