Michel Dänzer | 99fa7ce | 2018-05-29 18:39:04 +0200 | [diff] [blame] | 1 | ========================= |
| 2 | drm/amdgpu AMDgpu driver |
| 3 | ========================= |
| 4 | |
| 5 | The drm/amdgpu driver supports all AMD Radeon GPUs based on the Graphics Core |
| 6 | Next (GCN) architecture. |
Michel Dänzer | baca30f | 2018-05-29 18:33:41 +0200 | [diff] [blame] | 7 | |
Sonny Jiang | 8405cf3 | 2018-06-26 15:48:34 -0400 | [diff] [blame] | 8 | Module Parameters |
| 9 | ================= |
| 10 | |
| 11 | The amdgpu driver supports the following module parameters: |
| 12 | |
| 13 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c |
| 14 | |
Michel Dänzer | baca30f | 2018-05-29 18:33:41 +0200 | [diff] [blame] | 15 | Core Driver Infrastructure |
| 16 | ========================== |
| 17 | |
| 18 | This section covers core driver infrastructure. |
| 19 | |
Michel Dänzer | 0152ac1 | 2018-06-01 12:10:02 +0200 | [diff] [blame] | 20 | .. _amdgpu_memory_domains: |
| 21 | |
| 22 | Memory Domains |
| 23 | -------------- |
| 24 | |
| 25 | .. kernel-doc:: include/uapi/drm/amdgpu_drm.h |
| 26 | :doc: memory domains |
| 27 | |
Michel Dänzer | a2d19d6 | 2018-06-01 12:30:44 +0200 | [diff] [blame] | 28 | Buffer 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änzer | baca30f | 2018-05-29 18:33:41 +0200 | [diff] [blame] | 37 | PRIME Buffer Sharing |
| 38 | -------------------- |
| 39 | |
Mauro Carvalho Chehab | fbebaa7 | 2019-05-29 20:23:42 -0300 | [diff] [blame] | 40 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c |
Michel Dänzer | baca30f | 2018-05-29 18:33:41 +0200 | [diff] [blame] | 41 | :doc: PRIME Buffer Sharing |
| 42 | |
Mauro Carvalho Chehab | fbebaa7 | 2019-05-29 20:23:42 -0300 | [diff] [blame] | 43 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c |
Michel Dänzer | baca30f | 2018-05-29 18:33:41 +0200 | [diff] [blame] | 44 | :internal: |
Christian König | ad7f0b6 | 2018-06-05 11:47:43 +0200 | [diff] [blame] | 45 | |
| 46 | MMU 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 Grodzovsky | 7fc48e5 | 2018-06-11 11:11:24 -0400 | [diff] [blame] | 54 | |
| 55 | AMDGPU 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änzer | ab3ec8a | 2018-06-14 11:59:20 +0200 | [diff] [blame] | 62 | :internal: |
Slava Abramov | 923ff76 | 2018-06-07 17:27:07 -0400 | [diff] [blame] | 63 | |
| 64 | Interrupt 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 Grodzovsky | 7fc48e5 | 2018-06-11 11:11:24 -0400 | [diff] [blame] | 71 | :internal: |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 72 | |
Ryan Taylor | 52ef3a1 | 2020-09-15 14:16:34 -0700 | [diff] [blame] | 73 | IP 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 Denis | 1c1e53f | 2019-05-24 09:15:17 -0400 | [diff] [blame] | 82 | AMDGPU XGMI Support |
| 83 | =================== |
| 84 | |
| 85 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c |
Tom St Denis | 1c1e53f | 2019-05-24 09:15:17 -0400 | [diff] [blame] | 86 | |
Alex Deucher | f77c710 | 2019-09-19 15:09:56 -0500 | [diff] [blame] | 87 | AMDGPU RAS Support |
| 88 | ================== |
| 89 | |
Alex Deucher | ef177d1 | 2019-10-30 14:40:09 -0400 | [diff] [blame] | 90 | The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and |
| 91 | debugfs (for error injection). |
| 92 | |
Alex Deucher | f77c710 | 2019-09-19 15:09:56 -0500 | [diff] [blame] | 93 | RAS debugfs/sysfs Control and Error Injection Interfaces |
| 94 | -------------------------------------------------------- |
Tom St Denis | 74abc22 | 2019-05-24 09:21:54 -0400 | [diff] [blame] | 95 | |
| 96 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c |
| 97 | :doc: AMDGPU RAS debugfs control interface |
| 98 | |
Alex Deucher | ef177d1 | 2019-10-30 14:40:09 -0400 | [diff] [blame] | 99 | RAS 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 Deucher | f77c710 | 2019-09-19 15:09:56 -0500 | [diff] [blame] | 105 | RAS 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 | |
| 111 | RAS 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 | |
| 117 | RAS 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 Denis | 74abc22 | 2019-05-24 09:21:54 -0400 | [diff] [blame] | 122 | |
Alex Deucher | ef177d1 | 2019-10-30 14:40:09 -0400 | [diff] [blame] | 123 | Sample Code |
| 124 | ----------- |
| 125 | Sample code for testing error injection can be found here: |
| 126 | https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c |
| 127 | |
| 128 | This is part of the libdrm amdgpu unit tests which cover several areas of the GPU. |
| 129 | There are four sets of tests: |
| 130 | |
| 131 | RAS Basic Test |
| 132 | |
| 133 | The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files |
| 134 | are present. |
| 135 | |
| 136 | RAS Query Test |
| 137 | |
| 138 | This test checks the RAS availability and enablement status for each supported IP block as well as |
| 139 | the error counts. |
| 140 | |
| 141 | RAS Inject Test |
| 142 | |
| 143 | This test injects errors for each IP. |
| 144 | |
| 145 | RAS Disable Test |
| 146 | |
| 147 | This test tests disabling of RAS features for each IP block. |
| 148 | |
Tom St Denis | 74abc22 | 2019-05-24 09:21:54 -0400 | [diff] [blame] | 149 | |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 150 | GPU Power/Thermal Controls and Monitoring |
| 151 | ========================================= |
| 152 | |
| 153 | This section covers hwmon and power/thermal controls. |
| 154 | |
| 155 | HWMON Interfaces |
| 156 | ---------------- |
| 157 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 158 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 159 | :doc: hwmon |
| 160 | |
| 161 | GPU sysfs Power State Interfaces |
| 162 | -------------------------------- |
| 163 | |
| 164 | GPU power controls are exposed via sysfs files. |
| 165 | |
| 166 | power_dpm_state |
| 167 | ~~~~~~~~~~~~~~~ |
| 168 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 169 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 170 | :doc: power_dpm_state |
| 171 | |
| 172 | power_dpm_force_performance_level |
| 173 | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 174 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 175 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 176 | :doc: power_dpm_force_performance_level |
| 177 | |
| 178 | pp_table |
| 179 | ~~~~~~~~ |
| 180 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 181 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 182 | :doc: pp_table |
| 183 | |
| 184 | pp_od_clk_voltage |
| 185 | ~~~~~~~~~~~~~~~~~ |
| 186 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 187 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 188 | :doc: pp_od_clk_voltage |
| 189 | |
Alex Deucher | a667b75 | 2019-09-19 15:03:27 -0500 | [diff] [blame] | 190 | pp_dpm_* |
| 191 | ~~~~~~~~ |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 192 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 193 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | a667b75 | 2019-09-19 15:03:27 -0500 | [diff] [blame] | 194 | :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 195 | |
| 196 | pp_power_profile_mode |
| 197 | ~~~~~~~~~~~~~~~~~~~~~ |
| 198 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 199 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 200 | :doc: pp_power_profile_mode |
| 201 | |
Mauro Carvalho Chehab | 39ec39d | 2020-10-13 13:54:20 +0200 | [diff] [blame] | 202 | \*_busy_percent |
| 203 | ~~~~~~~~~~~~~~~ |
Tom St Denis | b374d82 | 2018-06-20 07:55:39 -0400 | [diff] [blame] | 204 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 205 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | da9cebe | 2020-06-15 16:36:49 -0400 | [diff] [blame] | 206 | :doc: gpu_busy_percent |
| 207 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 208 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Alex Deucher | da9cebe | 2020-06-15 16:36:49 -0400 | [diff] [blame] | 209 | :doc: mem_busy_percent |
Kent Russell | bd60716 | 2020-03-13 09:21:55 -0400 | [diff] [blame] | 210 | |
Evan Quan | 25c933b | 2020-07-23 18:03:35 +0800 | [diff] [blame] | 211 | gpu_metrics |
| 212 | ~~~~~~~~~~~~~~~~~~~~~ |
| 213 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 214 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Evan Quan | 25c933b | 2020-07-23 18:03:35 +0800 | [diff] [blame] | 215 | :doc: gpu_metrics |
| 216 | |
Kent Russell | bd60716 | 2020-03-13 09:21:55 -0400 | [diff] [blame] | 217 | GPU Product Information |
| 218 | ======================= |
| 219 | |
| 220 | Information about the GPU can be obtained on certain cards |
| 221 | via sysfs |
| 222 | |
| 223 | product_name |
| 224 | ------------ |
| 225 | |
| 226 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 227 | :doc: product_name |
| 228 | |
| 229 | product_number |
| 230 | -------------- |
| 231 | |
| 232 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 233 | :doc: product_name |
| 234 | |
| 235 | serial_number |
| 236 | ------------- |
| 237 | |
| 238 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 239 | :doc: serial_number |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 240 | |
Kent Russell | 18485be | 2020-03-20 09:19:01 -0400 | [diff] [blame] | 241 | unique_id |
| 242 | --------- |
| 243 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 244 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Kent Russell | 18485be | 2020-03-20 09:19:01 -0400 | [diff] [blame] | 245 | :doc: unique_id |
| 246 | |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 247 | GPU Memory Usage Information |
| 248 | ============================ |
| 249 | |
| 250 | Various memory accounting can be accessed via sysfs |
| 251 | |
| 252 | mem_info_vram_total |
| 253 | ------------------- |
| 254 | |
| 255 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |
| 256 | :doc: mem_info_vram_total |
| 257 | |
| 258 | mem_info_vram_used |
| 259 | ------------------ |
| 260 | |
| 261 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |
| 262 | :doc: mem_info_vram_used |
| 263 | |
| 264 | mem_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 | |
| 270 | mem_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 | |
| 276 | mem_info_gtt_total |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 277 | ------------------ |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 278 | |
| 279 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c |
| 280 | :doc: mem_info_gtt_total |
| 281 | |
| 282 | mem_info_gtt_used |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 283 | ----------------- |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 284 | |
| 285 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c |
| 286 | :doc: mem_info_gtt_used |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 287 | |
| 288 | PCIe Accounting Information |
| 289 | =========================== |
| 290 | |
| 291 | pcie_bw |
| 292 | ------- |
| 293 | |
Randy Dunlap | 778879b | 2020-08-23 15:35:36 -0700 | [diff] [blame] | 294 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 295 | :doc: pcie_bw |
| 296 | |
| 297 | pcie_replay_count |
| 298 | ----------------- |
| 299 | |
| 300 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 301 | :doc: pcie_replay_count |
| 302 | |
Alex Deucher | d08ce8c | 2021-09-29 13:42:08 -0400 | [diff] [blame] | 303 | GPU SmartShift Information |
| 304 | ========================== |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 305 | |
Sathishkumar S | a7673a1 | 2021-05-30 09:45:26 +0530 | [diff] [blame] | 306 | GPU SmartShift information via sysfs |
| 307 | |
| 308 | smartshift_apu_power |
| 309 | -------------------- |
| 310 | |
| 311 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
| 312 | :doc: smartshift_apu_power |
| 313 | |
| 314 | smartshift_dgpu_power |
| 315 | --------------------- |
| 316 | |
| 317 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
| 318 | :doc: smartshift_dgpu_power |
Sathishkumar S | 30d95a3 | 2021-05-30 10:47:16 +0530 | [diff] [blame] | 319 | |
| 320 | smartshift_bias |
| 321 | --------------- |
| 322 | |
| 323 | .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c |
| 324 | :doc: smartshift_bias |