drm/amdgpu: use the ASP command for partition switch

Pass the compute partition mode to ASP.

v2: Squash fixes (Alex)

Reviewed-by: Likun Gao <Likun.Gao@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Shiwu Zhang <shiwu.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Shiwu Zhang 2026-01-06 16:50:01 +08:00 committed by Alex Deucher
parent 55f8e366c3
commit ff6ffeb574

View File

@ -140,16 +140,12 @@ static int imu_v12_1_switch_compute_partition(struct amdgpu_device *adev,
int ret;
if (adev->psp.funcs) {
/*TODO: revisit asp interface once it's avaialble */
ret = psp_spatial_partition(&adev->psp,
NUM_XCC(adev->gfx.xcc_mask) /
num_xccs_per_xcp);
ret = psp_spatial_partition(&adev->psp, compute_partition_mode);
if (ret)
return ret;
}
adev->gfx.num_xcc_per_xcp = num_xccs_per_xcp;
return 0;
}