[AMD Official Use Only - General]

Looks good to me.

Reviewed-by: Veerabadhran Gopalakrishnan <[email protected]>

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.

Signed-off-by: Lang Yu <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_umsch_mm.c
index 06ad68714172..9f9d6a6d5cf3 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);
 }

--
2.25.1

Reply via email to