lkml.org 
[lkml]   [2017]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH V13 1/7] PM / Domains: Add support to select performance-state of domains
Date
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>

\
 
 \ /
  Last update: 2017-10-16 10:36    [W:0.084 / U:0.736 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site