Merge tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
[sfrench/cifs-2.6.git] / Documentation / gpu / amdgpu.rst
1 =========================
2  drm/amdgpu AMDgpu driver
3 =========================
4
5 The drm/amdgpu driver supports all AMD Radeon GPUs based on the Graphics Core
6 Next (GCN) architecture.
7
8 Module Parameters
9 =================
10
11 The amdgpu driver supports the following module parameters:
12
13 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
14
15 Core Driver Infrastructure
16 ==========================
17
18 This section covers core driver infrastructure.
19
20 .. _amdgpu_memory_domains:
21
22 Memory Domains
23 --------------
24
25 .. kernel-doc:: include/uapi/drm/amdgpu_drm.h
26    :doc: memory domains
27
28 Buffer Objects
29 --------------
30
31 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
32    :doc: amdgpu_object
33
34 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
35    :internal:
36
37 PRIME Buffer Sharing
38 --------------------
39
40 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
41    :doc: PRIME Buffer Sharing
42
43 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
44    :internal:
45
46 MMU Notifier
47 ------------
48
49 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
50    :doc: MMU Notifier
51
52 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
53    :internal:
54
55 AMDGPU Virtual Memory
56 ---------------------
57
58 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
59    :doc: GPUVM
60
61 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
62    :internal:
63
64 Interrupt Handling
65 ------------------
66
67 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
68    :doc: Interrupt Handling
69
70 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
71    :internal:
72
73 IP Blocks
74 ------------------
75
76 .. kernel-doc:: drivers/gpu/drm/amd/include/amd_shared.h
77    :doc: IP Blocks
78
79 .. kernel-doc:: drivers/gpu/drm/amd/include/amd_shared.h
80    :identifiers: amd_ip_block_type amd_ip_funcs
81
82 AMDGPU XGMI Support
83 ===================
84
85 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
86    :doc: AMDGPU XGMI Support
87
88 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
89    :internal:
90
91 AMDGPU RAS Support
92 ==================
93
94 The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and
95 debugfs (for error injection).
96
97 RAS debugfs/sysfs Control and Error Injection Interfaces
98 --------------------------------------------------------
99
100 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
101    :doc: AMDGPU RAS debugfs control interface
102
103 RAS Reboot Behavior for Unrecoverable Errors
104 --------------------------------------------------------
105
106 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
107    :doc: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
108
109 RAS Error Count sysfs Interface
110 -------------------------------
111
112 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
113    :doc: AMDGPU RAS sysfs Error Count Interface
114
115 RAS EEPROM debugfs Interface
116 ----------------------------
117
118 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
119    :doc: AMDGPU RAS debugfs EEPROM table reset interface
120
121 RAS VRAM Bad Pages sysfs Interface
122 ----------------------------------
123
124 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
125    :doc: AMDGPU RAS sysfs gpu_vram_bad_pages Interface
126
127 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
128    :internal:
129
130 Sample Code
131 -----------
132 Sample code for testing error injection can be found here:
133 https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c
134
135 This is part of the libdrm amdgpu unit tests which cover several areas of the GPU.
136 There are four sets of tests:
137
138 RAS Basic Test
139
140 The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files
141 are present.
142
143 RAS Query Test
144
145 This test checks the RAS availability and enablement status for each supported IP block as well as
146 the error counts.
147
148 RAS Inject Test
149
150 This test injects errors for each IP.
151
152 RAS Disable Test
153
154 This test tests disabling of RAS features for each IP block.
155
156
157 GPU Power/Thermal Controls and Monitoring
158 =========================================
159
160 This section covers hwmon and power/thermal controls.
161
162 HWMON Interfaces
163 ----------------
164
165 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
166    :doc: hwmon
167
168 GPU sysfs Power State Interfaces
169 --------------------------------
170
171 GPU power controls are exposed via sysfs files.
172
173 power_dpm_state
174 ~~~~~~~~~~~~~~~
175
176 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
177    :doc: power_dpm_state
178
179 power_dpm_force_performance_level
180 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
181
182 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
183    :doc: power_dpm_force_performance_level
184
185 pp_table
186 ~~~~~~~~
187
188 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
189    :doc: pp_table
190
191 pp_od_clk_voltage
192 ~~~~~~~~~~~~~~~~~
193
194 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
195    :doc: pp_od_clk_voltage
196
197 pp_dpm_*
198 ~~~~~~~~
199
200 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
201    :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
202
203 pp_power_profile_mode
204 ~~~~~~~~~~~~~~~~~~~~~
205
206 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
207    :doc: pp_power_profile_mode
208
209 \*_busy_percent
210 ~~~~~~~~~~~~~~~
211
212 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
213    :doc: gpu_busy_percent
214
215 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
216    :doc: mem_busy_percent
217
218 gpu_metrics
219 ~~~~~~~~~~~~~~~~~~~~~
220
221 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
222    :doc: gpu_metrics
223
224 GPU Product Information
225 =======================
226
227 Information about the GPU can be obtained on certain cards
228 via sysfs
229
230 product_name
231 ------------
232
233 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
234    :doc: product_name
235
236 product_number
237 --------------
238
239 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
240    :doc: product_name
241
242 serial_number
243 -------------
244
245 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
246    :doc: serial_number
247
248 unique_id
249 ---------
250
251 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
252    :doc: unique_id
253
254 GPU Memory Usage Information
255 ============================
256
257 Various memory accounting can be accessed via sysfs
258
259 mem_info_vram_total
260 -------------------
261
262 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
263    :doc: mem_info_vram_total
264
265 mem_info_vram_used
266 ------------------
267
268 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
269    :doc: mem_info_vram_used
270
271 mem_info_vis_vram_total
272 -----------------------
273
274 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
275    :doc: mem_info_vis_vram_total
276
277 mem_info_vis_vram_used
278 ----------------------
279
280 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
281    :doc: mem_info_vis_vram_used
282
283 mem_info_gtt_total
284 ------------------
285
286 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
287    :doc: mem_info_gtt_total
288
289 mem_info_gtt_used
290 -----------------
291
292 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
293    :doc: mem_info_gtt_used
294
295 PCIe Accounting Information
296 ===========================
297
298 pcie_bw
299 -------
300
301 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
302    :doc: pcie_bw
303
304 pcie_replay_count
305 -----------------
306
307 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
308    :doc: pcie_replay_count
309
310