]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: update suspend status for aborting from deeper suspend
authorPrike Liang <Prike.Liang@amd.com>
Fri, 23 Aug 2024 01:48:13 +0000 (09:48 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 26 Sep 2024 21:06:16 +0000 (17:06 -0400)
There're some other suspend abort cases which can call the noirq
suspend except for executing _S3 method. In those cases need to
process as incomplete suspendsion.

Signed-off-by: Prike Liang <Prike.Liang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/soc15.c

index 8d16dacdc172036ac34dcf3f24ae72a6451a94f7..cf701bb8fc7978d250ad1ccac0dc79846156813c 100644 (file)
@@ -587,11 +587,13 @@ static bool soc15_need_reset_on_resume(struct amdgpu_device *adev)
         * 2) S3 suspend abort and TOS already launched.
         */
        if (adev->flags & AMD_IS_APU && adev->in_s3 &&
-                       !adev->suspend_complete &&
-                       sol_reg)
+                       sol_reg) {
+               adev->suspend_complete = false;
                return true;
-
-       return false;
+       } else {
+               adev->suspend_complete = true;
+               return false;
+       }
 }
 
 static int soc15_asic_reset(struct amdgpu_device *adev)