Skip to contentSkip to conversation

drm/amdgpu: Add secure display TA load for Renoir

PATCH In review Shane Xiao 2 participants 2 messages Aug 15, 2022

Subsystems (2)
lore
Share & tools
lore

Shane Xiao

author
#0 lore raw

PATCH 1/1 drm/amdgpu: Add secure display TA load for Renoir

Add secure display TA load for Renoir

---
 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +10 -0
index a2588200ea58..0b2ac418e4ac 100644
@@ -101,6 +101,16 @@ static int psp_v12_0_init_microcode(struct psp_context *psp)
 		adev->psp.dtm_context.context.bin_desc.start_addr =
 			(uint8_t *)adev->psp.hdcp_context.context.bin_desc.start_addr +
 			le32_to_cpu(ta_hdr->dtm.offset_bytes);
+
+		if (adev->apu_flags & AMD_APU_IS_RENOIR) {
+			adev->psp.securedisplay_context.context.bin_desc.fw_version =
+				le32_to_cpu(ta_hdr->securedisplay.fw_version);
+			adev->psp.securedisplay_context.context.bin_desc.size_bytes =
+				le32_to_cpu(ta_hdr->securedisplay.size_bytes);
+			adev->psp.securedisplay_context.context.bin_desc.start_addr =
+				(uint8_t *)adev->psp.hdcp_context.context.bin_desc.start_addr +
+				le32_to_cpu(ta_hdr->securedisplay.offset_bytes);
+		}
 	}
 
 	return 0;
Signature · 1 line
2.25.1
Reviewed-by on v1 1/1
#1 lore raw

[AMD Official Use Only - General]

Quoted 48 lines

-----Original Message-----
From: amd-gfx <[email protected]> On Behalf Of Shane Xiao
Sent: Monday, August 15, 2022 4:40 PM
To: [email protected]
Cc: Xiao, Shane <[email protected]>
Subject: [PATCH] drm/amdgpu: Add secure display TA load for Renoir

Add secure display TA load for Renoir

---
 drivers/gpu/drm/amd/amdgpu/psp_v12_0.c | 10 ++++++++++
 1 file changed, 10 insertions(+)
drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +0 -0
index a2588200ea58..0b2ac418e4ac 100644
@@ -101,6 +101,16 @@ static int psp_v12_0_init_microcode(struct
 psp_context *psp)
 		adev->psp.dtm_context.context.bin_desc.start_addr =
 			(uint8_t *)adev-
Quoted 1 line

psp.hdcp_context.context.bin_desc.start_addr +

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +3 -0
 			le32_to_cpu(ta_hdr->dtm.offset_bytes);
+
+		if (adev->apu_flags & AMD_APU_IS_RENOIR) {
+			adev-
Quoted 1 line

psp.securedisplay_context.context.bin_desc.fw_version =

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -0
+				le32_to_cpu(ta_hdr-
Quoted 1 line

securedisplay.fw_version);

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -0
+			adev-
Quoted 1 line

psp.securedisplay_context.context.bin_desc.size_bytes =

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -0
+				le32_to_cpu(ta_hdr-
Quoted 1 line

securedisplay.size_bytes);

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -0
+			adev-
Quoted 1 line

psp.securedisplay_context.context.bin_desc.start_addr =

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -0
+				(uint8_t *)adev-
Quoted 1 line

psp.hdcp_context.context.bin_desc.start_addr +

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -0
+				le32_to_cpu(ta_hdr-
Quoted 1 line

securedisplay.offset_bytes);

drivers/gpu/drm/amd/amdgpu/psp_v12_0.c +1 -1
+		}
 	}
 
 	return 0;
--

2.25.1