diff options
author | Wyes Karny <wyes.karny@amd.com> | 2023-06-19 19:05:01 +0000 |
---|---|---|
committer | Shuah Khan <skhan@linuxfoundation.org> | 2023-07-18 16:06:49 -0600 |
commit | f2ab5557119a5ccd0ceaf7ecdca00ab782cd76c5 (patch) | |
tree | 6ac8de88fb10eab6ccdb3c736cb93ee9ea8aa43a /tools/power/cpupower/utils/helpers/helpers.h | |
parent | 1ce5ab7c1dbfa82f0d382a48cccb51178cbf5416 (diff) | |
download | lwn-f2ab5557119a5ccd0ceaf7ecdca00ab782cd76c5.tar.gz lwn-f2ab5557119a5ccd0ceaf7ecdca00ab782cd76c5.zip |
cpupower: Add EPP value change support
amd_pstate and intel_pstate active mode drivers support energy
performance preference feature. Through this user can convey it's
energy/performance preference to platform. Add this value change
capability to cpupower.
To change the EPP value use below command:
cpupower set --epp performance
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Wyes Karny <wyes.karny@amd.com>
Tested-by: Perry Yuan <Perry.Yuan@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
Diffstat (limited to 'tools/power/cpupower/utils/helpers/helpers.h')
-rw-r--r-- | tools/power/cpupower/utils/helpers/helpers.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/power/cpupower/utils/helpers/helpers.h b/tools/power/cpupower/utils/helpers/helpers.h index 96e4bede078b..5d998de2d291 100644 --- a/tools/power/cpupower/utils/helpers/helpers.h +++ b/tools/power/cpupower/utils/helpers/helpers.h @@ -116,6 +116,8 @@ extern int cpupower_intel_set_perf_bias(unsigned int cpu, unsigned int val); extern int cpupower_intel_get_perf_bias(unsigned int cpu); extern unsigned long long msr_intel_get_turbo_ratio(unsigned int cpu); +extern int cpupower_set_epp(unsigned int cpu, char *epp); + /* Read/Write msr ****************************/ /* PCI stuff ****************************/ @@ -173,6 +175,9 @@ static inline int cpupower_intel_get_perf_bias(unsigned int cpu) static inline unsigned long long msr_intel_get_turbo_ratio(unsigned int cpu) { return 0; }; +static inline int cpupower_set_epp(unsigned int cpu, char *epp) +{ return -1; }; + /* Read/Write msr ****************************/ static inline int cpufreq_has_boost_support(unsigned int cpu, int *support, |