Linux Audio

Check our new training course

Embedded Linux training

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