Skip to contentSkip to conversation

drm/amdgpu: move amdgpu_gmc_noretry_set after ip_versions populated

PATCH Superseded Yifan Zhang 2 participants 3 messages Mar 1, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 drm/amdgpu: move amdgpu_gmc_noretry_set after ip_versions populated

otherwise adev->ip_versions is still empty when amdgpu_gmc_noretry_set is called.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +1 -1
index 6113ddc765a7..61a6a7920c76 100644
@@ -1554,7 +1554,6 @@ static int amdgpu_device_check_arguments(struct amdgpu_device *adev)
 
 	amdgpu_gmc_tmz_set(adev);
 
-	amdgpu_gmc_noretry_set(adev);
 
 	return 0;
 }
@@ -3641,6 +3640,7 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	if (r)
 		return r;
 
+	amdgpu_gmc_noretry_set(adev);
 	/* Need to get xgmi info early to decide the reset behavior*/
 	if (adev->gmc.xgmi.supported) {
 		r = adev->gfxhub.funcs->get_xgmi_info(adev);
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/2 drm/amdgpu: add noretry=1 for gc 10.3.6

From: Aaron Liu <[email protected]>

By default, set noretry=1 for kfd exception test.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 7 +++++++
 1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +7 -0
index ab75e189bc0b..4bbd8501c6c1 100644
@@ -595,6 +595,13 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
 			gmc->noretry = amdgpu_noretry;
 		break;
 	}
+
+	if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 6)) {
+		if (amdgpu_noretry == -1)
+			gmc->noretry = 1;
+		else
+			gmc->noretry = amdgpu_noretry;
+	}
 }
 
 void amdgpu_gmc_set_vm_fault_masks(struct amdgpu_device *adev, int hub_type,
Signature · 1 line
2.25.1
#2 lore raw

Re: [PATCH 2/2] drm/amdgpu: add noretry=1 for gc 10.3.6

Am 01.03.22 um 14:05 schrieb Yifan Zhang:

Quoted 15 lines

From: Aaron Liu <[email protected]>

By default, set noretry=1 for kfd exception test.

---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 7 +++++++
  1 file changed, 7 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +0 -0
index ab75e189bc0b..4bbd8501c6c1 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c void amdgpu_gmc_noretry_set(struct amdgpu_device *adev) · line 604

Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +7 -0
@@ -595,6 +595,13 @@ void amdgpu_gmc_noretry_set(struct amdgpu_device *adev)
  			gmc->noretry = amdgpu_noretry;
  		break;
  	}
+
+	if (adev->ip_versions[GC_HWIP][0] == IP_VERSION(10, 3, 6)) {
+		if (amdgpu_noretry == -1)
+			gmc->noretry = 1;
+		else
+			gmc->noretry = amdgpu_noretry;
+	}

You should probably move the whole switch case to version checks instead.

Christian.

Quoted 3 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c +0 -0
  }
 
  void amdgpu_gmc_set_vm_fault_masks(struct amdgpu_device *adev, int hub_type,