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 73IP 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 82AMDGPU XGMI Support 83=================== 84 85.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c 86 87AMDGPU RAS Support 88================== 89 90The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and 91debugfs (for error injection). 92 93RAS debugfs/sysfs Control and Error Injection Interfaces 94-------------------------------------------------------- 95 96.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c 97 :doc: AMDGPU RAS debugfs control interface 98 99RAS 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 105RAS 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 122 123Sample 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 149 150GPU Power/Thermal Controls and Monitoring 151========================================= 152 153This section covers hwmon and power/thermal controls. 154 155HWMON Interfaces 156---------------- 157 158.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 159 :doc: hwmon 160 161GPU sysfs Power State Interfaces 162-------------------------------- 163 164GPU power controls are exposed via sysfs files. 165 166power_dpm_state 167~~~~~~~~~~~~~~~ 168 169.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 170 :doc: power_dpm_state 171 172power_dpm_force_performance_level 173~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 174 175.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 176 :doc: power_dpm_force_performance_level 177 178pp_table 179~~~~~~~~ 180 181.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 182 :doc: pp_table 183 184pp_od_clk_voltage 185~~~~~~~~~~~~~~~~~ 186 187.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 188 :doc: pp_od_clk_voltage 189 190pp_dpm_* 191~~~~~~~~ 192 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 195 196pp_power_profile_mode 197~~~~~~~~~~~~~~~~~~~~~ 198 199.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 200 :doc: pp_power_profile_mode 201 202\*_busy_percent 203~~~~~~~~~~~~~~~ 204 205.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 206 :doc: gpu_busy_percent 207 208.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 209 :doc: mem_busy_percent 210 211gpu_metrics 212~~~~~~~~~~~~~~~~~~~~~ 213 214.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 215 :doc: gpu_metrics 216 217GPU 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 240 241unique_id 242--------- 243 244.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 245 :doc: unique_id 246 247GPU 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 277------------------ 278 279.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c 280 :doc: mem_info_gtt_total 281 282mem_info_gtt_used 283----------------- 284 285.. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c 286 :doc: mem_info_gtt_used 287 288PCIe Accounting Information 289=========================== 290 291pcie_bw 292------- 293 294.. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c 295 :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 303 304