Skip to contentSkip to conversation

drm/amd/amdgpu: use advanced TDR mode by default

PATCH In review Bokun Zhang 3 participants 3 messages Nov 27, 2021 – Nov 29, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/amd/amdgpu: use advanced TDR mode by default

From: Bokun Zhang <[email protected]>

In the patch about advanced TDR mode, we force to always set amdgpu_gpu_recovery=2 under SRIOV. This is not ideal, since we may want to revert back to use the legacy TDR routine.

Therefore, we only set amdgpu_gpu_recovery=2 when it is configured as AUTO, which is the default value (gpu_recovery=-1)

Change-Id Ifae78854b53f124d2ea53f401919ab5e403ef822
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -2
index 93af2cd2a065..62ec484a35aa 100644
@@ -64,8 +64,8 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
 	adev->cg_flags = 0;
 	adev->pg_flags = 0;
 
-	/*use advance recovery mode for SRIOV*/
-	if (amdgpu_gpu_recovery)
+	/* use advance recovery mode for SRIOV by default */
+	if (amdgpu_gpu_recovery == -1)
 		amdgpu_gpu_recovery = 2;
 }
 
Signature · 1 line
2.25.1
#1 lore raw

[AMD Official Use Only]

although this module parameter can be modified during driver probe, but it also can be modified at runtime. (via /sys/module/amdgpu/parameter/gpu_recovery).
This may result in a mismatch with the expected results.
You'd better to check SRIOV in the right place.

Best Regards,
Kevin
________________________________
From: amd-gfx <[email protected]> on behalf of Bokun Zhang <[email protected]>
Sent: Saturday, November 27, 2021 8:57 AM
To: [email protected] <[email protected]>
Cc: Zhang, Bokun <[email protected]>
Subject: [PATCH] drm/amd/amdgpu: use advanced TDR mode by default

From: Bokun Zhang <[email protected]>

In the patch about advanced TDR mode, we force to always set amdgpu_gpu_recovery=2 under SRIOV. This is not ideal, since we may want to revert back to use the legacy TDR routine.

Therefore, we only set amdgpu_gpu_recovery=2 when it is configured as AUTO, which is the default value (gpu_recovery=-1)

Change-Id Ifae78854b53f124d2ea53f401919ab5e403ef822
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -2
index 93af2cd2a065..62ec484a35aa 100644
@@ -64,8 +64,8 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
         adev->cg_flags = 0;
         adev->pg_flags = 0;
 
-       /*use advance recovery mode for SRIOV*/
-       if (amdgpu_gpu_recovery)
+       /* use advance recovery mode for SRIOV by default */
+       if (amdgpu_gpu_recovery == -1)
                 amdgpu_gpu_recovery = 2;
 }
 

--
2.25.1

Acked-by on v1 1/1
#2 lore raw
In reply to Bokun Zhang

Hi Bokun,

please remove the change-id in your commit message when submitting this patch.

Quoted 30 lines · Bokun Zhang

From: Bokun Zhang <[email protected]>

In the patch about advanced TDR mode, we force to always set amdgpu_gpu_recovery=2 under SRIOV. This is not ideal, since we may want to revert back to use the legacy TDR routine.

Therefore, we only set amdgpu_gpu_recovery=2 when it is configured as AUTO, which is the default value (gpu_recovery=-1)

Change-Id Ifae78854b53f124d2ea53f401919ab5e403ef822
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c +2 -2
index 93af2cd2a065..62ec484a35aa 100644
@@ -64,8 +64,8 @@ void amdgpu_virt_init_setting(struct amdgpu_device *adev)
 	adev->cg_flags = 0;
 	adev->pg_flags = 0;
 
-	/*use advance recovery mode for SRIOV*/
-	if (amdgpu_gpu_recovery)
+	/* use advance recovery mode for SRIOV by default */
+	if (amdgpu_gpu_recovery == -1)
 		amdgpu_gpu_recovery = 2;
 }