summaryrefslogtreecommitdiff
path: root/drivers/gpu
diff options
context:
space:
mode:
authorLikun Gao <Likun.Gao@amd.com>2025-03-21 11:23:44 +0800
committerAlex Deucher <alexander.deucher@amd.com>2025-12-08 14:13:37 -0500
commitfe1c48e9bda60b1b4d4f1d84980c66dde7c1954a (patch)
treeffed33b0bf7f3db0258f92089004f1fb2ca03000 /drivers/gpu
parentdc17c8af96488fc802e753c551c39acf9ea73bc3 (diff)
drm/amdgpu: add soc config init for GC v12_1
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. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c3
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc_v1_0.c10
-rw-r--r--drivers/gpu/drm/amd/amdgpu/soc_v1_0.h1
3 files changed, 14 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
index ffffc60c98db..20d05a3e4516 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
@@ -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;
}
diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
index 815f130f760c..0ede5e22e905 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.c
@@ -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;
+}
diff --git a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.h b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.h
index d9de040c3729..23517c3a3d1b 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc_v1_0.h
+++ b/drivers/gpu/drm/amd/amdgpu/soc_v1_0.h
@@ -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