diff options
| author | Likun Gao <Likun.Gao@amd.com> | 2025-06-18 12:56:30 +0300 |
|---|---|---|
| committer | Alex Deucher <alexander.deucher@amd.com> | 2025-12-16 21:22:53 +0300 |
| commit | bb562c955e174f028ed06e92fdb23411ad456f0a (patch) | |
| tree | 700f1b1fff9b0dc5417aa6feb2a6132cb909389f | |
| parent | 12323f9588ffbea2ef448679b50bf1eabca98b21 (diff) | |
| download | linux-bb562c955e174f028ed06e92fdb23411ad456f0a.tar.xz | |
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>
| -rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c index 12564e3cc7d0..0c18b07cae3b 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c @@ -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); + } } } |
