diff options
author | Chengming Gui <Jack.Gui@amd.com> | 2022-08-30 11:33:01 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2022-09-01 00:02:20 +0300 |
commit | 39c84b8e929dbd4f63be7e04bf1a2bcd92b44177 (patch) | |
tree | b7ee8a2627d77f2c9a999b43957919c27f4a6bb5 /drivers | |
parent | 910ab9eee0f61a243126d70e932e1301b5437583 (diff) | |
download | linux-39c84b8e929dbd4f63be7e04bf1a2bcd92b44177.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 1036446abc30..9f7a5e393f85 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -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 && |