debugfs.rst 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. ==============
  2. AMDGPU DebugFS
  3. ==============
  4. The amdgpu driver provides a number of debugfs files to aid in debugging
  5. issues in the driver. These are usually found in
  6. /sys/kernel/debug/dri/<num>.
  7. DebugFS Files
  8. =============
  9. amdgpu_benchmark
  10. ----------------
  11. Run benchmarks using the DMA engine the driver uses for GPU memory paging.
  12. Write a number to the file to run the test. The results are written to the
  13. kernel log. VRAM is on device memory (dGPUs) or carve out (APUs) and GTT
  14. (Graphics Translation Tables) is system memory that is accessible by the GPU.
  15. The following tests are available:
  16. - 1: simple test, VRAM to GTT and GTT to VRAM
  17. - 2: simple test, VRAM to VRAM
  18. - 3: GTT to VRAM, buffer size sweep, powers of 2
  19. - 4: VRAM to GTT, buffer size sweep, powers of 2
  20. - 5: VRAM to VRAM, buffer size sweep, powers of 2
  21. - 6: GTT to VRAM, buffer size sweep, common display sizes
  22. - 7: VRAM to GTT, buffer size sweep, common display sizes
  23. - 8: VRAM to VRAM, buffer size sweep, common display sizes
  24. amdgpu_test_ib
  25. --------------
  26. Read this file to run simple IB (Indirect Buffer) tests on all kernel managed
  27. rings. IBs are command buffers usually generated by userspace applications
  28. which are submitted to the kernel for execution on an particular GPU engine.
  29. This just runs the simple IB tests included in the kernel. These tests
  30. are engine specific and verify that IB submission works.
  31. amdgpu_discovery
  32. ----------------
  33. Provides raw access to the IP discovery binary provided by the GPU. Read this
  34. file to access the raw binary. This is useful for verifying the contents of
  35. the IP discovery table. It is chip specific.
  36. amdgpu_vbios
  37. ------------
  38. Provides raw access to the ROM binary image from the GPU. Read this file to
  39. access the raw binary. This is useful for verifying the contents of the
  40. video BIOS ROM. It is board specific.
  41. amdgpu_evict_gtt
  42. ----------------
  43. Evict all buffers from the GTT memory pool. Read this file to evict all
  44. buffers from this pool.
  45. amdgpu_evict_vram
  46. -----------------
  47. Evict all buffers from the VRAM memory pool. Read this file to evict all
  48. buffers from this pool.
  49. amdgpu_gpu_recover
  50. ------------------
  51. Trigger a GPU reset. Read this file to trigger reset the entire GPU.
  52. All work currently running on the GPU will be lost.
  53. amdgpu_ring_<name>
  54. ------------------
  55. Provides read access to the kernel managed ring buffers for each ring <name>.
  56. These are useful for debugging problems on a particular ring. The ring buffer
  57. is how the CPU sends commands to the GPU. The CPU writes commands into the
  58. buffer and then asks the GPU engine to process it. This is the raw binary
  59. contents of the ring buffer. Use a tool like UMR to decode the rings into human
  60. readable form.
  61. amdgpu_mqd_<name>
  62. -----------------
  63. Provides read access to the kernel managed MQD (Memory Queue Descriptor) for
  64. ring <name> managed by the kernel driver. MQDs define the features of the ring
  65. and are used to store the ring's state when it is not connected to hardware.
  66. The driver writes the requested ring features and metadata (GPU addresses of
  67. the ring itself and associated buffers) to the MQD and the firmware uses the MQD
  68. to populate the hardware when the ring is mapped to a hardware slot. Only
  69. available on engines which use MQDs. This provides access to the raw MQD
  70. binary.
  71. amdgpu_error_<name>
  72. -------------------
  73. Provides an interface to set an error code on the dma fences associated with
  74. ring <name>. The error code specified is propagated to all fences associated
  75. with the ring. Use this to inject a fence error into a ring.
  76. amdgpu_pm_info
  77. --------------
  78. Provides human readable information about the power management features
  79. and state of the GPU. This includes current GFX clock, Memory clock,
  80. voltages, average SoC power, temperature, GFX load, Memory load, SMU
  81. feature mask, VCN power state, clock and power gating features.
  82. amdgpu_firmware_info
  83. --------------------
  84. Lists the firmware versions for all firmwares used by the GPU. Only
  85. entries with a non-0 version are valid. If the version is 0, the firmware
  86. is not valid for the GPU.
  87. amdgpu_fence_info
  88. -----------------
  89. Shows the last signalled and emitted fence sequence numbers for each
  90. kernel driver managed ring. Fences are associated with submissions
  91. to the engine. Emitted fences have been submitted to the ring
  92. and signalled fences have been signalled by the GPU. Rings with a
  93. larger emitted fence value have outstanding work that is still being
  94. processed by the engine that owns that ring. When the emitted and
  95. signalled fence values are equal, the ring is idle.
  96. amdgpu_gem_info
  97. ---------------
  98. Lists all of the PIDs using the GPU and the GPU buffers that they have
  99. allocated. This lists the buffer size, pool (VRAM, GTT, etc.), and buffer
  100. attributes (CPU access required, CPU cache attributes, etc.).
  101. amdgpu_vm_info
  102. --------------
  103. Lists all of the PIDs using the GPU and the GPU buffers that they have
  104. allocated as well as the status of those buffers relative to that process'
  105. GPU virtual address space (e.g., evicted, idle, invalidated, etc.).
  106. amdgpu_sa_info
  107. --------------
  108. Prints out all of the suballocations (sa) by the suballocation manager in the
  109. kernel driver. Prints the GPU address, size, and fence info associated
  110. with each suballocation. The suballocations are used internally within
  111. the kernel driver for various things.
  112. amdgpu_<pool>_mm
  113. ----------------
  114. Prints TTM information about the memory pool <pool>.
  115. amdgpu_vram
  116. -----------
  117. Provides direct access to VRAM. Used by tools like UMR to inspect
  118. objects in VRAM.
  119. amdgpu_iomem
  120. ------------
  121. Provides direct access to GTT memory. Used by tools like UMR to inspect
  122. GTT memory.
  123. amdgpu_regs_*
  124. -------------
  125. Provides direct access to various register apertures on the GPU. Used
  126. by tools like UMR to access GPU registers.
  127. amdgpu_regs2
  128. ------------
  129. Provides an IOCTL interface used by UMR for interacting with GPU registers.
  130. amdgpu_sensors
  131. --------------
  132. Provides an interface to query GPU power metrics (temperature, average
  133. power, etc.). Used by tools like UMR to query GPU power metrics.
  134. amdgpu_gca_config
  135. -----------------
  136. Provides an interface to query GPU details (Graphics/Compute Array config,
  137. PCI config, GPU family, etc.). Used by tools like UMR to query GPU details.
  138. amdgpu_wave
  139. -----------
  140. Used to query GFX/compute wave information from the hardware. Used by tools
  141. like UMR to query GFX/compute wave information.
  142. amdgpu_gpr
  143. ----------
  144. Used to query GFX/compute GPR (General Purpose Register) information from the
  145. hardware. Used by tools like UMR to query GPRs when debugging shaders.
  146. amdgpu_gprwave
  147. --------------
  148. Provides an IOCTL interface used by UMR for interacting with shader waves.
  149. amdgpu_fw_attestation
  150. ---------------------
  151. Provides an interface for reading back firmware attestation records.