From: Mario Limonciello <mario.limonciello@amd.com>
To: "Rafael J . Wysocki" <rafael@kernel.org>,
Bjorn Helgaas <helgaas@kernel.org>
Cc: <linux-pci@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
Len Brown <lenb@kernel.org>, <linux-acpi@vger.kernel.org>,
Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH v6 0/1] Fix suspend issues with AMD root ports
Date: Sat, 8 Jul 2023 16:44:56 -0500 [thread overview]
Message-ID: <20230708214457.1229-1-mario.limonciello@amd.com> (raw)
Problems have been reported on AMD laptops with suspend/resume
where particular root ports are put into D3 and then the system is unable
to resume properly.
The issue boils down to the currently selected kernel policy for root port
behavior at suspend time:
0) If the machine is from 2015 or later
1) If a PCIe root port is power manageable by the platform then platform
will be used to determine the power state of the root port at suspend.
2) If the PCIe root is not power manageable by the platform then the kernel
will check if it was configured to wakeup.
3) If it was, then it will be put into the deepest state that supports
wakeup from PME.
4) If it wasn't, then it will be put into D3hot.
Earlier more general attempts [1] to fix this have been made in the past to
change the policy so that only roots power manageable by the platform would
be put into the appropriate power state advertised by the platform
firmware.
It was hyptothesized[2] that this is a general issue that affects non-AMD
hardware as well, so I spent time to try to match it against the PCI or
ACPI specs but I can't find anything that says how the OSPM /should behave/
in this case. It seems that this is up to OSPM to decide.
A concern was also raised how this would affect other existing hardware
that may not have root ports that are power manageable by the platform [3].
I suspect that they *should* be fine as Intel reviewed and acked the
original patch, but I have no way to prove this.
This patch is a more targeted approach to workaround the issue only for the
affected AMD hardware instead of generally changing the policy.
Link: https://lore.kernel.org/linux-pci/20230530163947.230418-2-mario.limonciello@amd.com/ [1]
Link: https://lore.kernel.org/linux-pci/ZHp45fNGuPUWPnO7@bhelgaas/ [2]
Link: https://lore.kernel.org/linux-pci/20230607080154.GA7545@wunner.de/ [3]
Mario Limonciello (1):
PCI: Avoid putting some root ports into D3 on some Ryzen chips
drivers/pci/quirks.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
--
2.34.1
next reply other threads:[~2023-07-09 19:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-08 21:44 Mario Limonciello [this message]
2023-07-08 21:44 ` [PATCH v6 1/1] PCI: Avoid putting some root ports into D3 on some Ryzen chips Mario Limonciello
2023-07-10 19:32 ` Bjorn Helgaas
2023-07-10 19:44 ` Limonciello, Mario
2023-07-10 20:33 ` Bjorn Helgaas
2023-07-10 22:42 ` Limonciello, Mario
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=20230708214457.1229-1-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=helgaas@kernel.org \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=rafael@kernel.org \
/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