Skip to contentSkip to conversation

drm/amdgpu: drop non-necessary call trace dump

PATCH In review Evan Quan 2 participants 3 messages Jul 20, 2022

Subsystems (2)
lore
Share & tools
lore

Evan Quan

author
#0 lore raw

PATCH 1/2 drm/amdgpu: drop non-necessary call trace dump

This extra call trace dump comes out in every gpu reset. And it gives people a wrong impression that something went wrong. Although actually there was not.

Change-Id I884af405b6b3cd52b9024408a21fd39811a01f4d
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 -
 1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
index b79ee4ffb879..1b1a70a6da18 100644
@@ -4667,7 +4667,6 @@ static int amdgpu_reset_reg_dumps(struct amdgpu_device *adev)
 	int i;
 
 	lockdep_assert_held(&adev->reset_domain->sem);
-	dump_stack();
 
 	for (i = 0; i < adev->num_regs; i++) {
 		adev->reset_dump_reg_value[i] = RREG32(adev->reset_dump_reg_list[i]);
Signature · 1 line
2.29.0
author
#1 lore raw

PATCH 2/2 drm/amdgpu: move mes self test after drm sched re-started

From: Jack Xiao <[email protected]>

mes self test rely on vm mapping, move it after
drm sched re-started so that vm mapping can work
during gpu reset.

Acked-and-tested-by Evan Quan <[email protected]>
Change-Id Ib202c04d86191ca47da90d27c2a8cf9e7c8e6732
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++
 drivers/gpu/drm/amd/amdgpu/mes_v10_1.c     | 3 ++-
 drivers/gpu/drm/amd/amdgpu/mes_v11_0.c     | 3 ++-
 3 files changed, 7 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +3 -0
index 1b1a70a6da18..8fa3cf8e3a46 100644
@@ -5298,6 +5298,9 @@ int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
 			drm_sched_start(&ring->sched, !tmp_adev->asic_reset_res);
 		}
 
+		if (adev->enable_mes)
+			amdgpu_mes_self_test(tmp_adev);
+
 		if (!drm_drv_uses_atomic_modeset(adev_to_drm(tmp_adev)) && !job_signaled) {
 			drm_helper_resume_force_mode(adev_to_drm(tmp_adev));
 		}
drivers/gpu/drm/amd/amdgpu/mes_v10_1.c +2 -1
index 0082e2e1e0b4..067d10073a56 100644
@@ -1233,7 +1233,8 @@ static int mes_v10_0_late_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	amdgpu_mes_self_test(adev);
+	if (!amdgpu_in_reset(adev))
+		amdgpu_mes_self_test(adev);
 
 	return 0;
 }
drivers/gpu/drm/amd/amdgpu/mes_v11_0.c +2 -1
index 777f9268d92d..120ea294abef 100644
@@ -1280,7 +1280,8 @@ static int mes_v11_0_late_init(void *handle)
 {
 	struct amdgpu_device *adev = (struct amdgpu_device *)handle;
 
-	amdgpu_mes_self_test(adev);
+	if (!amdgpu_in_reset(adev))
+		amdgpu_mes_self_test(adev);
 
 	return 0;
 }
Signature · 1 line
2.29.0
Acked-by on v1 1/2
#2 lore raw
In reply to Evan Quan

Am 20.07.22 um 11:06 schrieb Evan Quan:

Quoted 6 lines

This extra call trace dump comes out in every gpu reset. And it gives people a wrong impression that something went wrong. Although actually there was not.

Change-Id I884af405b6b3cd52b9024408a21fd39811a01f4d

And please guys don't add calls to dump_stack() in the future. That's really not supposed to be here.

Thanks,
Christian.

Quoted 16 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 -
  1 file changed, 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +0 -1
index b79ee4ffb879..1b1a70a6da18 100644
@@ -4667,7 +4667,6 @@ static int amdgpu_reset_reg_dumps(struct amdgpu_device *adev)
  	int i;
 
  	lockdep_assert_held(&adev->reset_domain->sem);
-	dump_stack();
 
  	for (i = 0; i < adev->num_regs; i++) {
  		adev->reset_dump_reg_value[i] = RREG32(adev->reset_dump_reg_list[i]);