From a3302729368d2e4c6c6a1918179c8c53bec79219 Mon Sep 17 00:00:00 2001 From: John Clements Date: Wed, 15 Jul 2020 15:10:09 +0800 Subject: drm/amdgpu: correct ta header v2 ucode init start address resolve bug calculating fw start address within binary Reviewed-by: Guchun Chen Signed-off-by: John Clements Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 40706334f7a8..6e41d896e62e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -2286,7 +2286,9 @@ int parse_ta_bin_descriptor(struct psp_context *psp, if (!psp || !desc || !ta_hdr) return -EINVAL; - ucode_start_addr = (uint8_t *)ta_hdr + le32_to_cpu(desc->offset_bytes); + ucode_start_addr = (uint8_t *)ta_hdr + + le32_to_cpu(desc->offset_bytes) + + le32_to_cpu(ta_hdr->header.ucode_array_offset_bytes); switch (desc->fw_type) { case TA_FW_TYPE_PSP_ASD: -- cgit v1.2.3