amdgpu.rst 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303
  1. =========================
  2. drm/amdgpu AMDgpu driver
  3. =========================
  4. The drm/amdgpu driver supports all AMD Radeon GPUs based on the Graphics Core
  5. Next (GCN) architecture.
  6. Module Parameters
  7. =================
  8. The amdgpu driver supports the following module parameters:
  9. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
  10. Core Driver Infrastructure
  11. ==========================
  12. This section covers core driver infrastructure.
  13. .. _amdgpu_memory_domains:
  14. Memory Domains
  15. --------------
  16. .. kernel-doc:: include/uapi/drm/amdgpu_drm.h
  17. :doc: memory domains
  18. Buffer Objects
  19. --------------
  20. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
  21. :doc: amdgpu_object
  22. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
  23. :internal:
  24. PRIME Buffer Sharing
  25. --------------------
  26. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
  27. :doc: PRIME Buffer Sharing
  28. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_dma_buf.c
  29. :internal:
  30. MMU Notifier
  31. ------------
  32. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
  33. :doc: MMU Notifier
  34. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c
  35. :internal:
  36. AMDGPU Virtual Memory
  37. ---------------------
  38. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
  39. :doc: GPUVM
  40. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
  41. :internal:
  42. Interrupt Handling
  43. ------------------
  44. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
  45. :doc: Interrupt Handling
  46. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c
  47. :internal:
  48. IP Blocks
  49. ------------------
  50. .. kernel-doc:: drivers/gpu/drm/amd/include/amd_shared.h
  51. :doc: IP Blocks
  52. .. kernel-doc:: drivers/gpu/drm/amd/include/amd_shared.h
  53. :identifiers: amd_ip_block_type amd_ip_funcs
  54. AMDGPU XGMI Support
  55. ===================
  56. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c
  57. AMDGPU RAS Support
  58. ==================
  59. The AMDGPU RAS interfaces are exposed via sysfs (for informational queries) and
  60. debugfs (for error injection).
  61. RAS debugfs/sysfs Control and Error Injection Interfaces
  62. --------------------------------------------------------
  63. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
  64. :doc: AMDGPU RAS debugfs control interface
  65. RAS Reboot Behavior for Unrecoverable Errors
  66. --------------------------------------------------------
  67. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
  68. :doc: AMDGPU RAS Reboot Behavior for Unrecoverable Errors
  69. RAS Error Count sysfs Interface
  70. -------------------------------
  71. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
  72. :doc: AMDGPU RAS sysfs Error Count Interface
  73. RAS EEPROM debugfs Interface
  74. ----------------------------
  75. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
  76. :doc: AMDGPU RAS debugfs EEPROM table reset interface
  77. RAS VRAM Bad Pages sysfs Interface
  78. ----------------------------------
  79. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
  80. :doc: AMDGPU RAS sysfs gpu_vram_bad_pages Interface
  81. Sample Code
  82. -----------
  83. Sample code for testing error injection can be found here:
  84. https://cgit.freedesktop.org/mesa/drm/tree/tests/amdgpu/ras_tests.c
  85. This is part of the libdrm amdgpu unit tests which cover several areas of the GPU.
  86. There are four sets of tests:
  87. RAS Basic Test
  88. The test verifies the RAS feature enabled status and makes sure the necessary sysfs and debugfs files
  89. are present.
  90. RAS Query Test
  91. This test checks the RAS availability and enablement status for each supported IP block as well as
  92. the error counts.
  93. RAS Inject Test
  94. This test injects errors for each IP.
  95. RAS Disable Test
  96. This test tests disabling of RAS features for each IP block.
  97. GPU Power/Thermal Controls and Monitoring
  98. =========================================
  99. This section covers hwmon and power/thermal controls.
  100. HWMON Interfaces
  101. ----------------
  102. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  103. :doc: hwmon
  104. GPU sysfs Power State Interfaces
  105. --------------------------------
  106. GPU power controls are exposed via sysfs files.
  107. power_dpm_state
  108. ~~~~~~~~~~~~~~~
  109. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  110. :doc: power_dpm_state
  111. power_dpm_force_performance_level
  112. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  113. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  114. :doc: power_dpm_force_performance_level
  115. pp_table
  116. ~~~~~~~~
  117. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  118. :doc: pp_table
  119. pp_od_clk_voltage
  120. ~~~~~~~~~~~~~~~~~
  121. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  122. :doc: pp_od_clk_voltage
  123. pp_dpm_*
  124. ~~~~~~~~
  125. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  126. :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
  127. pp_power_profile_mode
  128. ~~~~~~~~~~~~~~~~~~~~~
  129. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  130. :doc: pp_power_profile_mode
  131. \*_busy_percent
  132. ~~~~~~~~~~~~~~~
  133. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  134. :doc: gpu_busy_percent
  135. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  136. :doc: mem_busy_percent
  137. gpu_metrics
  138. ~~~~~~~~~~~~~~~~~~~~~
  139. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  140. :doc: gpu_metrics
  141. GPU Product Information
  142. =======================
  143. Information about the GPU can be obtained on certain cards
  144. via sysfs
  145. product_name
  146. ------------
  147. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
  148. :doc: product_name
  149. product_number
  150. --------------
  151. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
  152. :doc: product_name
  153. serial_number
  154. -------------
  155. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
  156. :doc: serial_number
  157. unique_id
  158. ---------
  159. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  160. :doc: unique_id
  161. GPU Memory Usage Information
  162. ============================
  163. Various memory accounting can be accessed via sysfs
  164. mem_info_vram_total
  165. -------------------
  166. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
  167. :doc: mem_info_vram_total
  168. mem_info_vram_used
  169. ------------------
  170. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
  171. :doc: mem_info_vram_used
  172. mem_info_vis_vram_total
  173. -----------------------
  174. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
  175. :doc: mem_info_vis_vram_total
  176. mem_info_vis_vram_used
  177. ----------------------
  178. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c
  179. :doc: mem_info_vis_vram_used
  180. mem_info_gtt_total
  181. ------------------
  182. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
  183. :doc: mem_info_gtt_total
  184. mem_info_gtt_used
  185. -----------------
  186. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
  187. :doc: mem_info_gtt_used
  188. PCIe Accounting Information
  189. ===========================
  190. pcie_bw
  191. -------
  192. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  193. :doc: pcie_bw
  194. pcie_replay_count
  195. -----------------
  196. .. kernel-doc:: drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
  197. :doc: pcie_replay_count