[PATCH] drm/amdgpu: Update runtime pm checks

Zhang, Hawking Hawking.Zhang at amd.com
Tue May 20 01:05:38 UTC 2025


[AMD Official Use Only - AMD Internal Distribution Only]

Reviewed-by: Hawking Zhang <Hawking.Zhang at amd.com>

Regards,
Hawking
-----Original Message-----
From: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> On Behalf Of Alex Deucher
Sent: Tuesday, May 20, 2025 03:55
To: amd-gfx at lists.freedesktop.org
Cc: Deucher, Alexander <Alexander.Deucher at amd.com>
Subject: [PATCH] drm/amdgpu: Update runtime pm checks

Don't enable BACO when in passthrough. PCI resets don't work correctly when in BACO.

Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 32bf55eab9efa..f011ca5d24942 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -512,12 +512,13 @@ void amdgpu_device_detect_runtime_pm_mode(struct amdgpu_device *adev)
                                break;
                        case CHIP_VEGA10:
                                /* enable BACO as runpm mode if noretry=0 */
-                               if (!adev->gmc.noretry)
+                               if (!adev->gmc.noretry && !amdgpu_passthrough(adev))
                                        adev->pm.rpm_mode = AMDGPU_RUNPM_BACO;
                                break;
                        default:
                                /* enable BACO as runpm mode on CI+ */
-                               adev->pm.rpm_mode = AMDGPU_RUNPM_BACO;
+                               if (!amdgpu_passthrough(adev))
+                                       adev->pm.rpm_mode = AMDGPU_RUNPM_BACO;
                                break;
                        }

--
2.49.0



More information about the amd-gfx mailing list