[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    drm/amdgpu: always reset the asic in suspend (v2)
From:       Linux Kernel Mailing List <linux-kernel () vger ! kernel ! org>
Date:       2021-12-31 2:32:16
Message-ID: git-mailbomb-linux-master-daf8de0874ab5b74b38a38726fdd3d07ef98a7ee () kernel ! org
[Download RAW message or body]

Commit:     daf8de0874ab5b74b38a38726fdd3d07ef98a7ee
Parent:     8c45096c60d6ce6341c374636100ed1b2c1c33a1
Refname:    refs/heads/master
Web:        https://git.kernel.org/torvalds/c/daf8de0874ab5b74b38a38726fdd3d07ef98a7ee
Author:     Alex Deucher <alexander.deucher@amd.com>
AuthorDate: Fri Nov 12 11:25:30 2021 -0500
Committer:  Alex Deucher <alexander.deucher@amd.com>
CommitDate: Mon Dec 27 12:16:34 2021 -0500

    drm/amdgpu: always reset the asic in suspend (v2)
    
    If the platform suspend happens to fail and the power rail
    is not turned off, the GPU will be in an unknown state on
    resume, so reset the asic so that it will be in a known
    good state on resume even if the platform suspend failed.
    
    v2: handle s0ix
    
    Acked-by: Luben Tuikov <luben.tuikov@amd.com>
    Acked-by: Evan Quan <evan.quan@amd.com>
    Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index 73ac02372827b..1a97b8b237d5d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -2154,7 +2154,10 @@ static int amdgpu_pmops_suspend(struct device *dev)
 	adev->in_s3 = true;
 	r = amdgpu_device_suspend(drm_dev, true);
 	adev->in_s3 = false;
-
+	if (r)
+		return r;
+	if (!adev->in_s0ix)
+		r = amdgpu_asic_reset(adev);
 	return r;
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic