]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Update runtime pm checks
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 7 May 2025 20:51:38 +0000 (16:51 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 May 2025 16:02:14 +0000 (12:02 -0400)
Don't enable BACO when in passthrough. PCI resets don't work
correctly when in BACO.

Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

index 908e39dae4b4631b06830c9292b1599b17cc4866..e1bab6a96cb67df049d52ca6601fea565783c27c 100644 (file)
@@ -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;
                        }