Skip to contentSkip to conversation

drm/amdgpu: add soc config init for GC v12_1

PATCH New Alex Deucher 1 participant 1 message Nov 25, 2025

Subsystems (2)
lore
Share & tools
lore

Alex Deucher

author maintainer
#0 lore raw

PATCH 1/1 drm/amdgpu: add soc config init for GC v12_1

From: Likun Gao <[email protected]>

Add function to initialize soc configuration information for GC 12.1.0 ASICs.
Use it to map IPs and other SOC related information once IP configuration information is available through discovery.

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c |  3 +++
 drivers/gpu/drm/amd/amdgpu/soc_v1_0.c         | 10 ++++++++++
 drivers/gpu/drm/amd/amdgpu/soc_v1_0.h         |  1 +
 3 files changed, 14 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c +3 -0
index ffffc60c98db5..20d05a3e4516e 100644
@@ -2592,6 +2592,9 @@ static void amdgpu_discovery_init_soc_config(struct amdgpu_device *adev)
 	case IP_VERSION(9, 5, 0):
 		aqua_vanjaram_init_soc_config(adev);
 		break;
+	case IP_VERSION(12, 1, 0):
+		soc_v1_0_init_soc_config(adev);
+		break;
 	default:
 		break;
 	}
drivers/gpu/drm/amd/amdgpu/soc_v1_0.c +10 -0
index 815f130f760c7..0ede5e22e905f 100644
@@ -24,6 +24,7 @@
 #include "soc15.h"
 #include "soc15_common.h"
 #include "soc_v1_0.h"
+#include "amdgpu_ip.h"
 
 #include "gc/gc_12_1_0_offset.h"
 #include "gc/gc_12_1_0_sh_mask.h"
@@ -334,3 +335,12 @@ const struct amdgpu_ip_block_version soc_v1_0_common_ip_block = {
 	.rev = 0,
 	.funcs = &soc_v1_0_common_ip_funcs,
 };
+
+int soc_v1_0_init_soc_config(struct amdgpu_device *adev)
+{
+	adev->sdma.num_inst_per_xcc = 2;
+
+	amdgpu_ip_map_init(adev);
+
+	return 0;
+}
drivers/gpu/drm/amd/amdgpu/soc_v1_0.h +1 -0
index d9de040c37291..23517c3a3d1bc 100644
@@ -29,5 +29,6 @@ void soc_v1_0_grbm_select(struct amdgpu_device *adev,
 			  u32 me, u32 pipe,
 			  u32 queue, u32 vmid,
 			  int xcc_id);
+int soc_v1_0_init_soc_config(struct amdgpu_device *adev);
 
 #endif
Signature · 1 line
2.51.1