diff options
author | Dirk Brandewie <dirk.j.brandewie@intel.com> | 2014-06-20 10:27:58 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-07-06 19:22:19 -0400 |
commit | c16ed06024a6e699c332831dd50d8276744e3de8 (patch) | |
tree | d9780f7ad69431aed8a7457d01bd7a33a69ec333 /drivers/cpufreq | |
parent | fefa8ff810c5ab4c4206aed9d159c4d6fe8d4f1c (diff) |
intel_pstate: Fix setting VID
Commit 21855ff5 (intel_pstate: Set turbo VID for BayTrail) introduced
setting the turbo VID which is required to prevent a machine check on
some Baytrail SKUs under heavy graphics based workloads. The
docmumentation update that brought the requirement to light also
changed the bit mask used for enumerating P state and VID values from
0x7f to 0x3f.
This change returns the mask value to 0x7f.
Tested with the Intel NUC DN2820FYK,
BIOS version FYBYT10H.86A.0034.2014.0513.1413 with v3.16-rc1 and
v3.14.8 kernel versions.
Fixes: 21855ff5 (intel_pstate: Set turbo VID for BayTrail)
Link: https://bugzilla.kernel.org/show_bug.cgi?id=77951
Reported-and-tested-by: Rune Reterson <rune@megahurts.dk>
Reported-and-tested-by: Eric Eickmeyer <erich@ericheickmeyer.com>
Cc: 3.13+ <stable@vger.kernel.org> # 3.13+
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 | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 924bb2d42b1c..74376d615eca 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c | |||
@@ -357,21 +357,21 @@ static int byt_get_min_pstate(void) | |||
357 | { | 357 | { |
358 | u64 value; | 358 | u64 value; |
359 | rdmsrl(BYT_RATIOS, value); | 359 | rdmsrl(BYT_RATIOS, value); |
360 | return (value >> 8) & 0x3F; | 360 | return (value >> 8) & 0x7F; |
361 | } | 361 | } |
362 | 362 | ||
363 | static int byt_get_max_pstate(void) | 363 | static int byt_get_max_pstate(void) |
364 | { | 364 | { |
365 | u64 value; | 365 | u64 value; |
366 | rdmsrl(BYT_RATIOS, value); | 366 | rdmsrl(BYT_RATIOS, value); |
367 | return (value >> 16) & 0x3F; | 367 | return (value >> 16) & 0x7F; |
368 | } | 368 | } |
369 | 369 | ||
370 | static int byt_get_turbo_pstate(void) | 370 | static int byt_get_turbo_pstate(void) |
371 | { | 371 | { |
372 | u64 value; | 372 | u64 value; |
373 | rdmsrl(BYT_TURBO_RATIOS, value); | 373 | rdmsrl(BYT_TURBO_RATIOS, value); |
374 | return value & 0x3F; | 374 | return value & 0x7F; |
375 | } | 375 | } |
376 | 376 | ||
377 | static void byt_set_pstate(struct cpudata *cpudata, int pstate) | 377 | static void byt_set_pstate(struct cpudata *cpudata, int pstate) |
@@ -405,8 +405,8 @@ static void byt_get_vid(struct cpudata *cpudata) | |||
405 | 405 | ||
406 | 406 | ||
407 | rdmsrl(BYT_VIDS, value); | 407 | rdmsrl(BYT_VIDS, value); |
408 | cpudata->vid.min = int_tofp((value >> 8) & 0x3f); | 408 | cpudata->vid.min = int_tofp((value >> 8) & 0x7f); |
409 | cpudata->vid.max = int_tofp((value >> 16) & 0x3f); | 409 | cpudata->vid.max = int_tofp((value >> 16) & 0x7f); |
410 | cpudata->vid.ratio = div_fp( | 410 | cpudata->vid.ratio = div_fp( |
411 | cpudata->vid.max - cpudata->vid.min, | 411 | cpudata->vid.max - cpudata->vid.min, |
412 | int_tofp(cpudata->pstate.max_pstate - | 412 | int_tofp(cpudata->pstate.max_pstate - |