• Srinivas Pandruvada's avatar
    cpufreq: intel_pstate: Update EPP for AlderLake mobile · b6e6f8be
    Srinivas Pandruvada authored
    
    
    There is an expectation from users that they can get frequency specified
    by cpufreq/cpuinfo_max_freq when conditions permit. But with AlderLake
    mobile it may not be possible. This is possible that frequency is clipped
    based on the system power-up EPP value. In this case users can update
    cpufreq/energy_performance_preference to some performance oriented EPP to
    limit clipping of frequencies.
    
    To get out of box behavior as the prior generations of CPUs, update EPP
    for AlderLake mobile CPUs on boot. On prior generations of CPUs EPP = 128
    was enough to get maximum frequency, but with AlderLake mobile the
    equivalent EPP is 102. Since EPP is model specific, this is possible that
    they have different meaning on each generation of CPU.
    
    The current EPP string "balance_performance" corresponds to EPP = 128.
    Change the EPP corresponding to "balance_performance" to 102 for only
    AlderLake mobile CPUs and update this on each CPU during boot.
    
    To implement reuse epp_values[] array and update the modified EPP at the
    index for BALANCE_PERFORMANCE. Add a dummy EPP_INDEX_DEFAULT to
    epp_values[] to match indexes in the energy_perf_strings[].
    
    After HWP PM is enabled also update EPP when "balance_performance" is
    redefined for the very first time after the boot on each CPU. On
    subsequent suspend/resume or offline/online the old EPP is restored,
    so no specific action is needed.
    Signed-off-by: default avatarSrinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    b6e6f8be
intel_pstate.c 89.4 KB