]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
cpufreq: intel_pstate: Update pid_params.sample_rate_ns in pid_param_set()
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>
Sun, 12 Mar 2017 17:12:56 +0000 (18:12 +0100)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 13 Mar 2017 22:55:12 +0000 (23:55 +0100)
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>
drivers/cpufreq/intel_pstate.c

index 3d37219a0dd7afc3108b017f1d2960868efb7903..f9fe910f3b838c34c0d621ab939f2d9d1d361503 100644 (file)
@@ -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;
 }