]> git.dujemihanovic.xyz Git - linux.git/commitdiff
drm/amdgpu: Fix the runtime resume failure issue
authorMa Jun <Jun.Ma2@amd.com>
Wed, 21 Feb 2024 09:16:49 +0000 (17:16 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 22 Feb 2024 17:28:27 +0000 (12:28 -0500)
Don't set power state flag when system enter runtime suspend,
or it may cause runtime resume failure issue.

Fixes: 3a9626c816db ("drm/amd: Stop evicting resources on APUs in suspend")
Signed-off-by: Ma Jun <Jun.Ma2@amd.com>
Reviewed-by: Mario Limonciello <mario.limonciello@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c

index cc21ed67a33075d4f197f2217b883faacc777f3d..7099ff9cf8c50d7b7ea96149bcef235368fae165 100644 (file)
@@ -1528,6 +1528,9 @@ bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev)
  */
 void amdgpu_choose_low_power_state(struct amdgpu_device *adev)
 {
+       if (adev->in_runpm)
+               return;
+
        if (amdgpu_acpi_is_s0ix_active(adev))
                adev->in_s0ix = true;
        else if (amdgpu_acpi_is_s3_active(adev))