Commit 005b7f7f authored by Likun Gao's avatar Likun Gao Committed by Alex Deucher
Browse files

drm/amdgpu: correct rlc autoload for xcc harvest



If the number instances of firmware is RLC_NUM_INS_CODE0(Only 1 inst),
need to copy it directly for rlcautolad.
For the firmware which instances number bigger than 1, only copy for
enabled XCC to save copy time.

Signed-off-by: default avatarLikun Gao <Likun.Gao@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4d70e127
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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)