[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <78143872.4kPcvaPlWD@kreacher>
Date: Fri, 05 Jul 2019 11:48:02 +0200
From: "Rafael J. Wysocki" <rjw@...ysocki.net>
To: Mika Westerberg <mika.westerberg@...ux.intel.com>
Cc: Linux PCI <linux-pci@...r.kernel.org>,
Linux ACPI <linux-acpi@...r.kernel.org>,
Linux PM <linux-pm@...r.kernel.org>,
LKML <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <helgaas@...nel.org>,
Lukas Wunner <lukas@...ner.de>
Subject: Re: [PATCH] PCI: PM/ACPI: Refresh all stale power state data in pci_pm_complete()
On Tuesday, June 25, 2019 6:09:18 PM CEST Mika Westerberg wrote:
> On Tue, Jun 25, 2019 at 02:09:12PM +0200, Rafael J. Wysocki wrote:
> > From: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > In pci_pm_complete() there are checks to decide whether or not to
> > resume devices that were left in runtime-suspend during the preceding
> > system-wide transition into a sleep state. They involve checking the
> > current power state of the device and comparing it with the power
> > state of it set before the preceding system-wide transition, but the
> > platform component of the device's power state is not handled
> > correctly in there.
> >
> > Namely, on platforms with ACPI, the device power state information
> > needs to be updated with care, so that the reference counters of
> > power resources used by the device (if any) are set to ensure that
> > the refreshed power state of it will be maintained going forward.
> >
> > To that end, introduce a new ->refresh_state() platform PM callback
> > for PCI devices, for asking the platform to refresh the device power
> > state data and ensure that the corresponding power state will be
> > maintained going forward, make it invoke acpi_device_update_power()
> > (for devices with ACPI PM) on platforms with ACPI and make
> > pci_pm_complete() use it, through a new pci_refresh_power_state()
> > wrapper function.
> >
> > Fixes: a0d2a959d3da (PCI: Avoid unnecessary resume after direct-complete)
> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
>
> Reviewed-by: Mika Westerberg <mika.westerberg@...ux.intel.com>
>
> I also tested this on Ice Lake system and did not see any issues over
> several suspend-to-ram cycles.
>
Thanks!
Patch queued for 5.3.
Powered by blists - more mailing lists