blob: 8ba72e898099ea3cba7db5d6756bbc3a85cb7948 [file] [log] [blame]
Michel Dänzer99fa7ce2018-05-29 18:39:04 +02001=========================
2 drm/amdgpu AMDgpu driver
3=========================
4
5The drm/amdgpu driver supports all AMD Radeon GPUs based on the Graphics Core
6Next (GCN) architecture.
Michel Dänzerbaca30f2018-05-29 18:33:41 +02007
Sonny Jiang8405cf32018-06-26 15:48:34 -04008Module Parameters
9=================
10
11The amdgpu driver supports the following module parameters:
12
13.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
14
Michel Dänzerbaca30f2018-05-29 18:33:41 +020015Core Driver Infrastructure
16==========================
17
18This section covers core driver infrastructure.
19
Michel Dänzer0152ac12018-06-01 12:10:02 +020020.. _amdgpu_memory_domains:
21
22Memory Domains
23--------------
24
25.. kernel-doc:: include/uapi/drm/amdgpu_drm.h
26 :doc: memory domains
27
Michel Dänzera2d19d62018-06-01 12:30:44 +020028Buffer 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
Michel Dänzerbaca30f2018-05-29 18:33:41 +020037PRIME Buffer Sharing
38--------------------
39
Mauro Carvalho Chehabfbebaa72019-05-29 20:23:42 -030040.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
Michel Dänzerbaca30f2018-05-29 18:33:41 +020041 :doc: PRIME Buffer Sharing
42
Mauro Carvalho Chehabfbebaa72019-05-29 20:23:42 -030043.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
Michel Dänzerbaca30f2018-05-29 18:33:41 +020044 :internal:
Christian Königad7f0b62018-06-05 11:47:43 +020045
46MMU 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:
Andrey Grodzovsky7fc48e52018-06-11 11:11:24 -040054
55AMDGPU 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
Michel Dänzerab3ec8a2018-06-14 11:59:20 +020062 :internal:
Slava Abramov923ff762018-06-07 17:27:07 -040063
64Interrupt 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
Andrey Grodzovsky7fc48e52018-06-11 11:11:24 -040071 :internal:
Alex Deucherdc85db22018-06-01 12:28:14 -050072
Ryan Taylor52ef3a12020-09-15 14:16:34 -070073IP 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
Tom St Denis1c1e53f2019-05-24 09:15:17 -040082AMDGPU XGMI Support
83===================
84
85.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
Tom St Denis1c1e53f2019-05-24 09:15:17 -040086
Alex Deucherf77c7102019-09-19 15:09:56 -050087AMDGPU RAS Support
88==================
89
Alex Deucheref177d12019-10-30 14:40:09 -040090The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and
91debugfs (for error injection).
92
Alex Deucherf77c7102019-09-19 15:09:56 -050093RAS debugfs/sysfs Control and Error Injection Interfaces
94--------------------------------------------------------
Tom St Denis74abc222019-05-24 09:21:54 -040095
96.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
97 :doc: AMDGPU RAS debugfs control interface
98
Alex Deucheref177d12019-10-30 14:40:09 -040099RAS Reboot Behavior for Unrecoverable Errors
100--------------------------------------------------------
101
102.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
103 :doc: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
104
Alex Deucherf77c7102019-09-19 15:09:56 -0500105RAS Error Count sysfs Interface
106-------------------------------
107
108.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
109 :doc: AMDGPU RAS sysfs Error Count Interface
110
111RAS EEPROM debugfs Interface
112----------------------------
113
114.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
115 :doc: AMDGPU RAS debugfs EEPROM table reset interface
116
117RAS VRAM Bad Pages sysfs Interface
118----------------------------------
119
120.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
121 :doc: AMDGPU RAS sysfs gpu_vram_bad_pages Interface
Tom St Denis74abc222019-05-24 09:21:54 -0400122
Alex Deucheref177d12019-10-30 14:40:09 -0400123Sample Code
124-----------
125Sample code for testing error injection can be found here:
126https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c
127
128This is part of the libdrm amdgpu unit tests which cover several areas of the GPU.
129There are four sets of tests:
130
131RAS Basic Test
132
133The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files
134are present.
135
136RAS Query Test
137
138This test checks the RAS availability and enablement status for each supported IP block as well as
139the error counts.
140
141RAS Inject Test
142
143This test injects errors for each IP.
144
145RAS Disable Test
146
147This test tests disabling of RAS features for each IP block.
148
Tom St Denis74abc222019-05-24 09:21:54 -0400149
Alex Deucherdc85db22018-06-01 12:28:14 -0500150GPU Power/Thermal Controls and Monitoring
151=========================================
152
153This section covers hwmon and power/thermal controls.
154
155HWMON Interfaces
156----------------
157
Randy Dunlap778879b2020-08-23 15:35:36 -0700158.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherdc85db22018-06-01 12:28:14 -0500159 :doc: hwmon
160
161GPU sysfs Power State Interfaces
162--------------------------------
163
164GPU power controls are exposed via sysfs files.
165
166power_dpm_state
167~~~~~~~~~~~~~~~
168
Randy Dunlap778879b2020-08-23 15:35:36 -0700169.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherdc85db22018-06-01 12:28:14 -0500170 :doc: power_dpm_state
171
172power_dpm_force_performance_level
173~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
174
Randy Dunlap778879b2020-08-23 15:35:36 -0700175.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherdc85db22018-06-01 12:28:14 -0500176 :doc: power_dpm_force_performance_level
177
178pp_table
179~~~~~~~~
180
Randy Dunlap778879b2020-08-23 15:35:36 -0700181.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherdc85db22018-06-01 12:28:14 -0500182 :doc: pp_table
183
184pp_od_clk_voltage
185~~~~~~~~~~~~~~~~~
186
Randy Dunlap778879b2020-08-23 15:35:36 -0700187.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherdc85db22018-06-01 12:28:14 -0500188 :doc: pp_od_clk_voltage
189
Alex Deuchera667b752019-09-19 15:03:27 -0500190pp_dpm_*
191~~~~~~~~
Alex Deucherdc85db22018-06-01 12:28:14 -0500192
Randy Dunlap778879b2020-08-23 15:35:36 -0700193.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deuchera667b752019-09-19 15:03:27 -0500194 :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
Alex Deucherdc85db22018-06-01 12:28:14 -0500195
196pp_power_profile_mode
197~~~~~~~~~~~~~~~~~~~~~
198
Randy Dunlap778879b2020-08-23 15:35:36 -0700199.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherdc85db22018-06-01 12:28:14 -0500200 :doc: pp_power_profile_mode
201
Mauro Carvalho Chehab39ec39d2020-10-13 13:54:20 +0200202\*_busy_percent
203~~~~~~~~~~~~~~~
Tom St Denisb374d822018-06-20 07:55:39 -0400204
Randy Dunlap778879b2020-08-23 15:35:36 -0700205.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherda9cebe2020-06-15 16:36:49 -0400206 :doc: gpu_busy_percent
207
Randy Dunlap778879b2020-08-23 15:35:36 -0700208.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Alex Deucherda9cebe2020-06-15 16:36:49 -0400209 :doc: mem_busy_percent
Kent Russellbd607162020-03-13 09:21:55 -0400210
Evan Quan25c933b2020-07-23 18:03:35 +0800211gpu_metrics
212~~~~~~~~~~~~~~~~~~~~~
213
Randy Dunlap778879b2020-08-23 15:35:36 -0700214.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Evan Quan25c933b2020-07-23 18:03:35 +0800215 :doc: gpu_metrics
216
Kent Russellbd607162020-03-13 09:21:55 -0400217GPU Product Information
218=======================
219
220Information about the GPU can be obtained on certain cards
221via sysfs
222
223product_name
224------------
225
226.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
227 :doc: product_name
228
229product_number
230--------------
231
232.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
233 :doc: product_name
234
235serial_number
236-------------
237
238.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
239 :doc: serial_number
Kent Russell1d90c132020-03-19 15:03:40 -0400240
Kent Russell18485be2020-03-20 09:19:01 -0400241unique_id
242---------
243
Randy Dunlap778879b2020-08-23 15:35:36 -0700244.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Kent Russell18485be2020-03-20 09:19:01 -0400245 :doc: unique_id
246
Kent Russell1d90c132020-03-19 15:03:40 -0400247GPU Memory Usage Information
248============================
249
250Various memory accounting can be accessed via sysfs
251
252mem_info_vram_total
253-------------------
254
255.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
256 :doc: mem_info_vram_total
257
258mem_info_vram_used
259------------------
260
261.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
262 :doc: mem_info_vram_used
263
264mem_info_vis_vram_total
265-----------------------
266
267.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
268 :doc: mem_info_vis_vram_total
269
270mem_info_vis_vram_used
271----------------------
272
273.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
274 :doc: mem_info_vis_vram_used
275
276mem_info_gtt_total
Kent Russell1af8e762020-03-20 09:17:21 -0400277------------------
Kent Russell1d90c132020-03-19 15:03:40 -0400278
279.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
280 :doc: mem_info_gtt_total
281
282mem_info_gtt_used
Kent Russell1af8e762020-03-20 09:17:21 -0400283-----------------
Kent Russell1d90c132020-03-19 15:03:40 -0400284
285.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
286 :doc: mem_info_gtt_used
Kent Russell1af8e762020-03-20 09:17:21 -0400287
288PCIe Accounting Information
289===========================
290
291pcie_bw
292-------
293
Randy Dunlap778879b2020-08-23 15:35:36 -0700294.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
Kent Russell1af8e762020-03-20 09:17:21 -0400295 :doc: pcie_bw
296
297pcie_replay_count
298-----------------
299
300.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
301 :doc: pcie_replay_count
302
Alex Deucherd08ce8c2021-09-29 13:42:08 -0400303GPU SmartShift Information
304==========================
Kent Russell1af8e762020-03-20 09:17:21 -0400305
Sathishkumar Sa7673a12021-05-30 09:45:26 +0530306GPU SmartShift information via sysfs
307
308smartshift_apu_power
309--------------------
310
311.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
312 :doc: smartshift_apu_power
313
314smartshift_dgpu_power
315---------------------
316
317.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
318 :doc: smartshift_dgpu_power
Sathishkumar S30d95a32021-05-30 10:47:16 +0530319
320smartshift_bias
321---------------
322
323.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
324 :doc: smartshift_bias