1 ===========================================
2 GPU Power/Thermal Controls and Monitoring
3 ===========================================
8 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
11 GPU sysfs Power State Interfaces
12 ================================
14 GPU power controls are exposed via sysfs files.
19 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
22 power_dpm_force_performance_level
23 ---------------------------------
25 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
26 :doc: power_dpm_force_performance_level
31 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
37 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
38 :doc: pp_od_clk_voltage
43 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
44 :doc: pp_dpm_sclk pp_dpm_mclk pp_dpm_socclk pp_dpm_fclk pp_dpm_dcefclk pp_dpm_pcie
49 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
50 :doc: pp_power_profile_mode
55 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
61 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
62 :doc: gpu_busy_percent
64 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
65 :doc: mem_busy_percent
70 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
76 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
79 acoustic_limit_rpm_threshold
80 ----------------------------
82 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
83 :doc: acoustic_limit_rpm_threshold
85 acoustic_target_rpm_threshold
86 -----------------------------
88 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
89 :doc: acoustic_target_rpm_threshold
91 fan_target_temperature
92 ----------------------
94 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
95 :doc: fan_target_temperature
100 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
101 :doc: fan_minimum_pwm
104 ----------------------
106 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
107 :doc: fan_zero_rpm_enable
109 fan_zero_rpm_stop_temperature
110 -----------------------------
112 .. kernel-doc:: drivers/gpu/drm/amd/pm/amdgpu_pm.c
113 :doc: fan_zero_rpm_stop_temperature
118 GFXOFF is a feature found in most recent GPUs that saves power at runtime. The
119 card's RLC (RunList Controller) firmware powers off the gfx engine
120 dynamically when there is no workload on gfx or compute pipes. GFXOFF is on by
121 default on supported GPUs.
123 Userspace can interact with GFXOFF through a debugfs interface (all values in
124 `uint32_t`, unless otherwise noted):
129 Use it to enable/disable GFXOFF, and to check if it's current enabled/disabled::
131 $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff
134 - Write 0 to disable it, and 1 to enable it.
135 - Read 0 means it's disabled, 1 it's enabled.
137 If it's enabled, that means that the GPU is free to enter into GFXOFF mode as
138 needed. Disabled means that it will never enter GFXOFF mode.
140 ``amdgpu_gfxoff_status``
141 ------------------------
143 Read it to check current GFXOFF's status of a GPU::
145 $ xxd -l1 -p /sys/kernel/debug/dri/0/amdgpu_gfxoff_status
148 - 0: GPU is in GFXOFF state, the gfx engine is powered down.
149 - 1: Transition out of GFXOFF state
150 - 2: Not in GFXOFF state
151 - 3: Transition into GFXOFF state
153 If GFXOFF is enabled, the value will be transitioning around [0, 3], always
154 getting into 0 when possible. When it's disabled, it's always at 2. Returns
155 ``-EINVAL`` if it's not supported.
157 ``amdgpu_gfxoff_count``
158 -----------------------
160 Read it to get the total GFXOFF entry count at the time of query since system
161 power-up. The value is an `uint64_t` type, however, due to firmware limitations,
162 it can currently overflow as an `uint32_t`. *Only supported in vangogh*
164 ``amdgpu_gfxoff_residency``
165 ---------------------------
167 Write 1 to amdgpu_gfxoff_residency to start logging, and 0 to stop. Read it to
168 get average GFXOFF residency % multiplied by 100 during the last logging
169 interval. E.g. a value of 7854 means 78.54% of the time in the last logging
170 interval the GPU was in GFXOFF mode. *Only supported in vangogh*