]> git.baikalelectronics.ru Git - kernel.git/commit
intel_pstate: Correct BYT VID values.
authorDirk Brandewie <dirk.j.brandewie@intel.com>
Mon, 13 Oct 2014 15:37:44 +0000 (08:37 -0700)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Thu, 23 Oct 2014 21:00:00 +0000 (23:00 +0200)
commitcce4837a983a171155aedef61fda6c72fce9951a
tree6ff152f13f0ce8918e97ecd968fd7d3fabf13fcf
parent449bafa76d63921b59e37127bcdc5d3f21afe411
intel_pstate: Correct BYT VID values.

Using a VID value that is not high enough for the requested P state can
cause machine checks. Add a ceiling function to ensure calulated VIDs
with fractional values are set to the next highest integer VID value.

The algorythm for calculating the non-trubo VID from the BIOS writers
guide is:
 vid_ratio = (vid_max - vid_min) / (max_pstate - min_pstate)
 vid = ceiling(vid_min + (req_pstate - min_pstate) * vid_ratio)

Cc: All applicable <stable@vger.kernel.org>
Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/cpufreq/intel_pstate.c