Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-08-02 Thread Viresh Kumar
On 31-07-17, 09:44, Viresh Kumar wrote: > On 29-07-17, 10:24, Ulf Hansson wrote: > > Let's invent a new genpd flag, GENPD_FLAG_PERF_STATE! > > > > The creator of the genpd then needs to set this before calling > > pm_genpd_init(). Similar as we are dealing with GENPD_FLAG_PM_CLK. > > > > The

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-08-02 Thread Viresh Kumar
On 31-07-17, 09:44, Viresh Kumar wrote: > On 29-07-17, 10:24, Ulf Hansson wrote: > > Let's invent a new genpd flag, GENPD_FLAG_PERF_STATE! > > > > The creator of the genpd then needs to set this before calling > > pm_genpd_init(). Similar as we are dealing with GENPD_FLAG_PM_CLK. > > > > The

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-30 Thread Viresh Kumar
On 29-07-17, 10:24, Ulf Hansson wrote: > Let's invent a new genpd flag, GENPD_FLAG_PERF_STATE! > > The creator of the genpd then needs to set this before calling > pm_genpd_init(). Similar as we are dealing with GENPD_FLAG_PM_CLK. > > The requirement for GENPD_FLAG_PERF_STATES, is to have the >

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-30 Thread Viresh Kumar
On 29-07-17, 10:24, Ulf Hansson wrote: > Let's invent a new genpd flag, GENPD_FLAG_PERF_STATE! > > The creator of the genpd then needs to set this before calling > pm_genpd_init(). Similar as we are dealing with GENPD_FLAG_PM_CLK. > > The requirement for GENPD_FLAG_PERF_STATES, is to have the >

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-29 Thread Ulf Hansson
On 28 July 2017 at 13:00, Viresh Kumar wrote: > On 21-07-17, 10:35, Ulf Hansson wrote: >> >> > +/* >> >> > + * Returns true if anyone in genpd's parent hierarchy has >> >> > + * set_performance_state() set. >> >> > + */ >> >> > +static bool

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-29 Thread Ulf Hansson
On 28 July 2017 at 13:00, Viresh Kumar wrote: > On 21-07-17, 10:35, Ulf Hansson wrote: >> >> > +/* >> >> > + * Returns true if anyone in genpd's parent hierarchy has >> >> > + * set_performance_state() set. >> >> > + */ >> >> > +static bool genpd_has_set_performance_state(struct generic_pm_domain

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-28 Thread Viresh Kumar
On 21-07-17, 10:35, Ulf Hansson wrote: > >> > +/* > >> > + * Returns true if anyone in genpd's parent hierarchy has > >> > + * set_performance_state() set. > >> > + */ > >> > +static bool genpd_has_set_performance_state(struct generic_pm_domain > >> > *genpd) > >> > +{ > >> > >> So this function

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-28 Thread Viresh Kumar
On 21-07-17, 10:35, Ulf Hansson wrote: > >> > +/* > >> > + * Returns true if anyone in genpd's parent hierarchy has > >> > + * set_performance_state() set. > >> > + */ > >> > +static bool genpd_has_set_performance_state(struct generic_pm_domain > >> > *genpd) > >> > +{ > >> > >> So this function

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-24 Thread Viresh Kumar
On 23-07-17, 09:20, Ulf Hansson wrote: > I should have been more clear. Walking the master list, then checking > each link without using locks - why is that safe? > > Then even if you think it's safe, then please explain in detail why its > needed. > > Walking the slave list as being done for

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-24 Thread Viresh Kumar
On 23-07-17, 09:20, Ulf Hansson wrote: > I should have been more clear. Walking the master list, then checking > each link without using locks - why is that safe? > > Then even if you think it's safe, then please explain in detail why its > needed. > > Walking the slave list as being done for

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-23 Thread Ulf Hansson
On 21 July 2017 at 11:05, Viresh Kumar wrote: > On 21-07-17, 10:35, Ulf Hansson wrote: >> This depends on how drivers are dealing with runtime PM in conjunction >> with the new pm_genpd_update_performance_state(). >> >> In case you don't want to manage some of this in

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-23 Thread Ulf Hansson
On 21 July 2017 at 11:05, Viresh Kumar wrote: > On 21-07-17, 10:35, Ulf Hansson wrote: >> This depends on how drivers are dealing with runtime PM in conjunction >> with the new pm_genpd_update_performance_state(). >> >> In case you don't want to manage some of this in genpd, then each >> driver

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-21 Thread Viresh Kumar
On 21-07-17, 10:35, Ulf Hansson wrote: > This depends on how drivers are dealing with runtime PM in conjunction > with the new pm_genpd_update_performance_state(). > > In case you don't want to manage some of this in genpd, then each > driver will have to drop their constraints every time they

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-21 Thread Viresh Kumar
On 21-07-17, 10:35, Ulf Hansson wrote: > This depends on how drivers are dealing with runtime PM in conjunction > with the new pm_genpd_update_performance_state(). > > In case you don't want to manage some of this in genpd, then each > driver will have to drop their constraints every time they

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-21 Thread Ulf Hansson
[...] > >> What happens when a power domain gets powered off and then on. Is the >> performance state restored? Please elaborate a bit on this. > > Can this happen while the genpd is still in use? If not then we > wouldn't have a problem here as the users of it would have revoked > their

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-21 Thread Ulf Hansson
[...] > >> What happens when a power domain gets powered off and then on. Is the >> performance state restored? Please elaborate a bit on this. > > Can this happen while the genpd is still in use? If not then we > wouldn't have a problem here as the users of it would have revoked > their

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-19 Thread Viresh Kumar
On 17-07-17, 14:38, Ulf Hansson wrote: > On 21 June 2017 at 09:10, Viresh Kumar wrote: > > Some platforms have the capability to configure the performance state of > > their Power Domains. The performance levels are identified by positive > > integer values, a lower value

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-19 Thread Viresh Kumar
On 17-07-17, 14:38, Ulf Hansson wrote: > On 21 June 2017 at 09:10, Viresh Kumar wrote: > > Some platforms have the capability to configure the performance state of > > their Power Domains. The performance levels are identified by positive > > integer values, a lower value represents lower

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-17 Thread Ulf Hansson
On 21 June 2017 at 09:10, Viresh Kumar wrote: > Some platforms have the capability to configure the performance state of > their Power Domains. The performance levels are identified by positive > integer values, a lower value represents lower performance state. > > This

Re: [PATCH V8 1/6] PM / Domains: Add support to select performance-state of domains

2017-07-17 Thread Ulf Hansson
On 21 June 2017 at 09:10, Viresh Kumar wrote: > Some platforms have the capability to configure the performance state of > their Power Domains. The performance levels are identified by positive > integer values, a lower value represents lower performance state. > > This patch adds a new genpd