]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/amdgpu: Implement gfx_v12_1_get_xccs_per_xcp
authorHawking Zhang <Hawking.Zhang@amd.com>
Mon, 8 Dec 2025 22:00:46 +0000 (17:00 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Dec 2025 22:35:17 +0000 (17:35 -0500)
Use gfx v12_1 callback to query the numbers of xccs
per xcp

v2: add todo (Alex)

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Le Ma <le.ma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c

index 453520d374a0866e0c73de3b742951620d49b3d8..2e2190ce6ce397da7a65bfc8803c06a235d08104 100644 (file)
@@ -692,6 +692,12 @@ static void gfx_v12_1_select_me_pipe_q(struct amdgpu_device *adev,
        soc_v1_0_grbm_select(adev, me, pipe, q, vm, GET_INST(GC, xcc_id));
 }
 
+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,
@@ -700,6 +706,7 @@ static const struct amdgpu_gfx_funcs gfx_v12_1_gfx_funcs = {
        .read_wave_vgprs = &gfx_v12_1_read_wave_vgprs,
        .select_me_pipe_q = &gfx_v12_1_select_me_pipe_q,
        .update_perfmon_mgcg = &gfx_v12_1_update_perf_clk,
+       .get_xccs_per_xcp = &gfx_v12_1_get_xccs_per_xcp,
 };
 
 static int gfx_v12_1_gpu_early_init(struct amdgpu_device *adev)