drm/amdgpu/psp11: TA firmware is optional
Subsystems (2)
PATCH 1/1 drm/amdgpu/psp11: TA firmware is optional
Don't warn or fail if it's missing.
Signed-off-by Alex Deucher <[email protected]>
--- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 6 ++++-- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 28 ++++++++++++++----------- 2 files changed, 20 insertions(+), 14 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +4 -2
@@ -84,8 +84,10 @@ static int psp_sw_fini(void *handle) adev->psp.sos_fw =NULL ;release_firmware (adev->psp.asd_fw); adev->psp.asd_fw =NULL ; -release_firmware (adev->psp.ta_fw); - adev->psp.ta_fw =NULL ; +if (adev->psp.ta_fw) { +release_firmware (adev->psp.ta_fw); + adev->psp.ta_fw =NULL ; + }return 0 ; }
drivers/gpu/drm/amd/amdgpu/psp_v11_0.c +16 -12
@@ -98,18 +98,22 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)snprintf (fw_name,sizeof (fw_name),"amdgpu/%s_ta.bin" , chip_name); err =request_firmware (&adev->psp.ta_fw, fw_name, adev->dev); -if (err) - goto out2; - - err =amdgpu_ucode_validate (adev->psp.ta_fw); -if (err) - goto out2; - - ta_hdr = (const struct ta_firmware_header_v1_0 *)adev->psp.ta_fw->data; - adev->psp.ta_xgmi_ucode_version =le32_to_cpu (ta_hdr->ta_xgmi_ucode_version); - adev->psp.ta_xgmi_ucode_size =le32_to_cpu (ta_hdr->ta_xgmi_size_bytes); - adev->psp.ta_xgmi_start_addr = (uint8_t *)ta_hdr + -le32_to_cpu (ta_hdr->header.ucode_array_offset_bytes); +if (err) { +release_firmware (adev->psp.ta_fw); + adev->psp.ta_fw =NULL ; +dev_info (adev->dev, +"psp v11.0: Failed to load firmware \"%s\"\n" , fw_name); + }else { + err =amdgpu_ucode_validate (adev->psp.ta_fw); +if (err) + goto out2; + + ta_hdr = (const struct ta_firmware_header_v1_0 *)adev->psp.ta_fw->data; + adev->psp.ta_xgmi_ucode_version =le32_to_cpu (ta_hdr->ta_xgmi_ucode_version); + adev->psp.ta_xgmi_ucode_size =le32_to_cpu (ta_hdr->ta_xgmi_size_bytes); + adev->psp.ta_xgmi_start_addr = (uint8_t *)ta_hdr + +le32_to_cpu (ta_hdr->header.ucode_array_offset_bytes); + }return 0 ;
Signature · 6 lines
2.20.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx