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

drm/amdgpu: Fix for MEC SJT FW Load Fail on VF

Users might switch to ROCM build does not include MEC SJT FW and driver
needs to consider this case.w

Signed-off-by: yfeng1 <yfeng1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

yfeng1 and committed by
Alex Deucher
62bf9fe6 da968c3c

+7 -2
+7 -2
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c
··· 579 579 { 580 580 int err; 581 581 582 - if (amdgpu_sriov_vf(adev)) 582 + if (amdgpu_sriov_vf(adev)) { 583 583 err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw, 584 584 AMDGPU_UCODE_REQUIRED, 585 585 "amdgpu/%s_sjt_mec.bin", chip_name); 586 - else 586 + 587 + if (err) 588 + err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw, 589 + AMDGPU_UCODE_REQUIRED, 590 + "amdgpu/%s_mec.bin", chip_name); 591 + } else 587 592 err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw, 588 593 AMDGPU_UCODE_REQUIRED, 589 594 "amdgpu/%s_mec.bin", chip_name);