Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-15 Thread Rafael J. Wysocki
On Thursday, February 15, 2018 10:27:10 PM CET Saravana Kannan wrote: > On 02/05/2018 01:05 AM, Viresh Kumar wrote: > > On 05-02-18, 09:50, Rafael J. Wysocki wrote: > >> By design (which I admit may be confusing) it should be fine to call > >> dpm_resume_end() after a failing dpm_suspend_start(), w

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-15 Thread Saravana Kannan
On 02/05/2018 01:05 AM, Viresh Kumar wrote: On 05-02-18, 09:50, Rafael J. Wysocki wrote: By design (which I admit may be confusing) it should be fine to call dpm_resume_end() after a failing dpm_suspend_start(), whatever the reason for the failure is. cpufreq_suspend/resume() don't take that in

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-05 Thread Viresh Kumar
On 05-02-18, 10:19, Rafael J. Wysocki wrote: > On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote: > > diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c > > index 41d148af7748..95b1c4afe14e 100644 > > --- a/drivers/cpufreq/cpufreq.c > > +++ b/drivers/cpufreq/cpufreq.c > > @@

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-05 Thread Rafael J. Wysocki
On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote: > cpufreq_resume can be called even without preceding cpufreq_suspend. > This can happen in following scenario: > > suspend_devices_and_enter >--> dpm_suspend_start > --> dpm_prepare > --> device_prepare

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-05 Thread Viresh Kumar
On 05-02-18, 09:50, Rafael J. Wysocki wrote: > By design (which I admit may be confusing) it should be fine to call > dpm_resume_end() after a failing dpm_suspend_start(), whatever the reason > for the failure is. cpufreq_suspend/resume() don't take that into account, > everybody else does. Hmm,

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-05 Thread Rafael J. Wysocki
On Monday, February 5, 2018 5:01:18 AM CET Viresh Kumar wrote: > On 02-02-18, 13:28, Bo Yan wrote: > > On 02/02/2018 11:34 AM, Saravana Kannan wrote: > > >I rather have this fixed in the dpm_suspend/resume() code. This is just > > >masking the first issue that's being caused by unbalanced error han

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-04 Thread Viresh Kumar
On 02-02-18, 13:28, Bo Yan wrote: > On 02/02/2018 11:34 AM, Saravana Kannan wrote: > >I rather have this fixed in the dpm_suspend/resume() code. This is just > >masking the first issue that's being caused by unbalanced error handling. > >If that means adding flags in dpm_suspend/resume() then that'

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-02 Thread Bo Yan
On 02/02/2018 11:34 AM, Saravana Kannan wrote: On 02/02/2018 03:54 AM, Rafael J. Wysocki wrote: On Wednesday, January 24, 2018 9:53:14 PM CET Bo Yan wrote: On 01/23/2018 06:02 PM, Rafael J. Wysocki wrote: On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote:    drivers/cpufreq/cpufreq.c

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-02 Thread Saravana Kannan
On 02/02/2018 03:54 AM, Rafael J. Wysocki wrote: On Wednesday, January 24, 2018 9:53:14 PM CET Bo Yan wrote: On 01/23/2018 06:02 PM, Rafael J. Wysocki wrote: On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote: drivers/cpufreq/cpufreq.c | 4 1 file changed, 4 insertions(+) di

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-02-02 Thread Rafael J. Wysocki
On Wednesday, January 24, 2018 9:53:14 PM CET Bo Yan wrote: > > On 01/23/2018 06:02 PM, Rafael J. Wysocki wrote: > > On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote: > >> drivers/cpufreq/cpufreq.c | 4 > >> 1 file changed, 4 insertions(+) > >> > >> diff --git a/drivers/cpufreq/cp

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-01-24 Thread Bo Yan
On 01/23/2018 06:02 PM, Rafael J. Wysocki wrote: On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote: drivers/cpufreq/cpufreq.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c index 41d148af7748..95b1c4afe14e 100644 --- a/dr

Re: [PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-01-23 Thread Rafael J. Wysocki
On Tuesday, January 23, 2018 10:57:55 PM CET Bo Yan wrote: > cpufreq_resume can be called even without preceding cpufreq_suspend. > This can happen in following scenario: > > suspend_devices_and_enter >--> dpm_suspend_start > --> dpm_prepare > --> device_prepare

[PATCH] cpufreq: skip cpufreq resume if it's not suspended

2018-01-23 Thread Bo Yan
cpufreq_resume can be called even without preceding cpufreq_suspend. This can happen in following scenario: suspend_devices_and_enter --> dpm_suspend_start --> dpm_prepare --> device_prepare : this function errors out --> dpm_suspend: this is skipped du