Skip to content

Commit 39c84b8

Browse files
Chengming Guialexdeucher
authored andcommitted
drm/amd/amdgpu: skip ucode loading if ucode_size == 0
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>
1 parent 910ab9e commit 39c84b8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2401,7 +2401,7 @@ static int psp_load_smu_fw(struct psp_context *psp)
24012401
static bool fw_load_skip_check(struct psp_context *psp,
24022402
struct amdgpu_firmware_info *ucode)
24032403
{
2404-
if (!ucode->fw)
2404+
if (!ucode->fw || !ucode->ucode_size)
24052405
return true;
24062406

24072407
if (ucode->ucode_id == AMDGPU_UCODE_ID_SMC &&

0 commit comments

Comments
 (0)