Skip to contentSkip to conversation

drm/amdgpu: Update runtime pm checks

PATCH In review Alex Deucher 2 participants 2 messages May 19, 2025 – May 20, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: Update runtime pm checks

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
index 32bf55eab9efa..f011ca5d24942 100644
@@ -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;
 			}
 
Signature · 1 line
2.49.0
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - AMD Internal Distribution Only]

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

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

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -2
index 32bf55eab9efa..f011ca5d24942 100644
@@ -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