[AMD Official Use Only - General]

Hi @Deucher, Alexander<mailto:[email protected]> and @Koenig, 
Christian<mailto:[email protected]>

Could you help review this patch? Customer needs this toggle to turn off 
software recovery and use mode2 reset directly. This toggle is also needed when 
we test mode2 reset using quark tool.

Thanks
Sam

From: Feng, Kenneth <[email protected]>
Date: Monday, April 29, 2024 at 16:14
To: Feng, Kenneth <[email protected]>, [email protected] 
<[email protected]>, Zhang, GuoQing (Sam) <[email protected]>
Cc: Zhang, Owen(SRDC) <[email protected]>, Aldabagh, Maad 
<[email protected]>, Ma, Qing (Mark) <[email protected]>
Subject: RE: [PATCH 1/2] drm/amd/amdgpu: customized the reset to skip soft 
recovery
[AMD Official Use Only - General]

+@Zhang, GuoQing (Sam)

-----Original Message-----
From: Kenneth Feng <[email protected]>
Sent: Monday, April 29, 2024 3:32 PM
To: [email protected]
Cc: Zhang, Owen(SRDC) <[email protected]>; Aldabagh, Maad 
<[email protected]>; Ma, Qing (Mark) <[email protected]>; Feng, Kenneth 
<[email protected]>
Subject: [PATCH 1/2] drm/amd/amdgpu: customized the reset to skip soft recovery

customized the reset to skip soft recovery

Signed-off-by: Kenneth Feng <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 2 +-  
drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
index ea14f1c8f430..65c3a387fec7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
@@ -548,7 +548,7 @@ module_param_named(compute_multipipe, 
amdgpu_compute_multipipe, int, 0444);
  * DOC: gpu_recovery (int)
  * Set to enable GPU recovery mechanism (1 = enable, 0 = disable). The default 
is -1 (auto, disabled except SRIOV).
  */
-MODULE_PARM_DESC(gpu_recovery, "Enable GPU recovery mechanism, (1 = enable, 0 
= disable, -1 = auto)");
+MODULE_PARM_DESC(gpu_recovery, "Enable GPU recovery mechanism, (1 =
+enable, 0 = disable, -1 = auto, 2 = customized)");
 module_param_named(gpu_recovery, amdgpu_gpu_recovery, int, 0444);

 /**
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c 
b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
index e4742b65032d..5c75993698a5 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.c
@@ -51,7 +51,7 @@ static enum drm_gpu_sched_stat amdgpu_job_timedout(struct 
drm_sched_job *s_job)

        adev->job_hang = true;

-       if (amdgpu_gpu_recovery &&
+       if (amdgpu_gpu_recovery && amdgpu_gpu_recovery != 2 &&
            amdgpu_ring_soft_recovery(ring, job->vmid, s_job->s_fence->parent)) 
{
                DRM_ERROR("ring %s timeout, but soft recovered\n",
                          s_job->sched->name);
--
2.34.1

Reply via email to