Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-21 Thread Ulf Hansson
[...] > > > > Re-thinking this a bit from my earlier comments - and by following the > > > > above reasoning, it sounds like this better belongs in the > > > > driver/subsystem, without requiring any data from the core. > > > > > > > > The driver/subsystem could just store a timestamp in it's > >

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-21 Thread Ulf Hansson
On Wed, 19 Dec 2018 at 17:52, Vincent Guittot wrote: > > On Wed, 19 Dec 2018 at 17:36, Ulf Hansson wrote: > > > > On Wed, 19 Dec 2018 at 14:26, Vincent Guittot > > wrote: > > > > > > On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > > > > > > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Vincent Guittot
On Thu, 20 Dec 2018 at 09:16, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 17:52, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 17:36, Ulf Hansson wrote: > > > > > > On Wed, 19 Dec 2018 at 14:26, Vincent Guittot > > > wrote: > > > > > > > > On Wed, 19 Dec 2018 at 11:43, Ulf Hansson

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Ulf Hansson
[...] > Hold on. I am wondering if the drm driver could use the existing > pm_runtime_autosuspend_expiration() function instead. Isn't that > really that what is needed? No, it can't. I don't know why I thought that, sorry for the noise. U ___

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Ulf Hansson
On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > > > > > On Wed, 19 Dec 2018 at 11:11, Vincent Guittot > > > wrote: > > > > > > > > On Wed, 19 Dec 2018 at 10:58, Ulf Hansson

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Ulf Hansson
On Wed, 19 Dec 2018 at 11:11, Vincent Guittot wrote: > > On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > > wrote: > > > > > > Some drivers (like i915/drm) need to get the accounted suspended time. > > > pm_runtime_accounted_time_get()

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Ulf Hansson
On Tue, 18 Dec 2018 at 15:55, Vincent Guittot wrote: > > Some drivers (like i915/drm) need to get the accounted suspended time. > pm_runtime_accounted_time_get() will return the suspended or active > accounted time until now. I suggest to leave the active accounted time out for now. At least

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Ulf Hansson
On Wed, 19 Dec 2018 at 11:34, Vincent Guittot wrote: > > On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > > > On Wed, 19 Dec 2018 at 11:11, Vincent Guittot > > wrote: > > > > > > On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > > > > > > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-20 Thread Ulf Hansson
On Wed, 19 Dec 2018 at 14:26, Vincent Guittot wrote: > > On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot > > wrote: > > > > > > On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > > > > > > > > > > > > > > > > > > diff --git

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 17:36, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 14:26, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > > > > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot > > > wrote: > > > > > > > > On Wed, 19 Dec 2018 at 11:21, Ulf Hansson

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > wrote: > > > > Some drivers (like i915/drm) need to get the accounted suspended time. > > pm_runtime_accounted_time_get() will return the suspended or active > > accounted time until now. > > I

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 11:43, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 11:34, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > > > > > > > > > > > > > > diff --git a/drivers/base/power/runtime.c > > > > > > b/drivers/base/power/runtime.c > > > > > >

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 11:21, Ulf Hansson wrote: > > On Wed, 19 Dec 2018 at 11:11, Vincent Guittot > wrote: > > > > On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > > > > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > > > wrote: > > > > > > > > Some drivers (like i915/drm) need to get

Re: [RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-19 Thread Vincent Guittot
On Wed, 19 Dec 2018 at 10:58, Ulf Hansson wrote: > > On Tue, 18 Dec 2018 at 15:55, Vincent Guittot > wrote: > > > > Some drivers (like i915/drm) need to get the accounted suspended time. > > pm_runtime_accounted_time_get() will return the suspended or active > > accounted time until now. > > I

[RFC v3 1/3] PM/runtime: Add a new interface to get accounted time

2018-12-18 Thread Vincent Guittot
Some drivers (like i915/drm) need to get the accounted suspended time. pm_runtime_accounted_time_get() will return the suspended or active accounted time until now. Signed-off-by: Vincent Guittot --- drivers/base/power/runtime.c | 26 ++ include/linux/pm_runtime.h | 2