thermal.rst 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. ===========================================
  2. GPU Power/Thermal Controls and Monitoring
  3. ===========================================
  4. HWMON Interfaces
  5. ================
  6. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  7. :doc: hwmon
  8. GPU sysfs Power State Interfaces
  9. ================================
  10. GPU power controls are exposed via sysfs files.
  11. power_dpm_state
  12. ---------------
  13. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  14. :doc: power_dpm_state
  15. power_dpm_force_performance_level
  16. ---------------------------------
  17. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  18. :doc: power_dpm_force_performance_level
  19. pp_table
  20. --------
  21. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  22. :doc: pp_table
  23. pp_od_clk_voltage
  24. -----------------
  25. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  26. :doc: pp_od_clk_voltage
  27. pp_dpm_*
  28. --------
  29. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  30. :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
  31. pp_power_profile_mode
  32. ---------------------
  33. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  34. :doc: pp_power_profile_mode
  35. pm_policy
  36. ---------------------
  37. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  38. :doc: pm_policy
  39. \*_busy_percent
  40. ---------------
  41. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  42. :doc: gpu_busy_percent
  43. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  44. :doc: mem_busy_percent
  45. gpu_metrics
  46. -----------
  47. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  48. :doc: gpu_metrics
  49. fan_curve
  50. ---------
  51. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  52. :doc: fan_curve
  53. acoustic_limit_rpm_threshold
  54. ----------------------------
  55. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  56. :doc: acoustic_limit_rpm_threshold
  57. acoustic_target_rpm_threshold
  58. -----------------------------
  59. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  60. :doc: acoustic_target_rpm_threshold
  61. fan_target_temperature
  62. ----------------------
  63. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  64. :doc: fan_target_temperature
  65. fan_minimum_pwm
  66. ---------------
  67. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  68. :doc: fan_minimum_pwm
  69. GFXOFF
  70. ======
  71. GFXOFF is a feature found in most recent GPUs that saves power at runtime. The
  72. card's RLC (RunList Controller) firmware powers off the gfx engine
  73. dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by
  74. default on supported GPUs.
  75. Userspace can interact with GFXOFF through a debugfs interface (all values in
  76. `uint32_t`, unless otherwise noted):
  77. ``amdgpu_gfxoff``
  78. -----------------
  79. Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::
  80. $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff
  81. 01
  82. - Write 0 to disable it, and 1 to enable it.
  83. - Read 0 means it's disabled, 1 it's enabled.
  84. If it's enabled, that means that the GPU is free to enter into GFXOFF mode as
  85. needed. Disabled means that it will never enter GFXOFF mode.
  86. ``amdgpu_gfxoff_status``
  87. ------------------------
  88. Read it to check current GFXOFF's status of a GPU::
  89. $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status
  90. 02
  91. - 0: GPU is in GFXOFF state, the gfx engine is powered down.
  92. - 1: Transition out of GFXOFF state
  93. - 2: Not in GFXOFF state
  94. - 3: Transition into GFXOFF state
  95. If GFXOFF is enabled, the value will be transitioning around [0, 3], always
  96. getting into 0 when possible. When it's disabled, it's always at 2. Returns
  97. ``-EINVAL`` if it's not supported.
  98. ``amdgpu_gfxoff_count``
  99. -----------------------
  100. Read it to get the total GFXOFF entry count at the time of query since system
  101. power-up. The value is an `uint64_t` type, however, due to firmware limitations,
  102. it can currently overflow as an `uint32_t`. *Only supported in vangogh*
  103. ``amdgpu_gfxoff_residency``
  104. ---------------------------
  105. Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to
  106. get average GFXOFF residency % multiplied by 100 during the last logging
  107. interval. E.g. a value of 7854 means 78.54% of the time in the last logging
  108. interval the GPU was in GFXOFF mode. *Only supported in vangogh*