Skip to content

Commit b8f8672

Browse files
committed
[Intel] Check the Turbo Activation Ratio Lock and raise COMPUTE bit
1 parent dd386fe commit b8f8672

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

corefreqk.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6566,7 +6566,7 @@ void Intel_Turbo_TDP_Config(CORE_RO *Core)
65666566

65676567
RDMSR(TurboActivation, MSR_TURBO_ACTIVATION_RATIO);
65686568

6569-
if ((Turbo_Activation_Ratio >= 0)
6569+
if ((!TurboActivation.Ratio_Lock) && (Turbo_Activation_Ratio >= 0)
65706570
&& (Turbo_Activation_Ratio != TurboActivation.MaxRatio))
65716571
{
65726572
const short MaxRatio = \
@@ -15558,11 +15558,14 @@ static long CoreFreqK_ioctl( struct file *filp,
1555815558
CLOCK_ARG clockMod = {.sllong = arg};
1555915559
switch (clockMod.NC) {
1556015560
case CLOCK_MOD_ACT:
15561-
Controller_Stop(1);
15562-
Turbo_Activation_Ratio = clockMod.Ratio;
15563-
Controller_Start(1);
15564-
Turbo_Activation_Ratio = -1;
15565-
rc = RC_SUCCESS;
15561+
if (clockMod.Ratio >= 0)
15562+
{
15563+
Controller_Stop(1);
15564+
Turbo_Activation_Ratio = clockMod.Ratio;
15565+
Controller_Start(1);
15566+
Turbo_Activation_Ratio = -1;
15567+
rc = RC_OK_COMPUTE;
15568+
}
1556615569
break;
1556715570
}
1556815571
}

0 commit comments

Comments
 (0)