diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2018-06-01 13:28:14 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-06-15 13:20:45 -0400 |
commit | dc85db256d47062955145264df5923f03b85b0c6 (patch) | |
tree | 248def1f5eb6190f9663882c5c1143cf7b60c32c /drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |
parent | c8c5e569c5b0c9ad523c35497af2ae5788a29581 (diff) |
drm/doc: Add amdgpu hwmon/power documentation (v2)
Document the hwmon and power control interfaces exposed
by the amdgpu driver.
v2: use section rather than chapter for now
Reviewed-by: Michel Dänzer <michel.daenzer@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 | 45 |
1 files changed, 37 insertions, 8 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index b455da487782..f667cb9eb614 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -80,12 +80,15 @@ void amdgpu_pm_acpi_event_handler(struct amdgpu_device *adev) | |||
80 | /** | 80 | /** |
81 | * DOC: power_dpm_state | 81 | * DOC: power_dpm_state |
82 | * | 82 | * |
83 | * This is a legacy interface and is only provided for backwards compatibility. | 83 | * The power_dpm_state file is a legacy interface and is only provided for |
84 | * The amdgpu driver provides a sysfs API for adjusting certain power | 84 | * backwards compatibility. The amdgpu driver provides a sysfs API for adjusting |
85 | * related parameters. The file power_dpm_state is used for this. | 85 | * certain power related parameters. The file power_dpm_state is used for this. |
86 | * It accepts the following arguments: | 86 | * It accepts the following arguments: |
87 | * | ||
87 | * - battery | 88 | * - battery |
89 | * | ||
88 | * - balanced | 90 | * - balanced |
91 | * | ||
89 | * - performance | 92 | * - performance |
90 | * | 93 | * |
91 | * battery | 94 | * battery |
@@ -169,14 +172,21 @@ fail: | |||
169 | * The amdgpu driver provides a sysfs API for adjusting certain power | 172 | * The amdgpu driver provides a sysfs API for adjusting certain power |
170 | * related parameters. The file power_dpm_force_performance_level is | 173 | * related parameters. The file power_dpm_force_performance_level is |
171 | * used for this. It accepts the following arguments: | 174 | * used for this. It accepts the following arguments: |
175 | * | ||
172 | * - auto | 176 | * - auto |
177 | * | ||
173 | * - low | 178 | * - low |
179 | * | ||
174 | * - high | 180 | * - high |
181 | * | ||
175 | * - manual | 182 | * - manual |
176 | * - GPU fan | 183 | * |
177 | * - profile_standard | 184 | * - profile_standard |
185 | * | ||
178 | * - profile_min_sclk | 186 | * - profile_min_sclk |
187 | * | ||
179 | * - profile_min_mclk | 188 | * - profile_min_mclk |
189 | * | ||
180 | * - profile_peak | 190 | * - profile_peak |
181 | * | 191 | * |
182 | * auto | 192 | * auto |
@@ -463,8 +473,11 @@ static ssize_t amdgpu_set_pp_table(struct device *dev, | |||
463 | * this. | 473 | * this. |
464 | * | 474 | * |
465 | * Reading the file will display: | 475 | * Reading the file will display: |
476 | * | ||
466 | * - a list of engine clock levels and voltages labeled OD_SCLK | 477 | * - a list of engine clock levels and voltages labeled OD_SCLK |
478 | * | ||
467 | * - a list of memory clock levels and voltages labeled OD_MCLK | 479 | * - a list of memory clock levels and voltages labeled OD_MCLK |
480 | * | ||
468 | * - a list of valid ranges for sclk, mclk, and voltage labeled OD_RANGE | 481 | * - a list of valid ranges for sclk, mclk, and voltage labeled OD_RANGE |
469 | * | 482 | * |
470 | * To manually adjust these settings, first select manual using | 483 | * To manually adjust these settings, first select manual using |
@@ -1285,35 +1298,51 @@ static ssize_t amdgpu_hwmon_set_power_cap(struct device *dev, | |||
1285 | * DOC: hwmon | 1298 | * DOC: hwmon |
1286 | * | 1299 | * |
1287 | * The amdgpu driver exposes the following sensor interfaces: | 1300 | * The amdgpu driver exposes the following sensor interfaces: |
1301 | * | ||
1288 | * - GPU temperature (via the on-die sensor) | 1302 | * - GPU temperature (via the on-die sensor) |
1303 | * | ||
1289 | * - GPU voltage | 1304 | * - GPU voltage |
1305 | * | ||
1290 | * - Northbridge voltage (APUs only) | 1306 | * - Northbridge voltage (APUs only) |
1307 | * | ||
1291 | * - GPU power | 1308 | * - GPU power |
1309 | * | ||
1292 | * - GPU fan | 1310 | * - GPU fan |
1293 | * | 1311 | * |
1294 | * hwmon interfaces for GPU temperature: | 1312 | * hwmon interfaces for GPU temperature: |
1313 | * | ||
1295 | * - temp1_input: the on die GPU temperature in millidegrees Celsius | 1314 | * - temp1_input: the on die GPU temperature in millidegrees Celsius |
1315 | * | ||
1296 | * - temp1_crit: temperature critical max value in millidegrees Celsius | 1316 | * - temp1_crit: temperature critical max value in millidegrees Celsius |
1317 | * | ||
1297 | * - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius | 1318 | * - temp1_crit_hyst: temperature hysteresis for critical limit in millidegrees Celsius |
1298 | * | 1319 | * |
1299 | * hwmon interfaces for GPU voltage: | 1320 | * hwmon interfaces for GPU voltage: |
1321 | * | ||
1300 | * - in0_input: the voltage on the GPU in millivolts | 1322 | * - in0_input: the voltage on the GPU in millivolts |
1323 | * | ||
1301 | * - in1_input: the voltage on the Northbridge in millivolts | 1324 | * - in1_input: the voltage on the Northbridge in millivolts |
1302 | * | 1325 | * |
1303 | * hwmon interfaces for GPU power: | 1326 | * hwmon interfaces for GPU power: |
1327 | * | ||
1304 | * - power1_average: average power used by the GPU in microWatts | 1328 | * - power1_average: average power used by the GPU in microWatts |
1329 | * | ||
1305 | * - power1_cap_min: minimum cap supported in microWatts | 1330 | * - power1_cap_min: minimum cap supported in microWatts |
1331 | * | ||
1306 | * - power1_cap_max: maximum cap supported in microWatts | 1332 | * - power1_cap_max: maximum cap supported in microWatts |
1333 | * | ||
1307 | * - power1_cap: selected power cap in microWatts | 1334 | * - power1_cap: selected power cap in microWatts |
1308 | * | 1335 | * |
1309 | * hwmon interfaces for GPU fan: | 1336 | * hwmon interfaces for GPU fan: |
1337 | * | ||
1310 | * - pwm1: pulse width modulation fan level (0-255) | 1338 | * - pwm1: pulse width modulation fan level (0-255) |
1311 | * - pwm1_enable: pulse width modulation fan control method | 1339 | * |
1312 | * 0: no fan speed control | 1340 | * - pwm1_enable: pulse width modulation fan control method (0: no fan speed control, 1: manual fan speed control using pwm interface, 2: automatic fan speed control) |
1313 | * 1: manual fan speed control using pwm interface | 1341 | * |
1314 | * 2: automatic fan speed control | ||
1315 | * - pwm1_min: pulse width modulation fan control minimum level (0) | 1342 | * - pwm1_min: pulse width modulation fan control minimum level (0) |
1343 | * | ||
1316 | * - pwm1_max: pulse width modulation fan control maximum level (255) | 1344 | * - pwm1_max: pulse width modulation fan control maximum level (255) |
1345 | * | ||
1317 | * - fan1_input: fan speed in RPM | 1346 | * - fan1_input: fan speed in RPM |
1318 | * | 1347 | * |
1319 | * You can use hwmon tools like sensors to view this information on your system. | 1348 | * You can use hwmon tools like sensors to view this information on your system. |