From: "Limonciello, Mario" <mario.limonciello@amd.com>
To: Bjorn Helgaas <helgaas@kernel.org>,
"Rafael J. Wysocki" <rafael@kernel.org>
Cc: Len Brown <lenb@kernel.org>, Bjorn Helgaas <bhelgaas@google.com>,
Mika Westerberg <mika.westerberg@linux.intel.com>,
Mehta Sanju <Sanju.Mehta@amd.com>, Lukas Wunner <lukas@wunner.de>,
"Rafael J . Wysocki" <rafael.j.wysocki@intel.com>,
linux-acpi@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v5] PCI/ACPI: PCI/ACPI: Validate devices with power resources support D3
Date: Tue, 15 Nov 2022 20:31:48 -0600 [thread overview]
Message-ID: <d2d5e368-abbf-e420-7027-27ba412251e7@amd.com> (raw)
In-Reply-To: <20221116003739.GA1061657@bhelgaas>
On 11/15/2022 18:37, Bjorn Helgaas wrote:
> On Mon, Nov 14, 2022 at 04:33:52PM +0100, Rafael J. Wysocki wrote:
>> On Fri, Nov 11, 2022 at 10:42 PM Bjorn Helgaas <helgaas@kernel.org> wrote:
>>>
>>> On Fri, Nov 11, 2022 at 12:58:28PM -0600, Limonciello, Mario wrote:
>>>> On 11/11/2022 11:41, Bjorn Helgaas wrote:
>>>>> On Mon, Oct 31, 2022 at 05:33:55PM -0500, Mario Limonciello wrote:
>>>>>> Firmware typically advertises that ACPI devices that represent PCIe
>>>>>> devices can support D3 by a combination of the value returned by
>>>>>> _S0W as well as the HotPlugSupportInD3 _DSD [1].
>>>>>>
>>>>>> `acpi_pci_bridge_d3` looks for this combination but also contains
>>>>>> an assumption that if an ACPI device contains power resources the PCIe
>>>>>> device it's associated with can support D3. This was introduced
>>>>>> from commit c6e331312ebf ("PCI/ACPI: Whitelist hotplug ports for
>>>>>> D3 if power managed by ACPI").
>>>>>>
>>>>>> Some firmware configurations for "AMD Pink Sardine" do not support
>>>>>> wake from D3 in _S0W for the ACPI device representing the PCIe root
>>>>>> port used for tunneling. The PCIe device will still be opted into
>>>>>> runtime PM in the kernel [2] because of the logic within
>>>>>> `acpi_pci_bridge_d3`. This currently happens because the ACPI
>>>>>> device contains power resources.
>>>
>>> Wait. Is this as simple as just recognizing that:
>>>
>>> _PS0 means the OS has a knob to put the device in D0, but it doesn't
>>> mean the device can wake itself from a low-power state. The OS has
>>> to use _S0W to learn the device's ability to wake itself.
>>
>> It is.
>
> Now I'm confused again about what "HotPlugSupportInD3" means. The MS
> web page [1] says it identifies Root Ports capable of handling hot
> plug events while in D3. That sounds kind of related to _S0W: If _S0W
> says "I can wake myself from D3hot and D3cold", how is that different
> from "I can handle hotplug events in D3"?
It's impossible to know for sure the logic in Windows, but from all the
discussion and patches that have flowed related to it my inference is
the logic for Windows must only examine and use the "HotPlugSupportInD3"
property if the device also has _S0W.
>
> This patch says that if dev's Root Port has "HotPlugSupportInD3", we
> don't need _PS0 or _PR0 for dev. I guess that must be true, because
> previously the fact that we checked for "HotPlugSupportInD3" meant the
> device did NOT have _PS0 or _PR0.
>
A lot of this confusion and this patch of mine stem from c6e331312ebfb
being too broad to start out with IMO. Wouldn't it have made more sense
to only match and allowlist that specific topology combination (dGPU
connected to hotplug port and missing those properties)?
> [1] https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fwindows-hardware%2Fdrivers%2Fpci%2Fdsd-for-pcie-root-ports%23identifying-pcie-root-ports-supporting-hot-plug-in-d3&data=05%7C01%7Cmario.limonciello%40amd.com%7Cc883ba6351534df445f408dac76ac5e5%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C638041558659543898%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5Qv3wUYB%2FXJhbeu%2Fh3A0swvgRaB8afjyEYzu9SpHK%2Bo%3D&reserved=0
next prev parent reply other threads:[~2022-11-16 2:32 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-31 22:33 [PATCH v5] PCI/ACPI: PCI/ACPI: Validate devices with power resources support D3 Mario Limonciello
2022-11-11 17:41 ` Bjorn Helgaas
2022-11-11 18:58 ` Limonciello, Mario
2022-11-11 21:42 ` Bjorn Helgaas
2022-11-14 15:33 ` Rafael J. Wysocki
2022-11-14 15:37 ` Limonciello, Mario
2022-11-14 16:54 ` Bjorn Helgaas
2022-11-16 0:37 ` Bjorn Helgaas
2022-11-16 2:31 ` Limonciello, Mario [this message]
2022-11-16 12:00 ` Rafael J. Wysocki
2022-11-16 23:28 ` Bjorn Helgaas
2022-11-17 17:01 ` Rafael J. Wysocki
2022-11-17 22:16 ` Bjorn Helgaas
2022-11-18 13:16 ` Rafael J. Wysocki
2022-11-18 20:23 ` Bjorn Helgaas
2022-11-18 21:13 ` Rafael J. Wysocki
2022-11-21 14:33 ` Rafael J. Wysocki
2022-11-21 22:17 ` Bjorn Helgaas
2023-01-02 16:34 ` Rafael J. Wysocki
2023-01-02 16:59 ` Rafael J. Wysocki
2023-01-03 22:44 ` Limonciello, Mario
2023-01-10 18:02 ` Rafael J. Wysocki
2023-01-10 20:55 ` Bjorn Helgaas
2023-01-11 10:56 ` Rafael J. Wysocki
2023-01-12 20:13 ` Bjorn Helgaas
2023-01-11 10:38 ` [PATCH v3] PCI / ACPI: PM: Take _S0W of the target bridge into account in acpi_pci_bridge_d3(() Rafael J. Wysocki
2023-01-12 20:21 ` Bjorn Helgaas
2023-01-12 20:31 ` Rafael J. Wysocki
2023-01-12 20:51 ` [PATCH v4] " Rafael J. Wysocki
2023-01-12 22:01 ` Bjorn Helgaas
2023-01-12 22:09 ` Limonciello, Mario
2023-01-12 22:40 ` Bjorn Helgaas
2023-01-12 22:45 ` Limonciello, Mario
2023-01-13 17:51 ` Bjorn Helgaas
2023-01-13 17:53 ` 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=d2d5e368-abbf-e420-7027-27ba412251e7@amd.com \
--to=mario.limonciello@amd.com \
--cc=Sanju.Mehta@amd.com \
--cc=bhelgaas@google.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=lukas@wunner.de \
--cc=mika.westerberg@linux.intel.com \
--cc=rafael.j.wysocki@intel.com \
--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