Commit 7ce72341 authored by Hawking Zhang's avatar Hawking Zhang Committed by Alex Deucher
Browse files

drm/amdgpu: Implement gfx_v12_1_get_xccs_per_xcp



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

v2: add todo (Alex)

Signed-off-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: default avatarLe Ma <le.ma@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent b7cb3669
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -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)