diff options
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c index d6e66414bb12..ce8be467608d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | |||
@@ -455,6 +455,29 @@ static ssize_t amdgpu_set_pp_table(struct device *dev, | |||
455 | return count; | 455 | return count; |
456 | } | 456 | } |
457 | 457 | ||
458 | /** | ||
459 | * DOC: pp_od_clk_voltage | ||
460 | * | ||
461 | * The amdgpu driver provides a sysfs API for adjusting the clocks and voltages | ||
462 | * in each power level within a power state. The pp_od_clk_voltage is used for | ||
463 | * this. | ||
464 | * | ||
465 | * Reading the file will display: | ||
466 | * - a list of engine clock levels and voltages labeled OD_SCLK | ||
467 | * - a list of memory clock levels and voltages labeled OD_MCLK | ||
468 | * - a list of valid ranges for sclk, mclk, and voltage labeled OD_RANGE | ||
469 | * | ||
470 | * To manually adjust these settings, first select manual using | ||
471 | * power_dpm_force_performance_level. Enter a new value for each | ||
472 | * level by writing a string that contains "s/m level clock voltage" to | ||
473 | * the file. E.g., "s 1 500 820" will update sclk level 1 to be 500 MHz | ||
474 | * at 820 mV; "m 0 350 810" will update mclk level 0 to be 350 MHz at | ||
475 | * 810 mV. When you have edited all of the states as needed, write | ||
476 | * "c" (commit) to the file to commit your changes. If you want to reset to the | ||
477 | * default power levels, write "r" (reset) to the file to reset them. | ||
478 | * | ||
479 | */ | ||
480 | |||
458 | static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, | 481 | static ssize_t amdgpu_set_pp_od_clk_voltage(struct device *dev, |
459 | struct device_attribute *attr, | 482 | struct device_attribute *attr, |
460 | const char *buf, | 483 | const char *buf, |