lkml.org 
[lkml]   [2018]   [Feb]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] cpufreq: skip cpufreq resume if it's not suspended
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 into account,
>> everybody else does.
>
> Hmm, I see. Can't do much then, just fix the only broken piece of code :)
>

Sorry for the late reply, this email didn't get filtered into the right
folder.

I think the design of dpm_suspend_start() and dpm_resume_end() generally
works fine because we seem to keep track of what devices have been
suspended so far (in the dpm_suspended_list) and call resume only of
those. So, why isn't the right fix to have cpufreq get put into that
list? Instead of just always call it on the resume path even if it
wasn't suspended? That seems to be the real issue.

So, we should either have dpm_suspend/resume() have a flag to keep track
of if cpufreq_suspend/resume() was called and make sure they are called
in proper pairs. Or have cpufreq register in a way that gets it put in
the suspend/resume list.

I'd still like to NACK this change.

-Saravana

--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

\
 
 \ /
  Last update: 2018-02-15 22:27    [W:0.203 / U:0.316 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site