Skip to contentSkip to conversation

drm/amdgpu: increase AMDGPU_MAX_RINGS

PATCH New Alex Deucher 1 participant 5 messages May 9, 2023

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: increase AMDGPU_MAX_RINGS

From: Le Ma <[email protected]>

On newer GPUs, the number of kernel rings are increased.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h +1 -1
index 1ac8a82b9b09..5192e3577e99 100644
@@ -36,7 +36,7 @@ struct amdgpu_job;
 struct amdgpu_vm;
 
 /* max number of rings */
-#define AMDGPU_MAX_RINGS		102
+#define AMDGPU_MAX_RINGS		124
 #define AMDGPU_MAX_HWIP_RINGS		64
 #define AMDGPU_MAX_GFX_RINGS		2
 #define AMDGPU_MAX_SW_GFX_RINGS         2
Signature · 1 line
2.40.1
author maintainer
#1 lore raw

PATCH 1/1 drm/amdgpu: Increase Max GPU instance to 64

From: Mukul Joshi <[email protected]>

Increase Max GPU instances to 64 to handle multi-socket system with GFX 9.4.3 asic.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu.h +1 -1
index 85812d72ae7c..743fc5f137b0 100644
@@ -109,7 +109,7 @@
 #include "amdgpu_mca.h"
 #include "amdgpu_ras.h"
 
-#define MAX_GPU_INSTANCE		16
+#define MAX_GPU_INSTANCE		64
 
 struct amdgpu_gpu_instance
 {
Signature · 1 line
2.40.1
author maintainer
#2 lore raw

PATCH 1/1 drm/amdgpu: fix sdma instance

In reply to Alex Deucher

From: "Stanley.Yang" <[email protected]>

It should change logical instance to device instance to query ras info

---
 drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.c +5 -2
index 570ea68c521f..bf47eb33c12e 100644
@@ -2123,6 +2123,7 @@ static void sdma_v4_4_2_inst_query_ras_error_count(struct amdgpu_device *adev,
 						   void *ras_err_status)
 {
 	struct ras_err_data *err_data = (struct ras_err_data *)ras_err_status;
+	uint32_t sdma_dev_inst = GET_INST(SDMA0, sdma_inst);
 
 	/* sdma v4_4_2 doesn't support query ce counts */
 	amdgpu_ras_inst_query_ras_error_count(adev,
@@ -2130,7 +2131,7 @@ static void sdma_v4_4_2_inst_query_ras_error_count(struct amdgpu_device *adev,
 					ARRAY_SIZE(sdma_v4_2_2_ue_reg_list),
 					sdma_v4_4_2_ras_memory_list,
 					ARRAY_SIZE(sdma_v4_4_2_ras_memory_list),
-					sdma_inst,
+					sdma_dev_inst,
 					AMDGPU_RAS_ERROR__MULTI_UNCORRECTABLE,
 					&err_data->ue_count);
 }
@@ -2153,10 +2154,12 @@ static void sdma_v4_4_2_query_ras_error_count(struct amdgpu_device *adev,
 static void sdma_v4_4_2_inst_reset_ras_error_count(struct amdgpu_device *adev,
 						   uint32_t sdma_inst)
 {
+	uint32_t sdma_dev_inst = GET_INST(SDMA0, sdma_inst);
+
 	amdgpu_ras_inst_reset_ras_error_count(adev,
 					sdma_v4_2_2_ue_reg_list,
 					ARRAY_SIZE(sdma_v4_2_2_ue_reg_list),
-					sdma_inst);
+					sdma_dev_inst);
 }
 
 static void sdma_v4_4_2_reset_ras_error_count(struct amdgpu_device *adev)
Signature · 1 line
2.40.1
author maintainer
#3 lore raw

PATCH 1/1 drm/amdgpu: remove irq_get return value check in gfx_ras_late_init

In reply to Alex Deucher

From: Tao Zhou <[email protected]>

Not all ASICs support GFX CP ECC irq.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c +2 -6
index 5218d4837656..dc0e5d18a0cc 100644
@@ -786,17 +786,13 @@ int amdgpu_gfx_ras_late_init(struct amdgpu_device *adev, struct ras_common_if *r
 		if (r)
 			return r;
 
-		r = amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
-		if (r)
-			goto late_fini;
+		/* Not all ASICs support the irq, no need to check return value */
+		amdgpu_irq_get(adev, &adev->gfx.cp_ecc_error_irq, 0);
 	} else {
 		amdgpu_ras_feature_enable_on_boot(adev, ras_block, 0);
 	}
 
 	return 0;
-late_fini:
-	amdgpu_ras_block_late_fini(adev, ras_block);
-	return r;
 }
 
 int amdgpu_gfx_ras_sw_init(struct amdgpu_device *adev)
Signature · 1 line
2.40.1
author maintainer
#4 lore raw

PATCH 1/1 drm/amdgpu: change the print level to warn for ip block disabled

In reply to Alex Deucher

From: Le Ma <[email protected]>

Avoid to mislead users as it's not a real error.

---
 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 f95591b90f0b..d1dca02860b2 100644
@@ -2291,7 +2291,7 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
 	total = true;
 	for (i = 0; i < adev->num_ip_blocks; i++) {
 		if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
-			DRM_ERROR("disabled ip block: %d <%s>\n",
+			DRM_WARN("disabled ip block: %d <%s>\n",
 				  i, adev->ip_blocks[i].version->funcs->name);
 			adev->ip_blocks[i].status.valid = false;
 		} else {
Signature · 1 line
2.40.1