All of lore.kernel.org
 help / color / mirror / Atom feed
From: Viresh Kumar <viresh.kumar@linaro.org>
To: Kevin Hilman <khilman@baylibre.com>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	ulf.hansson@linaro.org, linaro-kernel@lists.linaro.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	sboyd@codeaurora.org, nm@ti.com, robh+dt@kernel.org,
	lina.iyer@linaro.org, rnayak@codeaurora.org
Subject: Re: [PATCH V2 0/6] PM / Domains: Implement domain performance states
Date: Mon, 20 Feb 2017 15:05:56 +0530	[thread overview]
Message-ID: <20170220093556.GR21911@vireshk-i7> (raw)
In-Reply-To: <m2mvdk4d3o.fsf@baylibre.com>

On 17-02-17, 15:22, Kevin Hilman wrote:
> Viresh Kumar <viresh.kumar@linaro.org> writes:
> 
> > An earlier series[1] tried to implement bindings for PM domain
> > performance states. Rob Herring suggested that we can actually merge the
> > supporting code first instead of bindings, as that will make things
> > easier to understand for all. The bindings can be decided and merged
> > later.
> >
> > The bindings [1] aren't discarded yet and this series is based on a
> > version of those only. The bindings are only used by the last patch,
> > which should not be applied and is only sent for completeness.
> >
> > IOW, this series doesn't have any dependencies and can be merged
> > straight away without waiting for the DT bindings.
> >
> > A brief summary of the problem this series is trying to solve:
> >
> > Some platforms have the capability to configure the performance state of
> > their Power Domains. The performance levels are represented by positive
> > integer values, a lower value represents lower performance state.
> 
> And what about domains where the performance levels are represented by
> someting other than positive integer values? 

The V2 bindings were modified to take that into account:

https://marc.info/?l=linux-kernel&m=148154021427727&w=2

Copying an example from it:

+               domain_perf_state1: pstate@1 {
+                       performance-level = <1>;
+                       domain-microvolt = <970000 975000 985000>;
+               };

The above node describes one performance state for the power domain.
This node can have any number of configurables depending on the
individual platforms. The performance-level is the integer number we
have been talking about in this series, which can be used in all the
calculations to differentiate between different levels.

The final code in the generic PM layer will end up calling
set_performance_state(performance-level); Now the drivers can go find
a corresponding node to find different configurables like
domain-microvolt, etc and configure the hardware. Or in simple cases,
like Qcom, the performance-level can be used directly without
referring to the node.

Consider the 'performance-level' field as the 'opp-hz' field in the
OPP tables which is used to distinguish lower/higher OPPs. Just that
we will not always have a frequency here and so an integer value.

> IMO, this implementation should start with a more generic approach
> (e.g. OPPs) that would be useful on more SoCs that just qcom.

I agree with that opinion. Perhaps things became a bit confusing as
the bindings were sent separately earlier and the code followed
separately. Also not everything was finished here to follow proper
bindings. Like the generic helpers weren't introduced yet to parse the
nodes like domain_perf_state1.

> For SoCs
> like QCOM, you could use dummy/simplfied OPPs that represent the integer
> values passed to the qcom firmware.

I am not sure if reusing OPPs here would be a good choice. I would
rather have separate nodes like what I defined earlier.

In the next version I will try to send all things together and try to
close all the open ends..

-- 
viresh

      reply	other threads:[~2017-02-20 10:41 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-09  3:41 [PATCH V2 0/6] PM / Domains: Implement domain performance states Viresh Kumar
2017-02-09  3:41 ` [PATCH V2 1/6] PM / QOS: Add default case to the switch Viresh Kumar
2017-02-09 14:24   ` Pavel Machek
2017-02-10  6:00     ` Viresh Kumar
2017-02-10 12:15       ` Pavel Machek
2017-02-13  3:11         ` Viresh Kumar
2017-02-10 21:24       ` Pavel Machek
2017-02-09  3:41 ` [PATCH V2 2/6] PM / QOS: Pass request type to dev_pm_qos_{add|remove}_notifier() Viresh Kumar
2017-02-09  3:41 ` [PATCH V2 3/6] PM / QOS: Add 'performance' request Viresh Kumar
2017-02-21 15:37   ` Ulf Hansson
2017-02-09  3:41 ` [PATCH V2 4/6] PM / domain: Register for PM QOS performance notifier Viresh Kumar
2017-02-17 23:54   ` Kevin Hilman
2017-02-20  5:01     ` Viresh Kumar
2017-02-21 15:28       ` Ulf Hansson
2017-02-22  3:25         ` Viresh Kumar
2017-02-09  3:41 ` [PATCH V2 5/6] PM / domain: Save/restore performance state at runtime suspend/resume Viresh Kumar
2017-02-17 23:58   ` Kevin Hilman
2017-02-20  9:18     ` Viresh Kumar
2017-02-09  3:41 ` [PATCH V2 6/6] PM / OPP: Add support to parse domain-performance-state Viresh Kumar
2017-02-17  5:38 ` [PATCH V2 0/6] PM / Domains: Implement domain performance states Viresh Kumar
2017-02-17  7:46   ` Ulf Hansson
2017-02-17 23:22 ` Kevin Hilman
2017-02-20  9:35   ` Viresh Kumar [this message]

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=20170220093556.GR21911@vireshk-i7 \
    --to=viresh.kumar@linaro.org \
    --cc=khilman@baylibre.com \
    --cc=lina.iyer@linaro.org \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.