<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
<b>Sent:</b> Friday, November 8, 2019 4:57 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com><br>
<b>Subject:</b> [PATCH] drm/amd/display: Load TA firmware for navi10/12/14</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">load the ta firmware for navi10/12/14.<br>
This is already being done for raven/picasso and<br>
is needed for supporting hdcp on navi<br>
<br>
Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 25 +++++++++++++++++++++++++<br>
 1 file changed, 25 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c<br>
index ffeaa2f5588d..daf11be5416f 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c<br>
@@ -186,6 +186,31 @@ static int psp_v11_0_init_microcode(struct psp_context *psp)<br>
         case CHIP_NAVI10:<br>
         case CHIP_NAVI14:<br>
         case CHIP_NAVI12:<br>
+               snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_ta.bin", chip_name);<br>
+               err = request_firmware(&adev->psp.ta_fw, fw_name, adev->dev);<br>
+               if (err) {<br>
+                       release_firmware(adev->psp.ta_fw);<br>
+                       adev->psp.ta_fw = NULL;<br>
+                       dev_info(adev->dev,<br>
+                                "psp v11.0: Failed to load firmware \"%s\"\n", fw_name);<br>
+               } else {<br>
+                       err = amdgpu_ucode_validate(adev->psp.ta_fw);<br>
+                       if (err)<br>
+                               goto out2;<br>
+<br>
+                       ta_hdr = (const struct ta_firmware_header_v1_0 *)adev->psp.ta_fw->data;<br>
+                       adev->psp.ta_hdcp_ucode_version = le32_to_cpu(ta_hdr->ta_hdcp_ucode_version);<br>
+                       adev->psp.ta_hdcp_ucode_size = le32_to_cpu(ta_hdr->ta_hdcp_size_bytes);<br>
+                       adev->psp.ta_hdcp_start_addr = (uint8_t *)ta_hdr +<br>
+                               le32_to_cpu(ta_hdr->header.ucode_array_offset_bytes);<br>
+<br>
+                       adev->psp.ta_fw_version = le32_to_cpu(ta_hdr->header.ucode_version);<br>
+<br>
+                       adev->psp.ta_dtm_ucode_version = le32_to_cpu(ta_hdr->ta_dtm_ucode_version);<br>
+                       adev->psp.ta_dtm_ucode_size = le32_to_cpu(ta_hdr->ta_dtm_size_bytes);<br>
+                       adev->psp.ta_dtm_start_addr = (uint8_t *)adev->psp.ta_hdcp_start_addr +<br>
+                               le32_to_cpu(ta_hdr->ta_dtm_offset_bytes);<br>
+               }<br>
                 break;<br>
         default:<br>
                 BUG();<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a></div>
</span></font></div>
</body>
</html>