Commit 6e7408ac authored by Rafael J. Wysocki's avatar Rafael J. Wysocki

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: a4675fbc (cpufreq: intel_pstate: Replace timers with utilization update callbacks)
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
parent 4495c08e
...@@ -989,6 +989,7 @@ static void intel_pstate_update_policies(void) ...@@ -989,6 +989,7 @@ static void intel_pstate_update_policies(void)
static int pid_param_set(void *data, u64 val) static int pid_param_set(void *data, u64 val)
{ {
*(u32 *)data = val; *(u32 *)data = val;
pid_params.sample_rate_ns = pid_params.sample_rate_ms * NSEC_PER_MSEC;
intel_pstate_reset_all_pid(); intel_pstate_reset_all_pid();
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment