All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kevin Hilman <khilman@baylibre.com>
To: Viresh Kumar <viresh.kumar@linaro.org>
Cc: Rafael Wysocki <rjw@rjwysocki.net>,
	ulf.hansson@linaro.org, linux-pm@vger.kernel.org,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>, Nishanth Menon <nm@ti.com>,
	robh+dt@kernel.org, lina.iyer@linaro.org, rnayak@codeaurora.org,
	sudeep.holla@arm.com, linux-kernel@vger.kernel.org,
	Len Brown <len.brown@intel.com>, Pavel Machek <pavel@ucw.cz>,
	Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>
Subject: Re: [PATCH V13 1/7] PM / Domains: Add support to select performance-state of domains
Date: Mon, 16 Oct 2017 03:59:54 +0200	[thread overview]
Message-ID: <7hk1zvx36t.fsf@baylibre.com> (raw)
In-Reply-To: <990605fb7b17b75abe63c542a4be2e176152b9f6.1507800860.git.viresh.kumar@linaro.org> (Viresh Kumar's message of "Thu, 12 Oct 2017 15:07:23 +0530")

Viresh Kumar <viresh.kumar@linaro.org> writes:

> Some platforms have the capability to configure the performance state of
> PM domains. This patch enhances the genpd core to support such
> platforms.
>
> The performance levels (within the genpd core) are identified by
> positive integer values, a lower value represents lower performance
> state.
>
> This patch adds a new genpd API, which is called by user drivers (like
> OPP framework):
>
> - int dev_pm_genpd_set_performance_state(struct device *dev,
> 					 unsigned int state);
>
>   This updates the performance state constraint of the device on its PM
>   domain. On success, the genpd will have its performance state set to a
>   value which is >= "state" passed to this routine. The genpd core calls
>   the genpd->set_performance_state() callback, if implemented,
>   else -ENODEV is returned to the caller.
>
> The PM domain drivers need to implement the following callback if they
> want to support performance states.
>
> - int (*set_performance_state)(struct generic_pm_domain *genpd,
> 			       unsigned int state);
>
>   This is called internally by the genpd core on several occasions. The
>   genpd core passes the genpd pointer and the aggregate of the
>   performance states of the devices supported by that genpd to this
>   callback. This callback must update the performance state of the genpd
>   (in a platform dependent way).
>
> The power domains can avoid supplying above callback, if they don't
> support setting performance-states.
>
> Currently we aren't propagating performance state changes of a subdomain
> to its masters as we don't have hardware that needs it right now. Over
> that, the performance states of subdomain and its masters may not have
> one-to-one mapping and would require additional information. We can get
> back to this once we have hardware that needs it.
>
> Tested-by: Rajendra Nayak <rnayak@codeaurora.org>
> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>

OK, I really like the OPP-related changes suggested by Ulf, and you've
removed a lot of the complexity that made it a bit confusing to follow.
It's definitley cleaned up and much easier to follow.

Thanks for your persistence.  This is definitely a needed feature.

I have some usecases in mind where the performance state might need to
be selected based on OPP voltage, but that's now a change that can be
added later when that feature is needed.

Reviewed-by: Kevin Hilman <khilman@baylibre.com>

  parent reply	other threads:[~2017-10-16  8:35 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  7:24 [PATCH V11 0/7] PM / Domains: Performance state support Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 1/7] PM / Domains: Add support to select performance-state of domains Viresh Kumar
2017-10-11 11:27   ` Ulf Hansson
2017-10-12  7:09   ` [PATCH V12 " Viresh Kumar
2017-10-12  8:01     ` Ulf Hansson
2017-10-12  9:37   ` [PATCH V13 " Viresh Kumar
2017-10-12  9:43     ` Ulf Hansson
2017-10-16  1:59     ` Kevin Hilman [this message]
2017-10-16  8:56       ` Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 2/7] OPP: Support updating performance state of device's power domain Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 3/7] OPP: Add dev_pm_opp_{un}register_get_pstate_helper() Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 4/7] soc: qcom: rpmpd: Add driver to model cx/mx power domains Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 5/7] soc: qcom: rpmpd: Add support for set performance state Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 6/7] OPP: qcom: Add support to get performance states corresponding to OPPs Viresh Kumar
2017-10-11  7:24 ` [PATCH V11 7/7] mmc: sdhci-msm: Adapt the driver to use OPPs to set clocks/performance state Viresh Kumar
2017-10-11 11:43 ` [PATCH V11 0/7] PM / Domains: Performance state support Ulf Hansson

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=7hk1zvx36t.fsf@baylibre.com \
    --to=khilman@baylibre.com \
    --cc=andy.gross@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=len.brown@intel.com \
    --cc=lina.iyer@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=pavel@ucw.cz \
    --cc=rjw@rjwysocki.net \
    --cc=rnayak@codeaurora.org \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@codeaurora.org \
    --cc=sudeep.holla@arm.com \
    --cc=ulf.hansson@linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@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.