Skip to contentSkip to conversation

drm/amdgpu/umsch: don't execute umsch test when GPU is in reset/suspend

PATCH In review Lang Yu 3 participants 3 messages Apr 19, 2024

Subsystems (2)
lore
Share & tools
lore

Lang Yu

author
#0 lore raw

PATCH 1/1 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +3 -0
index 06ad68714172..9f9d6a6d5cf3 100644
@@ -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);
 }
 
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only - General]

Looks good to me.

Regards,
Veera

-----Original Message-----
From: Yu, Lang <[email protected]>
Sent: Friday, April 19, 2024 1:22 PM
To: [email protected]
Cc: Deucher, Alexander <[email protected]>; Gopalakrishnan, Veerabadhran (Veera) <[email protected]>; Yu, Lang <[email protected]>
Subject: [PATCH] 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.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +3 -1
index 06ad68714172..9f9d6a6d5cf3 100644
@@ -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);
 }
 
--

2.25.1

Reviewed-by on v1 1/1
#2 lore raw
In reply to Lang Yu

Am 19.04.24 um 09:52 schrieb Lang Yu:

Quoted 5 lines

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.

Quoted 18 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c +3 -0
index 06ad68714172..9f9d6a6d5cf3 100644
@@ -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);
  }