From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC 0/2] Qualcomm RPM sleep states
Date: Fri, 21 Nov 2014 15:43:54 -0800 [thread overview]
Message-ID: <546FCE3A.1000005@codeaurora.org> (raw)
In-Reply-To: <20141121232738.GP3815@sirena.org.uk>
On 11/21/2014 03:27 PM, Mark Brown wrote:
> On Fri, Nov 21, 2014 at 03:10:44PM -0800, Stephen Boyd wrote:
>> On 11/10/2014 02:52 PM, Bjorn Andersson wrote:
> I don't seem to have been CCed on earlier messages here, or perhaps the
> lack of obvious relevance (like mention of regulators) caused me not to
> read the mails so I'm missing a *lot* of context.
This mail has been lingering in my inbox for weeks just haven't gotten
around to replying.
This sleep set/active set stuff has to do with more than just
regulators. It applies to any resource that the RPM provides, but
regulators are a primary use case so you're on Cc and it would be great
if you fully understood the regulator aspect here.
>
>
>> So the CPU really wants to only be voting for the HFPLL regulator
>> supplies in the active set. This way, if we're not using the HFPLLs
>> (i.e. the CPUs are all running off the global PLL), then we can disable
>> the regulator in the active set (RPM code only caches sleep set so we
>> won't be doing unnecessary flushes in the idle/suspend path). The clock
>> driver will make sure to turn off the HFPLLs before we go into a sleep
>> state that would trigger a switch from active to sleep set (commonly
>> referred to as RPM notification). It very well could be that there are
>> other consumers of the same regulator, but that doesn't matter to the
>> CPU clock driver because it only cares about the active set. Now you may
>> ask why can't the CPU clock driver disable the regulator when the HFPLL
>> is disabled? We don't do that in this case because a) it causes more RPM
>> communication overhead and b) we will be in atomic context when the
>> HFPLL is disabled during idle/suspend and the regulator APIs are
>> sleeping calls. In the non-idle/suspend path we will disable the regulator.
> I'm afraid the above is making very little sense to me. What is
> "voting" and how is it different to "enabling", "notification" or
> "flushing"?
The regulators are shared between multiple "masters" in the SoC. So the
CPUs that are running linux only "vote" on attributes of regulators and
then another processor that isn't running linux (called RPM) aggregates
the request from Linux along with other "masters" like wifi, modem, etc.
and then changes something for that regulator like voltage,
enable/disable, etc. We also have some hardware next to our CPUs that
notifies the RPM when we transition into or out of idle/suspend (it's
called an SPM). This is the notification part. Flushing has to do with
batching up multiple RPM sleep set requests and sending them before we
enter idle/suspend.
>
>> Also the active/sleep sets are about more than just on/off state. We may
>> have a situation where the active set voltage (or some other attribute
>> like current, mode, etc.) is different than the sleep set voltage. For
> In a regulator API context if we are talking about suspend it's expected
> that all properties may vary in suspend.
>
>> example, the CPU is supplied by a digital logic regulator that is shared
>> with other digital logic in the SoC (GPU, wifi, etc.). The CPU may
>> require some high voltage, but the GPU only needs some lower voltage.
>> The suspend/idle code relies on the fact that the GPU is voting on the
>> active+sleep regulator while the CPU is voting on the active only
>> regulator so that the RPM can automatically switch between high voltage
>> and low voltage when the CPU notifies the RPM that it's gone idle (or
>> the CPU wakes up).
> Again I'm not following this at all, sorry.
Hopefully it's clear now. If not I can clarify further.
--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
next prev parent reply other threads:[~2014-11-21 23:43 UTC|newest]
Thread overview: 51+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-10 22:52 [RFC 0/2] Qualcomm RPM sleep states Bjorn Andersson
2014-11-10 22:52 ` [RFC 1/2] mfd: qcom-rpm: Expose sleep state resources to clients Bjorn Andersson
2014-11-11 12:04 ` Lee Jones
2014-11-11 18:33 ` Bjorn Andersson
2014-11-12 9:52 ` Lee Jones
2014-11-12 14:45 ` Lina Iyer
2014-11-12 19:23 ` Bjorn Andersson
2014-11-19 18:06 ` Lina Iyer
2014-11-12 19:55 ` Bjorn Andersson
2014-11-10 22:52 ` [RFC 2/2] regulator: qcom-rpm: Implement RPM assisted disable Bjorn Andersson
2014-11-11 9:11 ` Andreas Färber
2014-11-11 18:34 ` Bjorn Andersson
2014-11-11 11:59 ` Lee Jones
2014-11-11 18:39 ` Bjorn Andersson
2014-11-11 14:21 ` Javier Martinez Canillas
2014-11-11 19:23 ` Bjorn Andersson
2014-11-21 23:10 ` [RFC 0/2] Qualcomm RPM sleep states Stephen Boyd
2014-11-21 23:27 ` Mark Brown
2014-11-21 23:43 ` Stephen Boyd [this message]
2014-11-21 23:54 ` Mark Brown
2014-11-22 0:03 ` Stephen Boyd
2014-11-22 0:16 ` Bjorn Andersson
2014-11-24 18:16 ` Mark Brown
2014-11-24 21:19 ` Stephen Boyd
2014-11-25 20:44 ` Mark Brown
2014-11-26 1:02 ` Stephen Boyd
2014-11-26 13:40 ` Mark Brown
2014-11-27 1:51 ` Stephen Boyd
2014-11-27 18:56 ` Mark Brown
2014-11-26 23:34 ` Bjorn Andersson
2014-11-27 19:02 ` Mark Brown
2014-11-27 19:42 ` Bjorn Andersson
2014-11-28 20:16 ` Mark Brown
2014-12-04 21:15 ` Stephen Boyd
2014-12-08 18:06 ` Bjorn Andersson
2014-12-08 19:39 ` Mark Brown
2014-12-08 20:55 ` Bjorn Andersson
2014-12-09 18:16 ` Mark Brown
2014-12-09 19:25 ` Bjorn Andersson
2014-12-09 20:28 ` Mark Brown
2014-12-11 22:36 ` Bjorn Andersson
2014-12-15 18:04 ` Mark Brown
2014-12-16 6:05 ` Bjorn Andersson
2014-12-26 17:09 ` Mark Brown
2014-12-29 21:54 ` Bjorn Andersson
2014-12-30 16:43 ` Mark Brown
2014-11-24 17:02 ` Bjorn Andersson
2014-11-24 21:19 ` Stephen Boyd
2014-11-24 21:59 ` Bjorn Andersson
2014-11-25 0:02 ` Stephen Boyd
2014-11-26 22:49 ` Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=546FCE3A.1000005@codeaurora.org \
--to=sboyd@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).