drm/amd/amdgpu: skip ucode loading if ucode_size == 0
[ Upstream commit 39c84b8e929dbd4f63be7e04bf1a2bcd92b44177 ] 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> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
c598e2704c
commit
187908079d
@@ -1921,7 +1921,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 &&
|
||||||
|
Reference in New Issue
Block a user