From: yfeng1 Date: Thu, 26 Dec 2024 04:36:09 +0000 (-0500) Subject: drm/amdgpu: Fix for MEC SJT FW Load Fail on VF X-Git-Tag: v6.14-rc1~174^2~2^2~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=62bf9fe6fab01a3f7355931fd9472b3d3ef6a3b2;p=thirdparty%2Fkernel%2Flinux.git 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 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c index a5bdcaf7a0814..2ba185875baa9 100644 --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c @@ -579,11 +579,16 @@ static int gfx_v9_4_3_init_cp_compute_microcode(struct amdgpu_device *adev, { int err; - if (amdgpu_sriov_vf(adev)) + if (amdgpu_sriov_vf(adev)) { err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw, AMDGPU_UCODE_REQUIRED, "amdgpu/%s_sjt_mec.bin", chip_name); - else + + if (err) + err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw, + AMDGPU_UCODE_REQUIRED, + "amdgpu/%s_mec.bin", chip_name); + } else err = amdgpu_ucode_request(adev, &adev->gfx.mec_fw, AMDGPU_UCODE_REQUIRED, "amdgpu/%s_mec.bin", chip_name);