<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 id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Reviewed-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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 Aaron Liu <aaron.liu@amd.com><br>
<b>Sent:</b> Wednesday, December 5, 2018 8:26:52 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org<br>
<b>Cc:</b> Liu, Aaron<br>
<b>Subject:</b> [PATCH] drm/amdgpu: both support PCO FP5/AM4 rlc fw</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">For Picasso && AM4 SOCKET board, we use picasso_rlc_am4.bin<br>
For Picasso && FP5 SOCKET board, we use picasso_rlc.bin<br>
<br>
Judgment method:<br>
PCO AM4: revision >= 0xC8 && revision <= 0xCF<br>
         or revision >= 0xD8 && revision <= 0xDF<br>
otherwise is PCO FP5<br>
<br>
Change-Id: I359f0a3d1bc7d4d49c871cb3fb82797c7b91b259<br>
Signed-off-by: Aaron Liu <aaron.liu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 16 +++++++++++++++-<br>
 1 file changed, 15 insertions(+), 1 deletion(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
index 94740ea..7556716 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
@@ -86,6 +86,7 @@ MODULE_FIRMWARE("amdgpu/picasso_me.bin");<br>
 MODULE_FIRMWARE("amdgpu/picasso_mec.bin");<br>
 MODULE_FIRMWARE("amdgpu/picasso_mec2.bin");<br>
 MODULE_FIRMWARE("amdgpu/picasso_rlc.bin");<br>
+MODULE_FIRMWARE("amdgpu/picasso_rlc_am4.bin");<br>
 <br>
 MODULE_FIRMWARE("amdgpu/raven2_ce.bin");<br>
 MODULE_FIRMWARE("amdgpu/raven2_pfp.bin");<br>
@@ -645,7 +646,20 @@ static int gfx_v9_0_init_microcode(struct amdgpu_device *adev)<br>
         adev->gfx.ce_fw_version = le32_to_cpu(cp_hdr->header.ucode_version);<br>
         adev->gfx.ce_feature_version = le32_to_cpu(cp_hdr->ucode_feature_version);<br>
 <br>
-       snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);<br>
+       /*<br>
+        * For Picasso && AM4 SOCKET board, we use picasso_rlc_am4.bin<br>
+        * instead of picasso_rlc.bin.<br>
+        * Judgment method:<br>
+        * PCO AM4: revision >= 0xC8 && revision <= 0xCF<br>
+        *          or revision >= 0xD8 && revision <= 0xDF<br>
+        * otherwise is PCO FP5<br>
+        */<br>
+       if (!strcmp(chip_name, "picasso") &&<br>
+               (((adev->pdev->revision >= 0xC8) && (adev->pdev->revision <= 0xCF)) ||<br>
+               ((adev->pdev->revision >= 0xD8) && (adev->pdev->revision <= 0xDF))))<br>
+               snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc_am4.bin", chip_name);<br>
+       else<br>
+               snprintf(fw_name, sizeof(fw_name), "amdgpu/%s_rlc.bin", chip_name);<br>
         err = request_firmware(&adev->gfx.rlc_fw, fw_name, adev->dev);<br>
         if (err)<br>
                 goto out;<br>
-- <br>
2.7.4<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><br>
</div>
</span></font></div>
</body>
</html>