]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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 bbcdececfd2f787783c86487dfac93fdcd8b4b81..2cbac0bccd802a6a89644fd8145c1b782c906ac9 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 4b530f4c129538245a75dde221289152ff6d312a..42d67ee0e7ef64c94b806834c8b98ac05e96465b 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 e2d508f5a7ee3b5b82f2c794448e7f99265afe2e..997e9f90c9900679ba07da37a2ec01461d5d189f 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 4814e8a074d615e8bfbe1794b98f2ec8be2d0d06..d516145529bb8dcd4874a761e26595f7290cb853 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