Set partition_mode and physical xcc mask fields in
GFX_IMU_PARTITION_SWITCH register
v2: cleanup (Alex)
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>
void (*program_rlc_ram)(struct amdgpu_device *adev);
int (*wait_for_reset_status)(struct amdgpu_device *adev);
int (*switch_compute_partition)(struct amdgpu_device *adev,
- int num_xccs_per_xcp);
+ int num_xccs_per_xcp,
+ int compute_partition_mode);
};
struct imu_rlc_ram_golden {
}
static int imu_v12_1_switch_compute_partition(struct amdgpu_device *adev,
- int num_xccs_per_xcp)
+ int num_xccs_per_xcp,
+ int compute_partition_mode)
{
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);
num_xcc_per_xcp = __soc_v1_0_get_xcc_per_xcp(xcp_mgr, mode);
if (adev->gfx.imu.funcs &&
adev->gfx.imu.funcs->switch_compute_partition)
- adev->gfx.imu.funcs->switch_compute_partition(xcp_mgr->adev, num_xcc_per_xcp);
+ adev->gfx.imu.funcs->switch_compute_partition(xcp_mgr->adev, num_xcc_per_xcp, mode);
/* Init info about new xcps */
*num_xcps = num_xcc / num_xcc_per_xcp;