From: Chengming Gui Date: Tue, 30 Aug 2022 08:33:01 +0000 (+0800) Subject: drm/amd/amdgpu: skip ucode loading if ucode_size == 0 X-Git-Tag: v6.1-rc5~176^2~19^2~35 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=68fb37bc2c8ad05be55c1aedccd6cf0778b1442c;p=platform%2Fkernel%2Flinux-starfive.git 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 Reviewed-by: Hawking Zhang Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index b007371..5c33150 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2402,7 +2402,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 &&