Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: Add switch_compute_partition callback for imu v12_1

To enable switching compute partition mode

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>

authored by

Hawking Zhang and committed by
Alex Deucher
84d8beaf 7ce72341

+21
+2
drivers/gpu/drm/amd/amdgpu/amdgpu_imu.h
··· 36 36 int (*start_imu)(struct amdgpu_device *adev); 37 37 void (*program_rlc_ram)(struct amdgpu_device *adev); 38 38 int (*wait_for_reset_status)(struct amdgpu_device *adev); 39 + int (*switch_compute_partition)(struct amdgpu_device *adev, 40 + int num_xccs_per_xcp); 39 41 }; 40 42 41 43 struct imu_rlc_ram_golden {
+19
drivers/gpu/drm/amd/amdgpu/imu_v12_1.c
··· 133 133 return 0; 134 134 } 135 135 136 + static int imu_v12_1_switch_compute_partition(struct amdgpu_device *adev, 137 + int num_xccs_per_xcp) 138 + { 139 + int ret; 140 + 141 + if (adev->psp.funcs) { 142 + ret = psp_spatial_partition(&adev->psp, 143 + NUM_XCC(adev->gfx.xcc_mask) / 144 + num_xccs_per_xcp); 145 + if (ret) 146 + return ret; 147 + } 148 + 149 + adev->gfx.num_xcc_per_xcp = num_xccs_per_xcp; 150 + 151 + return 0; 152 + } 153 + 136 154 const struct amdgpu_imu_funcs gfx_v12_1_imu_funcs = { 137 155 .init_microcode = imu_v12_1_init_microcode, 138 156 .load_microcode = imu_v12_1_load_microcode, 157 + .switch_compute_partition = imu_v12_1_switch_compute_partition, 139 158 };