intel_pstate: Fix setting VID
commitc16ed06024
upstream. Commit21855ff5
(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> Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5632b7dac8
commit
313b12ee56
|
@ -361,21 +361,21 @@ static int byt_get_min_pstate(void)
|
||||||
{
|
{
|
||||||
u64 value;
|
u64 value;
|
||||||
rdmsrl(BYT_RATIOS, value);
|
rdmsrl(BYT_RATIOS, value);
|
||||||
return (value >> 8) & 0x3F;
|
return (value >> 8) & 0x7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int byt_get_max_pstate(void)
|
static int byt_get_max_pstate(void)
|
||||||
{
|
{
|
||||||
u64 value;
|
u64 value;
|
||||||
rdmsrl(BYT_RATIOS, value);
|
rdmsrl(BYT_RATIOS, value);
|
||||||
return (value >> 16) & 0x3F;
|
return (value >> 16) & 0x7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int byt_get_turbo_pstate(void)
|
static int byt_get_turbo_pstate(void)
|
||||||
{
|
{
|
||||||
u64 value;
|
u64 value;
|
||||||
rdmsrl(BYT_TURBO_RATIOS, value);
|
rdmsrl(BYT_TURBO_RATIOS, value);
|
||||||
return value & 0x3F;
|
return value & 0x7F;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void byt_set_pstate(struct cpudata *cpudata, int pstate)
|
static void byt_set_pstate(struct cpudata *cpudata, int pstate)
|
||||||
|
@ -409,8 +409,8 @@ static void byt_get_vid(struct cpudata *cpudata)
|
||||||
|
|
||||||
|
|
||||||
rdmsrl(BYT_VIDS, value);
|
rdmsrl(BYT_VIDS, value);
|
||||||
cpudata->vid.min = int_tofp((value >> 8) & 0x3f);
|
cpudata->vid.min = int_tofp((value >> 8) & 0x7f);
|
||||||
cpudata->vid.max = int_tofp((value >> 16) & 0x3f);
|
cpudata->vid.max = int_tofp((value >> 16) & 0x7f);
|
||||||
cpudata->vid.ratio = div_fp(
|
cpudata->vid.ratio = div_fp(
|
||||||
cpudata->vid.max - cpudata->vid.min,
|
cpudata->vid.max - cpudata->vid.min,
|
||||||
int_tofp(cpudata->pstate.max_pstate -
|
int_tofp(cpudata->pstate.max_pstate -
|
||||||
|
|
Loading…
Reference in New Issue