• Rafael J. Wysocki's avatar
    cpufreq: intel_pstate: hybrid: Rework HWP calibration · 46573fd6
    Rafael J. Wysocki authored
    The current HWP calibration for hybrid processors in intel_pstate is
    fragile, because it depends too much on the information provided by
    the platform firmware via CPPC which may not be reliable enough.  It
    also need not be so complicated.
    
    In order to improve that mechanism and make it more resistant to
    platform firmware issues, make it only use the CPPC nominal_perf
    values to compute the HWP-to-frequency scaling factors for all
    CPUs and possibly use the HWP_CAP highest_perf values to recompute
    them if the ones derived from the CPPC nominal_perf values alone
    appear to be too high.
    
    Namely, fetch CPC.nominal_perf for all CPUs present in the system,
    find the minimum one and use it as a reference for computing all of
    the CPUs' scaling factors (using the observation that for the CPUs
    having the minimum CPC.nominal_perf the HWP range of available
    performance levels should be the same as the range of available
    "legacy" P-states and so the HWP-to-frequency scaling factor for
    them should be the same as the corresponding scaling factor used
    for representing the P-state values in kHz).
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    Tested-by: default avatarZhang Rui <rui.zhang@intel.com>
    46573fd6
intel_pstate.c 83.6 KB