Am Montag, 26. September 2016, 09:25:11 CEST schrieb Viresh Kumar:Yesï it is necessary to modify all opp voltages and I agreed with Heiko.
On 12-09-16, 14:55, Stephen Boyd wrote:If I understand it correctly, depending on the leakage value stored in an
On 08/29, Viresh Kumar wrote:Perhaps yes, we should have a common place for doing all that.
On 18-08-16, 16:52, Finlye Xiao wrote:I had a patch to modify the voltage at runtime for the "current"
+static int rockchip_adjust_opp_table(struct device *cpu_dev,I wouldn't prefer altering the opp tables from individual drivers at
+ struct cpufreq_frequency_table *table,
+ int volt)
+{
+ struct opp_table *opp_table;
+ struct cpufreq_frequency_table *pos;
+ struct dev_pm_opp *opp;
+
+ if (!volt)
+ return 0;
+
+ rcu_read_lock();
+
+ opp_table = _find_opp_table(cpu_dev);
+ if (IS_ERR(opp_table)) {
+ rcu_read_unlock();
+ return PTR_ERR(opp_table);
+ }
+
+ cpufreq_for_each_valid_entry(pos, table) {
+ opp = dev_pm_opp_find_freq_exact(cpu_dev, pos->frequency * 1000,
+ true);
+ if (IS_ERR(opp))
+ continue;
+
+ opp->u_volt += volt;
+ opp->u_volt_min += volt;
+ opp->u_volt_max += volt;
+ }
+
+ rcu_read_unlock();
+
+ return 0;
+}
all. At the least, it should be done via some helpers exposed by the
core.
But before that I would like to hear from Stephen a bit as I recall he
was also working on something similar.
OPP. Now that we have regulator and clk control inside OPP that
became a little easier to do without having to do some notifier
from the OPP layer to the consumers. I haven't had time to revive
those patches though. Should we do that?
Does this need to modifyFinlye, can you please answer this ?
anything besides the OPP the device is currently running at?
efuse, all opp voltages are reduced by a certain value. Right now the driver
does it in one go for the full opp table, but of course could also do it for
each new opp individually before it gets set.