diff options
author | Dirk Brandewie <dirk.j.brandewie@intel.com> | 2014-02-12 19:01:05 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-03-02 00:35:19 +0100 |
commit | d98d099b9fbb7bbb20a74efe5327322831c9c9a3 (patch) | |
tree | 3ea35bceded921d6f6099b6fda1930900fe91fb5 /drivers/cpufreq | |
parent | intel_pstate: remove unneeded sample buffers (diff) | |
download | linux-d98d099b9fbb7bbb20a74efe5327322831c9c9a3.tar.xz linux-d98d099b9fbb7bbb20a74efe5327322831c9c9a3.zip |
intel_pstate: fix pid_reset to use fixed point values
commit d253d2a526 (Improve accuracy by not truncating until final
result), changed internal variables of the PID to be fixed point
numbers. Update the pid_reset() to reflect this change.
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/intel_pstate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 41f9eb295f0c..9ab109c0f90c 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -153,7 +153,7 @@ static inline void pid_reset(struct _pid *pid, int setpoint, int busy, pid->setpoint = setpoint; pid->deadband = deadband; pid->integral = int_tofp(integral); - pid->last_err = setpoint - busy; + pid->last_err = int_tofp(setpoint) - int_tofp(busy); } static inline void pid_p_gain_set(struct _pid *pid, int percent) |