thermal.rst 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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. \*_busy_percent
  36. ---------------
  37. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  38. :doc: gpu_busy_percent
  39. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  40. :doc: mem_busy_percent
  41. gpu_metrics
  42. -----------
  43. .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
  44. :doc: gpu_metrics
  45. GFXOFF
  46. ======
  47. GFXOFF is a feature found in most recent GPUs that saves power at runtime. The
  48. card's RLC (RunList Controller) firmware powers off the gfx engine
  49. dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by
  50. default on supported GPUs.
  51. Userspace can interact with GFXOFF through a debugfs interface (all values in
  52. `uint32_t`, unless otherwise noted):
  53. ``amdgpu_gfxoff``
  54. -----------------
  55. Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::
  56. $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff
  57. 01
  58. - Write 0 to disable it, and 1 to enable it.
  59. - Read 0 means it's disabled, 1 it's enabled.
  60. If it's enabled, that means that the GPU is free to enter into GFXOFF mode as
  61. needed. Disabled means that it will never enter GFXOFF mode.
  62. ``amdgpu_gfxoff_status``
  63. ------------------------
  64. Read it to check current GFXOFF's status of a GPU::
  65. $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status
  66. 02
  67. - 0: GPU is in GFXOFF state, the gfx engine is powered down.
  68. - 1: Transition out of GFXOFF state
  69. - 2: Not in GFXOFF state
  70. - 3: Transition into GFXOFF state
  71. If GFXOFF is enabled, the value will be transitioning around [0, 3], always
  72. getting into 0 when possible. When it's disabled, it's always at 2. Returns
  73. ``-EINVAL`` if it's not supported.
  74. ``amdgpu_gfxoff_count``
  75. -----------------------
  76. Read it to get the total GFXOFF entry count at the time of query since system
  77. power-up. The value is an `uint64_t` type, however, due to firmware limitations,
  78. it can currently overflow as an `uint32_t`. *Only supported in vangogh*
  79. ``amdgpu_gfxoff_residency``
  80. ---------------------------
  81. Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to
  82. get average GFXOFF residency % multiplied by 100 during the last logging
  83. interval. E.g. a value of 7854 means 78.54% of the time in the last logging
  84. interval the GPU was in GFXOFF mode. *Only supported in vangogh*