drm/amdgpu: Add XCP IP callback funcs for each IP
authorLijo Lazar <lijo.lazar@amd.com>
Fri, 23 Sep 2022 11:45:15 +0000 (17:15 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:49:56 +0000 (09:49 -0400)
Initialize with the IP specific functions needed for GFXHUB, GFX and
SDMA.

Signed-off-by: Lijo Lazar <lijo.lazar@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/aqua_vanjaram_reg_init.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.h
drivers/gpu/drm/amd/amdgpu/gfxhub_v1_2.h
drivers/gpu/drm/amd/amdgpu/sdma_v4_4_2.h

index bbcdece..2cbac0b 100644 (file)
@@ -25,6 +25,9 @@
 
 #include "soc15_common.h"
 #include "amdgpu_xcp.h"
+#include "gfx_v9_4_3.h"
+#include "gfxhub_v1_2.h"
+#include "sdma_v4_4_2.h"
 
 #define XCP_INST_MASK(num_inst, xcp_id)                                        \
        (num_inst ? GENMASK(num_inst - 1, 0) << (xcp_id * num_inst) : 0)
@@ -205,15 +208,15 @@ int __aqua_vanjaram_get_xcp_ip_info(struct amdgpu_xcp_mgr *xcp_mgr, int xcp_id,
        switch (ip_id) {
        case AMDGPU_XCP_GFXHUB:
                ip->inst_mask = XCP_INST_MASK(num_xcc_xcp, xcp_id);
-               /* TODO : Assign IP funcs */
+               ip->ip_funcs = &gfxhub_v1_2_xcp_funcs;
                break;
        case AMDGPU_XCP_GFX:
                ip->inst_mask = XCP_INST_MASK(num_xcc_xcp, xcp_id);
-               /* TODO : Assign IP funcs */
+               ip->ip_funcs = &gfx_v9_4_3_xcp_funcs;
                break;
        case AMDGPU_XCP_SDMA:
                ip->inst_mask = XCP_INST_MASK(num_sdma_xcp, xcp_id);
-               /* TODO : Assign IP funcs */
+               ip->ip_funcs = &sdma_v4_4_2_xcp_funcs;
                break;
        case AMDGPU_XCP_VCN:
                ip->inst_mask = XCP_INST_MASK(num_vcn_xcp, xcp_id);
index 4b530f4..42d67ee 100644 (file)
@@ -26,4 +26,6 @@
 
 extern const struct amdgpu_ip_block_version gfx_v9_4_3_ip_block;
 
+extern struct amdgpu_xcp_ip_funcs gfx_v9_4_3_xcp_funcs;
+
 #endif /* __GFX_V9_4_3_H__ */
index e2d508f..997e9f9 100644 (file)
@@ -26,4 +26,6 @@
 
 extern const struct amdgpu_gfxhub_funcs gfxhub_v1_2_funcs;
 
+extern struct amdgpu_xcp_ip_funcs gfxhub_v1_2_xcp_funcs;
+
 #endif
index 4814e8a..d516145 100644 (file)
@@ -27,4 +27,6 @@
 extern const struct amd_ip_funcs sdma_v4_4_2_ip_funcs;
 extern const struct amdgpu_ip_block_version sdma_v4_4_2_ip_block;
 
+extern struct amdgpu_xcp_ip_funcs sdma_v4_4_2_xcp_funcs;
+
 #endif