Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-20 Thread Rafael J. Wysocki
On Friday, October 20, 2017 10:46:07 PM CEST Bjorn Helgaas wrote: > On Mon, Oct 16, 2017 at 03:12:35AM +0200, Rafael J. Wysocki wrote: > > Hi All, > > > > Well, this took more time than expected, as I tried to cover everything I > > had > > in mind regarding PM flags for drivers. > > For the par

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-20 Thread Bjorn Helgaas
On Mon, Oct 16, 2017 at 03:12:35AM +0200, Rafael J. Wysocki wrote: > Hi All, > > Well, this took more time than expected, as I tried to cover everything I had > in mind regarding PM flags for drivers. For the parts that touch PCI, Acked-by: Bjorn Helgaas I doubt there'll be conflicts with chan

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
[...] > In this regards as we consider genpd being a trivial PM domain, those > examples your bring up above is too me also examples of trivial PM > domains. Especially because they don't deal with wakeups, as that is > taken care of by the drivers, right!? Not directly,

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
On 20 October 2017 at 03:19, Rafael J. Wysocki wrote: > On Thursday, October 19, 2017 2:21:07 PM CEST Ulf Hansson wrote: >> On 19 October 2017 at 00:12, Rafael J. Wysocki wrote: >> > On Wednesday, October 18, 2017 4:11:33 PM CEST Ulf Hansson wrote: >> >> [...] >> >> >> >> >> >> >> >> The reason w

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Rafael J. Wysocki
On Thursday, October 19, 2017 2:21:07 PM CEST Ulf Hansson wrote: > On 19 October 2017 at 00:12, Rafael J. Wysocki wrote: > > On Wednesday, October 18, 2017 4:11:33 PM CEST Ulf Hansson wrote: > >> [...] > >> > >> >> > >> >> The reason why pm_runtime_force_* needs to respects the hierarchy of > >> >

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Grygorii Strashko
On 10/19/2017 01:11 PM, Ulf Hansson wrote: > On 19 October 2017 at 20:04, Ulf Hansson wrote: >> On 19 October 2017 at 19:21, Grygorii Strashko >> wrote: >>> >>> >>> On 10/19/2017 03:33 AM, Ulf Hansson wrote: On 18 October 2017 at 23:48, Rafael J. Wysocki wrote: > On Wednesday, Octobe

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
On 19 October 2017 at 20:04, Ulf Hansson wrote: > On 19 October 2017 at 19:21, Grygorii Strashko > wrote: >> >> >> On 10/19/2017 03:33 AM, Ulf Hansson wrote: >>> On 18 October 2017 at 23:48, Rafael J. Wysocki wrote: On Wednesday, October 18, 2017 9:45:11 PM CEST Grygorii Strashko wrote: >>

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
On 19 October 2017 at 19:21, Grygorii Strashko wrote: > > > On 10/19/2017 03:33 AM, Ulf Hansson wrote: >> On 18 October 2017 at 23:48, Rafael J. Wysocki wrote: >>> On Wednesday, October 18, 2017 9:45:11 PM CEST Grygorii Strashko wrote: On 10/18/2017 09:11 AM, Ulf Hansson wrote: >>> >>>

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
[...] >>> > Say you want to leave the parent suspended after system resume, but the >>> > child drivers use pm_runtime_force_suspend|resume(). The parent would >>> > then >>> > need to use pm_runtime_force_suspend|resume() too, no? >>> >>> Actually no. >>> >>> Currently the other options of "def

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Grygorii Strashko
On 10/19/2017 03:33 AM, Ulf Hansson wrote: > On 18 October 2017 at 23:48, Rafael J. Wysocki wrote: >> On Wednesday, October 18, 2017 9:45:11 PM CEST Grygorii Strashko wrote: >>> >>> On 10/18/2017 09:11 AM, Ulf Hansson wrote: >> >> [...] >> >> That's the point. We know pm_runtime_force_* work

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
On 19 October 2017 at 00:12, Rafael J. Wysocki wrote: > On Wednesday, October 18, 2017 4:11:33 PM CEST Ulf Hansson wrote: >> [...] >> >> >> >> >> The reason why pm_runtime_force_* needs to respects the hierarchy of >> >> the RPM callbacks, is because otherwise it can't safely update the >> >> runt

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-19 Thread Ulf Hansson
On 18 October 2017 at 23:48, Rafael J. Wysocki wrote: > On Wednesday, October 18, 2017 9:45:11 PM CEST Grygorii Strashko wrote: >> >> On 10/18/2017 09:11 AM, Ulf Hansson wrote: > > [...] > >> >>> That's the point. We know pm_runtime_force_* works nicely for the >> >>> trivial middle-layer cases. >

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Rafael J. Wysocki
On Wednesday, October 18, 2017 4:11:33 PM CEST Ulf Hansson wrote: > [...] > > >> > >> The reason why pm_runtime_force_* needs to respects the hierarchy of > >> the RPM callbacks, is because otherwise it can't safely update the > >> runtime PM status of the device. > > > > I'm not sure I follow thi

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Rafael J. Wysocki
On Wednesday, October 18, 2017 2:34:10 PM CEST Ulf Hansson wrote: > [...] > > >> Are there any major reasons why the appended patch (obviously untested) > >> won't > >> work, then? > > > > OK, there is a reason, which is the optimizations bundled into > > pm_runtime_force_*, because (a) the devic

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Rafael J. Wysocki
On Wednesday, October 18, 2017 9:45:11 PM CEST Grygorii Strashko wrote: > > On 10/18/2017 09:11 AM, Ulf Hansson wrote: [...] > >>> That's the point. We know pm_runtime_force_* works nicely for the > >>> trivial middle-layer cases. > >> > >> In which cases the middle-layer callbacks don't exist,

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Grygorii Strashko
On 10/18/2017 09:11 AM, Ulf Hansson wrote: > [...] > >>> >>> The reason why pm_runtime_force_* needs to respects the hierarchy of >>> the RPM callbacks, is because otherwise it can't safely update the >>> runtime PM status of the device. >> >> I'm not sure I follow this requirement. Why is that

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Ulf Hansson
[...] >> >> The reason why pm_runtime_force_* needs to respects the hierarchy of >> the RPM callbacks, is because otherwise it can't safely update the >> runtime PM status of the device. > > I'm not sure I follow this requirement. Why is that so? If the PM domain controls some resources for the

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Rafael J. Wysocki
On Wednesday, October 18, 2017 1:57:52 PM CEST Ulf Hansson wrote: > On 18 October 2017 at 02:39, Rafael J. Wysocki wrote: > > On Tuesday, October 17, 2017 9:41:16 PM CEST Ulf Hansson wrote: > > > > [cut] > > > >> > > >> >> deploying this and from a middle layer point of view, all the trivial > >>

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Ulf Hansson
[...] >> Are there any major reasons why the appended patch (obviously untested) won't >> work, then? > > OK, there is a reason, which is the optimizations bundled into > pm_runtime_force_*, because (a) the device may be left in runtime suspend > by them (in which case amba_pm_suspend_early() in m

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Ulf Hansson
On 18 October 2017 at 02:39, Rafael J. Wysocki wrote: > On Tuesday, October 17, 2017 9:41:16 PM CEST Ulf Hansson wrote: > > [cut] > >> > >> >> deploying this and from a middle layer point of view, all the trivial >> >> cases supports this. >> > >> > These functions are wrong, however, because they

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-18 Thread Rafael J. Wysocki
On Wednesday, October 18, 2017 2:39:24 AM CEST Rafael J. Wysocki wrote: > On Tuesday, October 17, 2017 9:41:16 PM CEST Ulf Hansson wrote: > > [cut] > > > > > > >> deploying this and from a middle layer point of view, all the trivial > > >> cases supports this. > > > > > > These functions are wron

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-17 Thread Rafael J. Wysocki
On Tuesday, October 17, 2017 9:41:16 PM CEST Ulf Hansson wrote: [cut] > > > >> deploying this and from a middle layer point of view, all the trivial > >> cases supports this. > > > > These functions are wrong, however, because they attempt to reuse the > > whole callback *path* instead of just re

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-17 Thread Rafael J. Wysocki
On Tuesday, October 17, 2017 10:12:19 PM CEST Alan Stern wrote: > On Tue, 17 Oct 2017, Ulf Hansson wrote: > > > > These functions are wrong, however, because they attempt to reuse the > > > whole callback *path* instead of just reusing driver callbacks. The > > > *only* reason why it all "works"

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-17 Thread Alan Stern
On Tue, 17 Oct 2017, Ulf Hansson wrote: > > These functions are wrong, however, because they attempt to reuse the > > whole callback *path* instead of just reusing driver callbacks. The > > *only* reason why it all "works" is because there are no middle layer > > callbacks involved in that now. >

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-17 Thread Ulf Hansson
[...] >> >> I am not sure I fully understand the goal you have with this series. >> Can we please try to get that clear before I continue the review. > > Quoting from the above: > > "This patch series focuses on addressing those problems so as to make it > easier to reuse callback routines by poin

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-17 Thread Rafael J. Wysocki
On Tuesday, October 17, 2017 10:36:39 AM CEST Ulf Hansson wrote: > On 16 October 2017 at 03:12, Rafael J. Wysocki wrote: > > Hi All, > > > > Well, this took more time than expected, as I tried to cover everything I > > had > > in mind regarding PM flags for drivers. > > > > This work was triggere

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-17 Thread Ulf Hansson
On 16 October 2017 at 03:12, Rafael J. Wysocki wrote: > Hi All, > > Well, this took more time than expected, as I tried to cover everything I had > in mind regarding PM flags for drivers. > > This work was triggered by attempts to fix and optimize PM in the > i2c-designware-platdev driver that end

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-16 Thread Rafael J. Wysocki
On Mon, Oct 16, 2017 at 9:08 AM, Greg Kroah-Hartman wrote: > On Mon, Oct 16, 2017 at 03:12:35AM +0200, Rafael J. Wysocki wrote: >> Hi All, >> >> Well, this took more time than expected, as I tried to cover everything I had >> in mind regarding PM flags for drivers. >> >> This work was triggered by

Re: [PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-16 Thread Greg Kroah-Hartman
On Mon, Oct 16, 2017 at 03:12:35AM +0200, Rafael J. Wysocki wrote: > Hi All, > > Well, this took more time than expected, as I tried to cover everything I had > in mind regarding PM flags for drivers. > > This work was triggered by attempts to fix and optimize PM in the > i2c-designware-platdev d

[PATCH 0/12] PM / sleep: Driver flags for system suspend/resume

2017-10-15 Thread Rafael J. Wysocki
Hi All, Well, this took more time than expected, as I tried to cover everything I had in mind regarding PM flags for drivers. This work was triggered by attempts to fix and optimize PM in the i2c-designware-platdev driver that ended up with adding a couple of flags to the driver's internal data s