1 =========================
2 drm/amdgpu AMDgpu driver
3 =========================
5 The drm/amdgpu driver supports all AMD Radeon GPUs based on the Graphics Core
6 Next (GCN) architecture.
11 The amdgpu driver supports the following module parameters:
13 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
15 Core Driver Infrastructure
16 ==========================
18 This section covers core driver infrastructure.
20 .. _amdgpu_memory_domains:
25 .. kernel-doc:: include/uapi/drm/amdgpu_drm.h
31 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
34 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
40 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
41 :doc: PRIME Buffer Sharing
43 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
49 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
52 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
58 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
61 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
67 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
68 :doc: Interrupt Handling
70 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
76 .. kernel-doc:: drivers/gpu/drm/amd/include/amd_shared.h
79 .. kernel-doc:: drivers/gpu/drm/amd/include/amd_shared.h
80 :identifiers: amd_ip_block_type amd_ip_funcs
85 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
86 :doc: AMDGPU XGMI Support
88 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
94 The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and
95 debugfs (for error injection).
97 RAS debugfs/sysfs Control and Error Injection Interfaces
98 --------------------------------------------------------
100 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
101 :doc: AMDGPU RAS debugfs control interface
103 RAS Reboot Behavior for Unrecoverable Errors
104 --------------------------------------------------------
106 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
107 :doc: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
109 RAS Error Count sysfs Interface
110 -------------------------------
112 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
113 :doc: AMDGPU RAS sysfs Error Count Interface
115 RAS EEPROM debugfs Interface
116 ----------------------------
118 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
119 :doc: AMDGPU RAS debugfs EEPROM table reset interface
121 RAS VRAM Bad Pages sysfs Interface
122 ----------------------------------
124 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
125 :doc: AMDGPU RAS sysfs gpu_vram_bad_pages Interface
127 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
132 Sample code for testing error injection can be found here:
133 https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c
135 This is part of the libdrm amdgpu unit tests which cover several areas of the GPU.
136 There are four sets of tests:
140 The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files
145 This test checks the RAS availability and enablement status for each supported IP block as well as
150 This test injects errors for each IP.
154 This test tests disabling of RAS features for each IP block.
157 GPU Power/Thermal Controls and Monitoring
158 =========================================
160 This section covers hwmon and power/thermal controls.
165 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
168 GPU sysfs Power State Interfaces
169 --------------------------------
171 GPU power controls are exposed via sysfs files.
176 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
177 :doc: power_dpm_state
179 power_dpm_force_performance_level
180 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
183 :doc: power_dpm_force_performance_level
188 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
194 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
195 :doc: pp_od_clk_voltage
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
203 pp_power_profile_mode
204 ~~~~~~~~~~~~~~~~~~~~~
206 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
207 :doc: pp_power_profile_mode
212 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
213 :doc: gpu_busy_percent
215 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
216 :doc: mem_busy_percent
219 ~~~~~~~~~~~~~~~~~~~~~
221 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
224 GPU Product Information
225 =======================
227 Information about the GPU can be obtained on certain cards
233 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
239 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
245 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
251 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
254 GPU Memory Usage Information
255 ============================
257 Various memory accounting can be accessed via sysfs
262 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
263 :doc: mem_info_vram_total
268 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
269 :doc: mem_info_vram_used
271 mem_info_vis_vram_total
272 -----------------------
274 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
275 :doc: mem_info_vis_vram_total
277 mem_info_vis_vram_used
278 ----------------------
280 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
281 :doc: mem_info_vis_vram_used
286 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
287 :doc: mem_info_gtt_total
292 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
293 :doc: mem_info_gtt_used
295 PCIe Accounting Information
296 ===========================
301 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
307 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
308 :doc: pcie_replay_count