summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-12 18:12:56 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-03-13 23:55:12 +0100
commit6e7408acd04d06c04981c0c0fb5a2462b16fae4f (patch)
tree5037e20b3166876d9a9705fe6e3625cf9bac6293
parent4495c08e84729385774601b5146d51d9e5849f81 (diff)
downloadlinux-stable-6e7408acd04d06c04981c0c0fb5a2462b16fae4f.tar.gz
linux-stable-6e7408acd04d06c04981c0c0fb5a2462b16fae4f.tar.bz2
linux-stable-6e7408acd04d06c04981c0c0fb5a2462b16fae4f.zip
cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set()
Fix the debugfs interface for PID tuning to actually update pid_params.sample_rate_ns on PID parameters updates, as changing pid_params.sample_rate_ms via debugfs has no effect now. Fixes: a4675fbc4a7a (cpufreq: intel_pstate: Replace timers with utilization update callbacks) Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-rw-r--r--drivers/cpufreq/intel_pstate.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c
index 3d37219a0dd7..f9fe910f3b83 100644
--- a/drivers/cpufreq/intel_pstate.c
+++ b/drivers/cpufreq/intel_pstate.c
@@ -989,6 +989,7 @@ static void intel_pstate_update_policies(void)
static int pid_param_set(void *data, u64 val)
{
*(u32 *)data = val;
+ pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC;
intel_pstate_reset_all_pid();
return 0;
}