drm/amdgpu: Initialize xcp manager for soc v1_0

Initialize xcp manager for soc v1_0

Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Hawking Zhang 2025-06-06 00:38:51 +08:00 committed by Alex Deucher
parent a936896135
commit f9ed1d463e

View File

@ -747,10 +747,35 @@ struct amdgpu_xcp_mgr_funcs soc_v1_0_xcp_funcs = {
#endif
};
static int soc_v1_0_xcp_mgr_init(struct amdgpu_device *adev)
{
int ret;
if (amdgpu_sriov_vf(adev))
soc_v1_0_xcp_funcs.switch_partition_mode = NULL;
ret = amdgpu_xcp_mgr_init(adev, AMDGPU_UNKNOWN_COMPUTE_PARTITION_MODE,
1, &soc_v1_0_xcp_funcs);
if (ret)
return ret;
amdgpu_xcp_update_supported_modes(adev->xcp_mgr);
/* TODO: Default memory node affinity init */
return ret;
}
int soc_v1_0_init_soc_config(struct amdgpu_device *adev)
{
int ret;
/*TODO: init soc config */
adev->sdma.num_inst_per_xcc = 2;
ret = soc_v1_0_xcp_mgr_init(adev);
if (ret)
return ret;
amdgpu_ip_map_init(adev);
return 0;