From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Mika Westerberg <mika.westerberg@linux.intel.com>
Cc: Len Brown <lenb@kernel.org>,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI / PM: Use target_state to set the device power state
Date: Tue, 28 Jul 2015 17:59:38 +0200 [thread overview]
Message-ID: <6917556.GA7pjcvNI8@vostro.rjw.lan> (raw)
In-Reply-To: <1438080681-3364-1-git-send-email-mika.westerberg@linux.intel.com>
On Tuesday, July 28, 2015 01:51:21 PM Mika Westerberg wrote:
> Commit 20dacb71ad28 ("ACPI / PM: Rework device power management to follow
> ACPI 6") changed the device power management to use D3hot if the device
> in question does not have _PR3 method even if D3cold was requested by the
> caller.
>
> However, if the device has _PR3 device->power.state is also set to D3hot
> instead of D3Cold after power resources have been turned off because
> device->power.state will be assigned from "state" instead of
> "target_state".
>
> Next time the device is transitioned to D0, acpi_power_transition() will
> find that the current power state of the device is D3hot instead of D3cold
> which causes it to power down all resources required for the current
> (wrong) state D3hot.
>
> Below is a simplified ASL example of a real touch panel device which
> triggers the problem:
>
> Scope (TPL1)
> {
> Name (_PR0, Package (1) { \_SB.PCI0.I2C1.PXTC })
> Name (_PR3, Package (1) { \_SB.PCI0.I2C1.PXTC })
> ...
> }
>
> In both D0 and D3hot the same power resource is required. However, when
> acpi_power_transition() turns off power resources required for D3hot (as
> the device is transitioned to D0) it powers down PXTC which then makes the
> device to lose its power.
>
> Fix this by assigning "target_state" to the device power state instead of
> "state" that is always D3hot even for devices with valid _PR3.
>
> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Applied, thanks!
Rafael
prev parent reply other threads:[~2015-07-28 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-28 10:51 Mika Westerberg
2015-07-28 15:59 ` Rafael J. Wysocki [this message]
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=6917556.GA7pjcvNI8@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@linux.intel.com \
/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
all inboxes | Powered by JetHome®