Skip to content

Commit

Permalink
drm/amd/amdgpu: skip ucode loading if ucode_size == 0
Browse files Browse the repository at this point in the history
Restrict the ucode loading check to avoid frontdoor loading error.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Chengming Gui authored and Alex Deucher committed Aug 31, 2022
1 parent 910ab9e commit 39c84b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2401,7 +2401,7 @@ static int psp_load_smu_fw(struct psp_context *psp)
static bool fw_load_skip_check(struct psp_context *psp,
struct amdgpu_firmware_info *ucode)
{
if (!ucode->fw)
if (!ucode->fw || !ucode->ucode_size)
return true;

if (ucode->ucode_id == AMDGPU_UCODE_ID_SMC &&
Expand Down

0 comments on commit 39c84b8

Please sign in to comment.