diff mbox

[1/4] PM / Domains: Remove redundant call to pm_request_idle() in genpd

Message ID 1463485296-22742-2-git-send-email-ulf.hansson@linaro.org
State Superseded
Headers show

Commit Message

Ulf Hansson May 17, 2016, 11:41 a.m. UTC
The PM core increases the runtime PM usage count at the system PM prepare
phase. Later when the system has resumed and the ->complete() callback has
been invoked, it drops the usage count. In this way, it intentionally
prevents runtime PM suspend for the device throughout this period.

For this reason, let's remove the call to pm_request_idle() from within
genpd's ->complete() calllback as it's redundant.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

---
 drivers/base/power/domain.c | 1 -
 1 file changed, 1 deletion(-)

-- 
1.9.1

Comments

Ulf Hansson May 24, 2016, 6:19 a.m. UTC | #1
On 23 May 2016 at 23:25, Kevin Hilman <khilman@baylibre.com> wrote:
> Ulf Hansson <ulf.hansson@linaro.org> writes:

>

>> The PM core increases the runtime PM usage count at the system PM prepare

>> phase. Later when the system has resumed and the ->complete() callback has

>> been invoked, it drops the usage count. In this way, it intentionally

>> prevents runtime PM suspend for the device throughout this period.

>>

>> For this reason, let's remove the call to pm_request_idle() from within

>> genpd's ->complete() calllback as it's redundant.

>

> It's not obvious from this description why the pm_request_idle() is

> redundant based just on usage count.

>

> IIUC, I think what you mean is that it's redundant because

> device_complete() does a pm_runtime_put(), which, in addition to

> decrementing the usage count, will do the equivalent of

> pm_request_idle()?


That's correct, allow me to re-spin and clarify the change log.

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-pm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 658eb1b..60a9971 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -938,7 +938,6 @@  static void pm_genpd_complete(struct device *dev)
 	pm_generic_complete(dev);
 	pm_runtime_set_active(dev);
 	pm_runtime_enable(dev);
-	pm_request_idle(dev);
 }
 
 /**