RE: [PSCI DISCUSS] How to implement standby and suspend-to-ram by PSCI
From: Hongbo Zhang <hidden>
Date: 2016-05-20 08:23:36
Also in:
linux-arm-kernel
-----Original Message----- From: Oliver Neukum [mailto:oneukum@suse.com] Sent: Thursday, May 19, 2016 8:01 PM To: Hongbo Zhang <redacted> Cc: Sudeep Holla <redacted>; linux-pm@vger.kernel.org; Lorenzo Pieralisi [off-list ref]; Marc Zyngier [off-list ref]; Jan Kiszka [off-list ref]; Mark Rutland [off-list ref]; Daniel Lezcano [off-list ref]; Chen-Yu Tsai [off-list ref]; Hans de Goede [off-list ref]; Frank Li [off-list ref]; Peng Fan [off-list ref]; Tom Warren [off-list ref]; Vincent Guittot [off-list ref]; jszhang@marvell.com; linux-arm- kernel@lists.infradead.org Subject: Re: [PSCI DISCUSS] How to implement standby and suspend-to-ram by PSCI On Thu, 2016-05-19 at 10:27 +0000, Hongbo Zhang wrote:quoted
quoted
For the pm module of the core kernel a low power state is a sleep state if even one of three conditions is met: a) a device that can be used for input is not a source of wake ups b) tasks need to be frozen to enter it c) the display goes off, while it should be on Generally runtime PM is better if you can get the same results. Going to a system sleep state is a necessary evil.quoted
As I just explained in previous reply, many devices in our Soc cannot be physically clock or power gated, all the non-wakeup devices can only be gated off at same time by a PM module, so runtime PM doesn't fit for us well.You are looking for a contradiction where none is to be found. We have PM domains which allow you to model common clocks and gates. You simply use the driver core and it will use the common gate when every device is idle. Obviously this is also true when the system is suspended. But not necessarily only when the system is suspended. Regards Oliver
Understand. Well, currently our situation is that we've already implemented our sleep/deep sleep mode (mapping to kernel terms standby/suspend to ram), and now while transferring to PSCI we meet such a problem. If runtime PM is used, many device driver's developers have to be involved to offer their runtime callbacks, a lot of efforts needed in whole system level. But yes, runtime PM has its own advantages, will consider to apply it in the coming SOCs. Thanks for advice. Hongbo Zhang @ NXP