Message ID | 20210113065241.23829-1-shawn.guo@linaro.org |
---|---|
State | Accepted |
Commit | 266991721c15f9feb5c4b839cb1bdde4a2b20030 |
Headers | show |
Series | cpufreq: qcom-hw: enable boost support | expand |
On 1/13/21 12:52 AM, Shawn Guo wrote: > At least on sdm850, the 2956800 khz is detected as a boost frequency in > function qcom_cpufreq_hw_read_lut(). Let's enable boost support by > calling cpufreq_enable_boost_support(), so that we can get the boost > frequency by switching it on via 'boost' sysfs entry like below. > > $ echo 1 > /sys/devices/system/cpu/cpufreq/boost > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c > index 315ee987d2d3..6eb88463a24e 100644 > --- a/drivers/cpufreq/qcom-cpufreq-hw.c > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c > @@ -351,6 +351,12 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) > > dev_pm_opp_of_register_em(cpu_dev, policy->cpus); > > + if (policy_has_boost_freq(policy)) { > + ret = cpufreq_enable_boost_support(); > + if (ret) > + dev_warn(cpu_dev, "failed to enable boost: %d\n", ret); > + } > + > return 0; > error: > devm_iounmap(dev, base); Tested-by: Steev Klimaszewski <steev@kali.org>
On Wed 13 Jan 00:52 CST 2021, Shawn Guo wrote: > At least on sdm850, the 2956800 khz is detected as a boost frequency in > function qcom_cpufreq_hw_read_lut(). Let's enable boost support by > calling cpufreq_enable_boost_support(), so that we can get the boost > frequency by switching it on via 'boost' sysfs entry like below. > > $ echo 1 > /sys/devices/system/cpu/cpufreq/boost > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Regards, Bjorn > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c > index 315ee987d2d3..6eb88463a24e 100644 > --- a/drivers/cpufreq/qcom-cpufreq-hw.c > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c > @@ -351,6 +351,12 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) > > dev_pm_opp_of_register_em(cpu_dev, policy->cpus); > > + if (policy_has_boost_freq(policy)) { > + ret = cpufreq_enable_boost_support(); > + if (ret) > + dev_warn(cpu_dev, "failed to enable boost: %d\n", ret); > + } > + > return 0; > error: > devm_iounmap(dev, base); > -- > 2.17.1 >
On 13-01-21, 14:52, Shawn Guo wrote: > At least on sdm850, the 2956800 khz is detected as a boost frequency in > function qcom_cpufreq_hw_read_lut(). Let's enable boost support by > calling cpufreq_enable_boost_support(), so that we can get the boost > frequency by switching it on via 'boost' sysfs entry like below. > > $ echo 1 > /sys/devices/system/cpu/cpufreq/boost > > Signed-off-by: Shawn Guo <shawn.guo@linaro.org> > --- > drivers/cpufreq/qcom-cpufreq-hw.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c > index 315ee987d2d3..6eb88463a24e 100644 > --- a/drivers/cpufreq/qcom-cpufreq-hw.c > +++ b/drivers/cpufreq/qcom-cpufreq-hw.c > @@ -351,6 +351,12 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) > > dev_pm_opp_of_register_em(cpu_dev, policy->cpus); > > + if (policy_has_boost_freq(policy)) { > + ret = cpufreq_enable_boost_support(); > + if (ret) > + dev_warn(cpu_dev, "failed to enable boost: %d\n", ret); > + } > + > return 0; > error: > devm_iounmap(dev, base); Applied. Thanks.
diff --git a/drivers/cpufreq/qcom-cpufreq-hw.c b/drivers/cpufreq/qcom-cpufreq-hw.c index 315ee987d2d3..6eb88463a24e 100644 --- a/drivers/cpufreq/qcom-cpufreq-hw.c +++ b/drivers/cpufreq/qcom-cpufreq-hw.c @@ -351,6 +351,12 @@ static int qcom_cpufreq_hw_cpu_init(struct cpufreq_policy *policy) dev_pm_opp_of_register_em(cpu_dev, policy->cpus); + if (policy_has_boost_freq(policy)) { + ret = cpufreq_enable_boost_support(); + if (ret) + dev_warn(cpu_dev, "failed to enable boost: %d\n", ret); + } + return 0; error: devm_iounmap(dev, base);
At least on sdm850, the 2956800 khz is detected as a boost frequency in function qcom_cpufreq_hw_read_lut(). Let's enable boost support by calling cpufreq_enable_boost_support(), so that we can get the boost frequency by switching it on via 'boost' sysfs entry like below. $ echo 1 > /sys/devices/system/cpu/cpufreq/boost Signed-off-by: Shawn Guo <shawn.guo@linaro.org> --- drivers/cpufreq/qcom-cpufreq-hw.c | 6 ++++++ 1 file changed, 6 insertions(+) -- 2.17.1