From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: "Rafael J. Wysocki" <rjw@rjwysocki.net>,
Pavel Machek <pavel@ucw.cz>, Len Brown <len.brown@intel.com>,
linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: PM/runtime issue: Device cannot runtime resume because power domain is off during system resume
Date: Thu, 16 Oct 2014 16:05:02 +0200 [thread overview]
Message-ID: <1413468302.5605.9.camel@AMDC1943> (raw)
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
next reply other threads:[~2014-10-16 14:05 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-16 14:05 Krzysztof Kozlowski [this message]
2014-10-29 13:01 ` PM/runtime issue: Device cannot runtime resume because power domain is off during system resume Ulf Hansson
2014-10-29 15:44 ` Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413468302.5605.9.camel@AMDC1943 \
--to=k.kozlowski@samsung.com \
--cc=len.brown@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pavel@ucw.cz \
--cc=rjw@rjwysocki.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).