mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 11:37:06 +02:00
drm/amdgpu: only copy ucode for enabled xcc
Only copy ucode for enabled xcc instead of copy for all 8 xcc for rlc autoload on gfx v12_1 to save time. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
12323f9588
commit
bb562c955e
|
|
@ -905,11 +905,13 @@ static void gfx_v12_1_rlc_backdoor_autoload_copy_ucode(struct amdgpu_device *ade
|
|||
fw_size = toc_fw_inst_size;
|
||||
|
||||
for (i = 0; i < num_inst; i++) {
|
||||
memcpy(ptr + toc_offset + i * toc_fw_inst_size, fw_data, fw_size);
|
||||
if ((1 << (i / 2)) & adev->gfx.xcc_mask) {
|
||||
memcpy(ptr + toc_offset + i * toc_fw_inst_size, fw_data, fw_size);
|
||||
|
||||
if (fw_size < toc_fw_inst_size)
|
||||
memset(ptr + toc_offset + fw_size + i * toc_fw_inst_size,
|
||||
0, toc_fw_inst_size - fw_size);
|
||||
if (fw_size < toc_fw_inst_size)
|
||||
memset(ptr + toc_offset + fw_size + i * toc_fw_inst_size,
|
||||
0, toc_fw_inst_size - fw_size);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user