summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-09-20 12:04:36 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-09-20 12:04:36 +0000
commit099fa5d507e8afe5aaaf178e0035428cb012c13e (patch)
treea4bd6de6aafecfc6054bfb42efc2aa8b3a2a7956 /sys
parent3781983695e5ab7d026f43b792d7d3b25b8c5057 (diff)
drm/amd/amdgpu: skip ucode loading if ucode_size == 0
From Chengming Gui 985a5d3d491d558f785b77cc5b86837bfa408587 in linux 5.15.y/5.15.69 39c84b8e929dbd4f63be7e04bf1a2bcd92b44177 in mainline linux
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
index 82dcdb618d6..d60941b539c 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_psp.c
@@ -2505,7 +2505,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 &&