diff options
author | Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> | 2019-11-04 03:02:39 -0800 |
---|---|---|
committer | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2019-11-07 19:00:25 +0200 |
commit | 91d928147bb0d03219fd6cc079e16fd74e232e2b (patch) | |
tree | f181d7a243878c1ea60d937aa0d18bd4ac5fef27 /tools/power | |
parent | 82d4a34ee6196a652f04f81d23ab296bddf8486d (diff) |
tools/power/x86/intel-speed-select: Correct CLX-N frequency units
In CLX_N base_frequency is read from cpufreq sysfs, where units are in
KHz. The internal units in the code matches the real ratios which are
in 100MHz scale. So when storing units for CLX-N frequencies, convert
to 100MHz scale.
Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Diffstat (limited to 'tools/power')
-rw-r--r-- | tools/power/x86/intel-speed-select/isst-config.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/power/x86/intel-speed-select/isst-config.c b/tools/power/x86/intel-speed-select/isst-config.c index 1c20048b42e7..bfa42fc6c4d2 100644 --- a/tools/power/x86/intel-speed-select/isst-config.c +++ b/tools/power/x86/intel-speed-select/isst-config.c @@ -840,8 +840,8 @@ static int clx_n_config(int cpu) } /* convert frequencies back to ratios */ - pbf_info->p1_high = pbf_info->p1_high / DISP_FREQ_MULTIPLIER; - pbf_info->p1_low = pbf_info->p1_low / DISP_FREQ_MULTIPLIER; + pbf_info->p1_high = pbf_info->p1_high / 100000; + pbf_info->p1_low = pbf_info->p1_low / 100000; /* create high priority cpu mask */ pbf_info->core_cpumask_size = alloc_cpu_set(&pbf_info->core_cpumask); @@ -856,7 +856,7 @@ static int clx_n_config(int cpu) cpu_bf = parse_int_file(1, "/sys/devices/system/cpu/cpu%d/cpufreq/base_frequency", i); - cpu_bf = cpu_bf / DISP_FREQ_MULTIPLIER; + cpu_bf = cpu_bf / 100000; if (cpu_bf == pbf_info->p1_high) CPU_SET_S(i, pbf_info->core_cpumask_size, pbf_info->core_cpumask); |