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
90 The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and
91 debugfs (for error injection).
93 RAS debugfs/sysfs Control and Error Injection Interfaces
94 --------------------------------------------------------
96 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
97 :doc: AMDGPU RAS debugfs control interface
99 RAS Reboot Behavior for Unrecoverable Errors
100 --------------------------------------------------------
102 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
103 :doc: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
105 RAS Error Count sysfs Interface
106 -------------------------------
108 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
109 :doc: AMDGPU RAS sysfs Error Count Interface
111 RAS EEPROM debugfs Interface
112 ----------------------------
114 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
115 :doc: AMDGPU RAS debugfs EEPROM table reset interface
117 RAS VRAM Bad Pages sysfs Interface
118 ----------------------------------
120 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
121 :doc: AMDGPU RAS sysfs gpu_vram_bad_pages Interface
125 Sample code for testing error injection can be found here:
126 https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c
128 This is part of the libdrm amdgpu unit tests which cover several areas of the GPU.
129 There are four sets of tests:
133 The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files
138 This test checks the RAS availability and enablement status for each supported IP block as well as
143 This test injects errors for each IP.
147 This test tests disabling of RAS features for each IP block.
150 GPU Power/Thermal Controls and Monitoring
151 =========================================
153 This section covers hwmon and power/thermal controls.
158 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
161 GPU sysfs Power State Interfaces
162 --------------------------------
164 GPU power controls are exposed via sysfs files.
169 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
170 :doc: power_dpm_state
172 power_dpm_force_performance_level
173 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
175 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
176 :doc: power_dpm_force_performance_level
181 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
187 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
188 :doc: pp_od_clk_voltage
193 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
194 :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
196 pp_power_profile_mode
197 ~~~~~~~~~~~~~~~~~~~~~
199 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
200 :doc: pp_power_profile_mode
205 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
206 :doc: gpu_busy_percent
208 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
209 :doc: mem_busy_percent
212 ~~~~~~~~~~~~~~~~~~~~~
214 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
217 GPU Product Information
218 =======================
220 Information about the GPU can be obtained on certain cards
226 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
232 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
238 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
244 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
247 GPU Memory Usage Information
248 ============================
250 Various memory accounting can be accessed via sysfs
255 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
256 :doc: mem_info_vram_total
261 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
262 :doc: mem_info_vram_used
264 mem_info_vis_vram_total
265 -----------------------
267 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
268 :doc: mem_info_vis_vram_total
270 mem_info_vis_vram_used
271 ----------------------
273 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
274 :doc: mem_info_vis_vram_used
279 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
280 :doc: mem_info_gtt_total
285 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
286 :doc: mem_info_gtt_used
288 PCIe Accounting Information
289 ===========================
294 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
300 .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
301 :doc: pcie_replay_count
303 +GPU SmartShift Information
304 ============================
306 GPU SmartShift information via sysfs
311 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
312 :doc: smartshift_apu_power
314 smartshift_dgpu_power
315 ---------------------
317 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
318 :doc: smartshift_dgpu_power
323 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
324 :doc: smartshift_bias