Commit 39c84b8e authored by Chengming Gui's avatar Chengming Gui Committed by Alex Deucher

drm/amd/amdgpu: skip ucode loading if ucode_size == 0

Restrict the ucode loading check to avoid frontdoor loading error.
Signed-off-by: default avatarChengming Gui <Jack.Gui@amd.com>
Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 910ab9ee
...@@ -2401,7 +2401,7 @@ static int psp_load_smu_fw(struct psp_context *psp) ...@@ -2401,7 +2401,7 @@ static int psp_load_smu_fw(struct psp_context *psp)
static bool fw_load_skip_check(struct psp_context *psp, static bool fw_load_skip_check(struct psp_context *psp,
struct amdgpu_firmware_info *ucode) struct amdgpu_firmware_info *ucode)
{ {
if (!ucode->fw) if (!ucode->fw || !ucode->ucode_size)
return true; return true;
if (ucode->ucode_id == AMDGPU_UCODE_ID_SMC && if (ucode->ucode_id == AMDGPU_UCODE_ID_SMC &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment