lkml.org 
[lkml]   [2014]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectPM/runtime issue: Device cannot runtime resume because power domain is off during system resume
From
Date
Hi,

I encounter issues with DRM/panel driver for Exynos after resuming from
suspend to RAM. This is reproduced on 3.16 but I think it is applicable
also to mainline.

The scenario:
0. DRM DSI is in LCD power domain. Power domain is OFF before
suspending.
1. System suspends.
2. System resumes.
3. DRM driver:resume().
4. pm_runtime_get() for DRM DSI driver.
5. This should enable LCD power domain.
6. but __pm_genpd_poweron() exits early because:
genpd->prepared_count = 3
genpd->suspend_power_off = 1
in domain.c:183

7. The domain is not powered on but it is marked as active.
8. The DRM driver thinks everything is OK and proceeds with resume...
but it fails because whole power domain is OFF.

The question: Shouldn't the power domain be powered up EARLY?

Something like this:

diff --git a/drivers/base/power/domain.c b/drivers/base/power/domain.c
index 40bc2f4072cc..4fdfe404a04c 100644
--- a/drivers/base/power/domain.c
+++ b/drivers/base/power/domain.c
@@ -179,8 +179,7 @@ static int __pm_genpd_poweron(struct
}
finish_wait(&genpd->status_wait_queue, &wait);

- if (genpd->status == GPD_STATE_ACTIVE
- || (genpd->prepared_count > 0 && genpd->suspend_power_off))
+ if (genpd->status == GPD_STATE_ACTIVE)
return 0;

if (genpd->status != GPD_STATE_POWER_OFF) {

If not... how to solve the scenario above?

Best regards,
Krzyszto



\
 
 \ /
  Last update: 2014-10-16 16:41    [W:0.057 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site