]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/cpufreq/intel_pstate.c
rtlwifi: rtl8723be: Add antenna select module parameter
[karo-tx-linux.git] / drivers / cpufreq / intel_pstate.c
index 98fb8821382d8fc145c6bf9227b62236fdabedb1..f53b02a6bc05b935f7ed9d8b9b5ff12d50eacc34 100644 (file)
@@ -667,6 +667,11 @@ static int core_get_max_pstate(void)
                        if (err)
                                goto skip_tar;
 
+                       /* For level 1 and 2, bits[23:16] contain the ratio */
+                       if (tdp_ctrl)
+                               tdp_ratio >>= 16;
+
+                       tdp_ratio &= 0xff; /* ratios are only 8 bits long */
                        if (tdp_ratio - 1 == tar) {
                                max_pstate = tar;
                                pr_debug("max_pstate=TAC %x\n", max_pstate);