Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1491064
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Viresh Kumar <viresh.kumar@linaro.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 4/4] PM / AVS: rockchip-cpu-avs: add driver handling Rockchip cpu avs |
| Date | Mon, 26 Sep 2016 06:00:01 +0200 |
| Message-ID | <slvfb-73m-5@gated-at.bofh.it> (permalink) |
| References | <s7rl7-5No-5@gated-at.bofh.it> <s7rl7-5No-3@gated-at.bofh.it> <sbnVD-3F0-5@gated-at.bofh.it> <sgHqF-NE-23@gated-at.bofh.it> |
| X-Original-To | Stephen Boyd <sboyd@codeaurora.org> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=7q4awO19jZ60TS83UBtP/aPxJKEo7JyKbAZP7+dfZOQ=; b=PDPA42S9gvMpCnDLR7c+DIwvUq5eHcSjSJ+cTUOVIJJ1hYucP3PLNwsK1FBr6T0Qhx cd2/apZ6b081Oa6kFoiz/0J5G5NTqsbyojrmFBm/uddNR/8yVaN2o3EcH96YXZA/vKMO 10+lSHUe9zKzVuw16Bg2gyQaUrxgUII9LUWEI= |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=7q4awO19jZ60TS83UBtP/aPxJKEo7JyKbAZP7+dfZOQ=; b=ZKp55lNMowe9KiF26whoknZaEBPLqKMWYIqVp6ItBPlZjrl6scffoJedyA2dZxmPwQ Eh6DGN+Y/B4nEBGAM4kqDaXjCU0J/8WCbTt55c8XryJamzDPD1PPNbTt4E+L9ZjShquE nKMu2AnWMD2NErGZthOhsaBcE/xn40NTIIVP6wUpC5hbe8KvlFDR9ShoKebtp5Gv97AL SP8mxrFqvVxJuuUAdkK8GYB5wZhQ86lUWxzkFzhBTxhwK7xbVoaKF72Boa09hR22Xii5 gZyktlWoG1qPvt51a+HmXj0m1BMdtKZu8HhkT/O4QFSpPN5tpceWDZvN23uP3rYh1xr4 XMBw== |
| X-Gm-Message-State | AE9vXwM53YD4dEZgz7+V9Rtv3+REi9eZygYmtR21nUs2anWKtzErqc4ZMTt3aS4LBFLEj4WP |
| X-Received | by 10.66.253.101 with SMTP id zz5mr35023395pac.32.1474862114867; Sun, 25 Sep 2016 20:55:14 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.24 (2015-08-30) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 60 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Finlye Xiao <finley.xiao@rock-chips.com>, srinivas.kandagatla@linaro.org, maxime.ripard@free-electrons.com, heiko@sntech.de, robh+dt@kernel.org, frowand.list@gmail.com, sre@kernel.org, dbaryshkov@gmail.com, dwmw2@infradead.org, mark.rutland@arm.com, khilman@kernel.org, nm@ti.com, rjw@rjwysocki.net, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, wxt@rock-chips.com, jay.xu@rock-chips.com, rocky.hao@rock-chips.com, tim.chen@rock-chips.com, tony.xie@rock-chips.com, ulysses.huang@rock-chips.com, lin.huang@rock-chips.com |
| X-Original-Date | Mon, 26 Sep 2016 09:25:11 +0530 |
| X-Original-Message-ID | <20160926035511.GG17336@vireshk-i7> |
| X-Original-References | <1471510341-63926-1-git-send-email-finley.xiao@rock-chips.com> <1471510341-63926-5-git-send-email-finley.xiao@rock-chips.com> <20160829060801.GB5094@vireshk-i7> <20160912215515.GF7243@codeaurora.org> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1491064 |
Show key headers only | View raw
On 12-09-16, 14:55, Stephen Boyd wrote:
> On 08/29, Viresh Kumar wrote:
> > On 18-08-16, 16:52, Finlye Xiao wrote:
> > > +static int rockchip_adjust_opp_table(struct device *cpu_dev,
> > > + 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;
> > > +}
> >
> > I wouldn't prefer altering the opp tables from individual drivers at 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.
> >
>
> I had a patch to modify the voltage at runtime for the "current"
> 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?
Perhaps yes, we should have a common place for doing all that.
> Does this need to modify
> anything besides the OPP the device is currently running at?
Finlye, can you please answer this ?
--
viresh
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v2 4/4] PM / AVS: rockchip-cpu-avs: add driver handling Rockchip cpu avs Viresh Kumar <viresh.kumar@linaro.org> - 2016-09-26 06:00 +0200
Re: [PATCH v2 4/4] PM / AVS: rockchip-cpu-avs: add driver handling Rockchip cpu avs Heiko Stuebner <heiko@sntech.de> - 2016-09-26 10:10 +0200
Re: [PATCH v2 4/4] PM / AVS: rockchip-cpu-avs: add driver handling Rockchip cpu avs Finley Xiao <finley.xiao@rock-chips.com> - 2016-09-27 10:50 +0200
Re: [PATCH v2 4/4] PM / AVS: rockchip-cpu-avs: add driver handling Rockchip cpu avs Stephen Boyd <sboyd@codeaurora.org> - 2016-09-28 00:20 +0200
csiph-web