• Bjorn Andersson's avatar
    cpufreq: qcom-hw: Add support for per-core-dcvs · c377d4ba
    Bjorn Andersson authored
    The OSM and EPSS hardware controls the frequency of each cluster in the
    system based on requests from the OS and various limiting factors, such
    as input from LMH.
    
    In most systems the vote from the OS is done using a single register per
    cluster, but some systems are configured to instead take one request per
    core.  In this configuration a set of consecutive registers are used for
    the OS to request the frequency of each of the cores within the cluster.
    The information is then aggregated in the hardware and the frequency for
    the cluster is determined.
    
    As the current implementation ends up only requesting a frequency for
    the first core in each cluster and only the vote of non-idle cores are
    considered it's often the case that the cluster will be clocked (much)
    lower than expected.
    
    It's possible that there are benefits of performing the per-core
    requests from the OS, but more investigation of the outcome is needed
    before introducing such support. As such this patch extends the request
    for the cluster to be written to all the cores.
    
    The weight of the policy's related_cpus is used to determine how many
    cores, and hence consecutive registers, each cluster has.
    
    The OS is not permitted to disable the per-core dcvs feature.
    Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
    Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
    c377d4ba
qcom-cpufreq-hw.c 16.5 KB