From: Hawking Zhang <[email protected]>

Use gfx v12_1 callback to query the numbers of xccs
per xcp

v2: add todo (Alex)

Signed-off-by: Hawking Zhang <[email protected]>
Reviewed-by: Le Ma <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c 
b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index 277db5ef9ca74..ae65d70c3d10c 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -718,6 +718,12 @@ static int gfx_v12_1_ih_to_xcc_inst(struct amdgpu_device 
*adev, int ih_node)
        return -EINVAL;
 }
 
+static int gfx_v12_1_get_xccs_per_xcp(struct amdgpu_device *adev)
+{
+       /* Fill this in when the interface is ready */
+       return 1;
+}
+
 static const struct amdgpu_gfx_funcs gfx_v12_1_gfx_funcs = {
        .get_gpu_clock_counter = &gfx_v12_1_get_gpu_clock_counter,
        .select_se_sh = &gfx_v12_1_xcc_select_se_sh,
@@ -728,6 +734,7 @@ static const struct amdgpu_gfx_funcs gfx_v12_1_gfx_funcs = {
        .update_perfmon_mgcg = &gfx_v12_1_update_perf_clk,
        .get_xccs_per_xcp = &gfx_v12_1_get_xccs_per_xcp,
        .ih_node_to_logical_xcc = &gfx_v12_1_ih_to_xcc_inst,
+       .get_xccs_per_xcp = &gfx_v12_1_get_xccs_per_xcp,
 };
 
 static int gfx_v12_1_gpu_early_init(struct amdgpu_device *adev)
-- 
2.52.0

Reply via email to