<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">
<p style="font-family:Arial;font-size:10pt;color:#0000FF;margin:5pt;" align="Left">
[AMD Official Use Only]<br>
</p>
<br>
<div>
<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> Chen, Guchun <Guchun.Chen@amd.com><br>
<b>Sent:</b> Tuesday, February 22, 2022 10:07 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>; Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Koenig, Christian <Christian.Koenig@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com><br>
<b>Cc:</b> Chen, Guchun <Guchun.Chen@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: limit harvest bit read on several ASICs</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Due to faulty VBIOS out there, harvest bit setting is not<br>
consistently correct especially for display IP. So far,<br>
it's hard to work out a solution on all the legacy Navi1x<br>
ASICs in a short time, so to avoid regression, limit harvest<br>
bit read on several ASICs. Will revisit later once VBIOS has<br>
corrected it in long term.<br>
<br>
Fixes: b3f4ea887d5f("drm/amdgpu: read harvest bit per IP data on legacy GPUs")<br>
Signed-off-by: Guchun Chen <guchun.chen@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 18 +++++++++++++-----<br>
 1 file changed, 13 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
index 11255290f117..2e0ff1ace6fc 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c<br>
@@ -1129,12 +1129,20 @@ void amdgpu_discovery_harvest_ip(struct amdgpu_device *adev)<br>
          * so read harvest bit per IP data structure to set<br>
          * harvest configuration.<br>
          */<br>
-       if (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 2, 0))<br>
-               amdgpu_discovery_read_harvest_bit_per_ip(adev,<br>
-                                                       &vcn_harvest_count);<br>
-       else<br>
+       if (adev->ip_versions[GC_HWIP][0] < IP_VERSION(10, 2, 0)) {<br>
+               if ((adev->pdev->device == 0x731E &&<br>
+                       (adev->pdev->revision == 0xC6 ||<br>
+                        adev->pdev->revision == 0xC7)) ||<br>
+                       (adev->pdev->device == 0x7340 &&<br>
+                        adev->pdev->revision == 0xC9) ||<br>
+                       (adev->pdev->device == 0x7360 &&<br>
+                        adev->pdev->revision == 0xC7))<br>
+                       amdgpu_discovery_read_harvest_bit_per_ip(adev,<br>
+                               &vcn_harvest_count);<br>
+       } else {<br>
                 amdgpu_disocvery_read_from_harvest_table(adev,<br>
-                                                       &vcn_harvest_count);<br>
+                       &vcn_harvest_count);<br>
+       }<br>
 <br>
         amdgpu_discovery_harvest_config_quirk(adev);<br>
 <br>
-- <br>
2.17.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>