summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLang Yu <Lang.Yu@amd.com>2024-04-19 15:40:08 +0800
committerAlex Deucher <alexander.deucher@amd.com>2024-04-26 17:22:38 -0400
commita522ec528cc74377e541e49555ba8739c4e5d4be (patch)
treefcb3e0c1fe5420786fd9c8348909cc810cd64dcd
parentf989ecccdf6bfe985b89d713db1b6c46ae582b64 (diff)
downloadlinux-stable-a522ec528cc74377e541e49555ba8739c4e5d4be.tar.gz
linux-stable-a522ec528cc74377e541e49555ba8739c4e5d4be.tar.bz2
linux-stable-a522ec528cc74377e541e49555ba8739c4e5d4be.zip
drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend
umsch test needs full GPU functionality(e.g., VM update, TLB flush, possibly buffer moving under memory pressure) which may be not ready under these states. Just skip it to avoid potential issues. Signed-off-by: Lang Yu <Lang.Yu@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Reviewed-by: Veerabadhran Gopalakrishnan <Veerabadhran.Gopalakrishnan@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 0df97c3e3a70..f7c73533e336 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
@@ -774,6 +774,9 @@ static int umsch_mm_late_init(void *handle)
{
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
+ if (amdgpu_in_reset(adev) || adev->in_s0ix || adev->in_suspend)
+ return 0;
+
return umsch_mm_test(adev);
}