• Xiongfeng Wang's avatar
    cpufreq: CPPC: add SW BOOST support · 54e74df5
    Xiongfeng Wang authored
    To add SW BOOST support for CPPC, we need to get the max frequency of
    boost mode and non-boost mode. ACPI spec 6.2 section 8.4.7.1 describes
    the following two CPC registers.
    
    "Highest performance is the absolute maximum performance an individual
    processor may reach, assuming ideal conditions. This performance level
    may not be sustainable for long durations, and may only be achievable if
    other platform components are in a specific state; for example, it may
    require other processors be in an idle state.
    
    Nominal Performance is the maximum sustained performance level of the
    processor, assuming ideal operating conditions. In absence of an
    external constraint (power, thermal, etc.) this is the performance level
    the platform is expected to be able to maintain continuously. All
    processors are expected to be able to sustain their nominal performance
    state simultaneously."
    
    To add SW BOOST support for CPPC, we can use Highest Performance as the
    max performance in boost mode and Nominal Performance as the max
    performance in non-boost mode. If the Highest Performance is greater
    than the Nominal Performance, we assume SW BOOST is supported.
    
    The current CPPC driver does not support SW BOOST and use 'Highest
    Performance' as the max performance the CPU can achieve. 'Nominal
    Performance' is used to convert 'performance' to 'frequency'. That
    means, if firmware enable boost and provide a value for Highest
    Performance which is greater than Nominal Performance, boost feature is
    enabled by default.
    
    Because SW BOOST is disabled by default, so, after this patch, boost
    feature is disabled by default even if boost is enabled by firmware.
    Signed-off-by: default avatarXiongfeng Wang <wangxiongfeng2@huawei.com>
    Suggested-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    [ rjw: Subject ]
    Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
    54e74df5
cppc_cpufreq.c 13.2 KB