From: Mario Limonciello <mario.limonciello@amd.com>
To: <amd-gfx@lists.freedesktop.org>,
Sebastian Reichel <sre@kernel.org>,
"Alex Deucher" <alexander.deucher@amd.com>
Cc: <linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<Jun.ma2@amd.com>, Mario Limonciello <mario.limonciello@amd.com>
Subject: [PATCH 1/3] drm/amd: Fix detection of _PR3 on the PCIe root port
Date: Tue, 26 Sep 2023 17:59:53 -0500 [thread overview]
Message-ID: <20230926225955.386553-2-mario.limonciello@amd.com> (raw)
In-Reply-To: <20230926225955.386553-1-mario.limonciello@amd.com>
On some systems with Navi3x dGPU will attempt to use BACO for runtime
PM but fails to resume properly. This is because on these systems
the root port goes into D3cold which is incompatible with BACO.
This happens because in this case dGPU is connected to a bridge between
root port which causes BOCO detection logic to fail. Fix the intent of
the logic by looking at root port, not the immediate upstream bridge for
_PR3.
Cc: stable@vger.kernel.org
Suggested-by: Jun Ma <Jun.Ma2@amd.com>
Tested-by: David Perry <David.Perry@amd.com>
Fixes: b10c1c5b3a4e ("drm/amdgpu: add check for ACPI power resources")
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index e4627d92e1d0..bad2b5577e96 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -2238,7 +2238,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
adev->flags |= AMD_IS_PX;
if (!(adev->flags & AMD_IS_APU)) {
- parent = pci_upstream_bridge(adev->pdev);
+ parent = pcie_find_root_port(adev->pdev);
adev->has_pr3 = parent ? pci_pr3_present(parent) : false;
}
--
2.34.1
next prev parent reply other threads:[~2023-09-28 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-26 22:59 [PATCH 0/3] Fix Navi3x boot and hotplug problems Mario Limonciello
2023-09-26 22:59 ` Mario Limonciello [this message]
2023-09-28 16:58 ` [PATCH 1/3] drm/amd: Fix detection of _PR3 on the PCIe root port Deucher, Alexander
2023-09-26 22:59 ` [PATCH 2/3] power: supply: Don't count 'unknown' scope power supplies Mario Limonciello
2023-09-30 20:18 ` Sebastian Reichel
2023-10-02 0:00 ` Mario Limonciello
2023-10-04 23:10 ` Sebastian Reichel
2023-10-05 19:51 ` Mario Limonciello
2023-09-26 22:59 ` [PATCH 3/3] Revert "drm/amd/pm: workaround for the wrong ac power detection on smu 13.0.0" Mario Limonciello
2023-09-28 18:00 ` [PATCH 0/3] Fix Navi3x boot and hotplug problems Alex Deucher
2023-09-28 20:01 ` Mario Limonciello
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=20230926225955.386553-2-mario.limonciello@amd.com \
--to=mario.limonciello@amd.com \
--cc=Jun.ma2@amd.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@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
all inboxes | Powered by JetHome®