summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
index 3a641d223ad6..96ca3648205d 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v12_1.c
@@ -933,7 +933,8 @@ 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++) {
- if ((1 << (i / 2)) & adev->gfx.xcc_mask) {
+ if ((num_inst == RLC_NUM_INS_CODE0) ||
+ ((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)