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 | |
Tom St Denis | 1c1e53f | 2019-05-24 09:15:17 -0400 | [diff] [blame] | 73 | AMDGPU 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 | |
Alex Deucher | f77c710 | 2019-09-19 15:09:56 -0500 | [diff] [blame] | 82 | AMDGPU RAS Support |
| 83 | ================== |
| 84 | |
Alex Deucher | ef177d1 | 2019-10-30 14:40:09 -0400 | [diff] [blame] | 85 | The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and |
| 86 | debugfs (for error injection). |
| 87 | |
Alex Deucher | f77c710 | 2019-09-19 15:09:56 -0500 | [diff] [blame] | 88 | RAS debugfs/sysfs Control and Error Injection Interfaces |
| 89 | -------------------------------------------------------- |
Tom St Denis | 74abc22 | 2019-05-24 09:21:54 -0400 | [diff] [blame] | 90 | |
| 91 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c |
| 92 | :doc: AMDGPU RAS debugfs control interface |
| 93 | |
Alex Deucher | ef177d1 | 2019-10-30 14:40:09 -0400 | [diff] [blame] | 94 | RAS 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 | |
Alex Deucher | f77c710 | 2019-09-19 15:09:56 -0500 | [diff] [blame] | 100 | RAS 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 | |
| 106 | RAS 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 | |
| 112 | RAS 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 |
Tom St Denis | 74abc22 | 2019-05-24 09:21:54 -0400 | [diff] [blame] | 117 | |
| 118 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c |
| 119 | :internal: |
| 120 | |
Alex Deucher | ef177d1 | 2019-10-30 14:40:09 -0400 | [diff] [blame] | 121 | Sample Code |
| 122 | ----------- |
| 123 | Sample code for testing error injection can be found here: |
| 124 | https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c |
| 125 | |
| 126 | This is part of the libdrm amdgpu unit tests which cover several areas of the GPU. |
| 127 | There are four sets of tests: |
| 128 | |
| 129 | RAS Basic Test |
| 130 | |
| 131 | The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files |
| 132 | are present. |
| 133 | |
| 134 | RAS Query Test |
| 135 | |
| 136 | This test checks the RAS availability and enablement status for each supported IP block as well as |
| 137 | the error counts. |
| 138 | |
| 139 | RAS Inject Test |
| 140 | |
| 141 | This test injects errors for each IP. |
| 142 | |
| 143 | RAS Disable Test |
| 144 | |
| 145 | This test tests disabling of RAS features for each IP block. |
| 146 | |
Tom St Denis | 74abc22 | 2019-05-24 09:21:54 -0400 | [diff] [blame] | 147 | |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 148 | GPU Power/Thermal Controls and Monitoring |
| 149 | ========================================= |
| 150 | |
| 151 | This section covers hwmon and power/thermal controls. |
| 152 | |
| 153 | HWMON Interfaces |
| 154 | ---------------- |
| 155 | |
| 156 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 157 | :doc: hwmon |
| 158 | |
| 159 | GPU sysfs Power State Interfaces |
| 160 | -------------------------------- |
| 161 | |
| 162 | GPU power controls are exposed via sysfs files. |
| 163 | |
| 164 | power_dpm_state |
| 165 | ~~~~~~~~~~~~~~~ |
| 166 | |
| 167 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 168 | :doc: power_dpm_state |
| 169 | |
| 170 | power_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 | |
| 176 | pp_table |
| 177 | ~~~~~~~~ |
| 178 | |
| 179 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 180 | :doc: pp_table |
| 181 | |
| 182 | pp_od_clk_voltage |
| 183 | ~~~~~~~~~~~~~~~~~ |
| 184 | |
| 185 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 186 | :doc: pp_od_clk_voltage |
| 187 | |
Alex Deucher | a667b75 | 2019-09-19 15:03:27 -0500 | [diff] [blame] | 188 | pp_dpm_* |
| 189 | ~~~~~~~~ |
Alex Deucher | dc85db2 | 2018-06-01 12:28:14 -0500 | [diff] [blame] | 190 | |
| 191 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
Alex Deucher | a667b75 | 2019-09-19 15:03:27 -0500 | [diff] [blame] | 192 | :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] | 193 | |
| 194 | pp_power_profile_mode |
| 195 | ~~~~~~~~~~~~~~~~~~~~~ |
| 196 | |
| 197 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 198 | :doc: pp_power_profile_mode |
| 199 | |
Alex Deucher | da9cebe | 2020-06-15 16:36:49 -0400 | [diff] [blame] | 200 | *_busy_percent |
| 201 | ~~~~~~~~~~~~~~ |
Tom St Denis | b374d82 | 2018-06-20 07:55:39 -0400 | [diff] [blame] | 202 | |
| 203 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
Alex Deucher | da9cebe | 2020-06-15 16:36:49 -0400 | [diff] [blame] | 204 | :doc: gpu_busy_percent |
| 205 | |
| 206 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 207 | :doc: mem_busy_percent |
Kent Russell | bd60716 | 2020-03-13 09:21:55 -0400 | [diff] [blame] | 208 | |
| 209 | GPU Product Information |
| 210 | ======================= |
| 211 | |
| 212 | Information about the GPU can be obtained on certain cards |
| 213 | via sysfs |
| 214 | |
| 215 | product_name |
| 216 | ------------ |
| 217 | |
| 218 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 219 | :doc: product_name |
| 220 | |
| 221 | product_number |
| 222 | -------------- |
| 223 | |
| 224 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 225 | :doc: product_name |
| 226 | |
| 227 | serial_number |
| 228 | ------------- |
| 229 | |
| 230 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 231 | :doc: serial_number |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 232 | |
Kent Russell | 18485be | 2020-03-20 09:19:01 -0400 | [diff] [blame] | 233 | unique_id |
| 234 | --------- |
| 235 | |
| 236 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 237 | :doc: unique_id |
| 238 | |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 239 | GPU Memory Usage Information |
| 240 | ============================ |
| 241 | |
| 242 | Various memory accounting can be accessed via sysfs |
| 243 | |
| 244 | mem_info_vram_total |
| 245 | ------------------- |
| 246 | |
| 247 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |
| 248 | :doc: mem_info_vram_total |
| 249 | |
| 250 | mem_info_vram_used |
| 251 | ------------------ |
| 252 | |
| 253 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c |
| 254 | :doc: mem_info_vram_used |
| 255 | |
| 256 | mem_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 | |
| 262 | mem_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 | |
| 268 | mem_info_gtt_total |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 269 | ------------------ |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 270 | |
| 271 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c |
| 272 | :doc: mem_info_gtt_total |
| 273 | |
| 274 | mem_info_gtt_used |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 275 | ----------------- |
Kent Russell | 1d90c13 | 2020-03-19 15:03:40 -0400 | [diff] [blame] | 276 | |
| 277 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c |
| 278 | :doc: mem_info_gtt_used |
Kent Russell | 1af8e76 | 2020-03-20 09:17:21 -0400 | [diff] [blame] | 279 | |
| 280 | PCIe Accounting Information |
| 281 | =========================== |
| 282 | |
| 283 | pcie_bw |
| 284 | ------- |
| 285 | |
| 286 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c |
| 287 | :doc: pcie_bw |
| 288 | |
| 289 | pcie_replay_count |
| 290 | ----------------- |
| 291 | |
| 292 | .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |
| 293 | :doc: pcie_replay_count |
| 294 | |
| 295 | |