diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-04-19 14:46:03 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-05-15 14:43:44 -0400 |
commit | 8567f68147de1f09cc868b52b02a0c11dc048206 (patch) | |
tree | fa896a6db5d7dfef039af5771665c561fc5cae10 /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | 9b3f217faf48603c91d4ca44a18e6ff74c3c1c0c (diff) |
drm/amdgpu/pm: document power_dpm_force_performance_level
Provide documentation for power_dpm_force_performance_level
which is used to adjust things related to GPU power states.
Acked-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index 744f105a2c75..ee11e92cc4d2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -131,6 +131,59 @@ fail: | |||
131 | return count; | 131 | return count; |
132 | } | 132 | } |
133 | 133 | ||
134 | |||
135 | /** | ||
136 | * DOC: power_dpm_force_performance_level | ||
137 | * | ||
138 | * The amdgpu driver provides a sysfs API for adjusting certain power | ||
139 | * related parameters. The file power_dpm_force_performance_level is | ||
140 | * used for this. It accepts the following arguments: | ||
141 | * - auto | ||
142 | * - low | ||
143 | * - high | ||
144 | * - manual | ||
145 | * - GPU fan | ||
146 | * - profile_standard | ||
147 | * - profile_min_sclk | ||
148 | * - profile_min_mclk | ||
149 | * - profile_peak | ||
150 | * | ||
151 | * auto | ||
152 | * | ||
153 | * When auto is selected, the driver will attempt to dynamically select | ||
154 | * the optimal power profile for current conditions in the driver. | ||
155 | * | ||
156 | * low | ||
157 | * | ||
158 | * When low is selected, the clocks are forced to the lowest power state. | ||
159 | * | ||
160 | * high | ||
161 | * | ||
162 | * When high is selected, the clocks are forced to the highest power state. | ||
163 | * | ||
164 | * manual | ||
165 | * | ||
166 | * When manual is selected, the user can manually adjust which power states | ||
167 | * are enabled for each clock domain via the sysfs pp_dpm_mclk, pp_dpm_sclk, | ||
168 | * and pp_dpm_pcie files and adjust the power state transition heuristics | ||
169 | * via the pp_power_profile_mode sysfs file. | ||
170 | * | ||
171 | * profile_standard | ||
172 | * profile_min_sclk | ||
173 | * profile_min_mclk | ||
174 | * profile_peak | ||
175 | * | ||
176 | * When the profiling modes are selected, clock and power gating are | ||
177 | * disabled and the clocks are set for different profiling cases. This | ||
178 | * mode is recommended for profiling specific work loads where you do | ||
179 | * not want clock or power gating for clock fluctuation to interfere | ||
180 | * with your results. profile_standard sets the clocks to a fixed clock | ||
181 | * level which varies from asic to asic. profile_min_sclk forces the sclk | ||
182 | * to the lowest level. profile_min_mclk forces the mclk to the lowest level. | ||
183 | * profile_peak sets all clocks (mclk, sclk, pcie) to the highest levels. | ||
184 | * | ||
185 | */ | ||
186 | |||
134 | static ssize_t amdgpu_get_dpm_forced_performance_level(struct device *dev, | 187 | static ssize_t amdgpu_get_dpm_forced_performance_level(struct device *dev, |
135 | struct device_attribute *attr, | 188 | struct device_attribute *attr, |
136 | char *buf) | 189 | char *buf) |