<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 - General]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof">
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 Graham Sider <Graham.Sider@amd.com><br>
<b>Sent:</b> Wednesday, May 17, 2023 12:19 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Sider, Graham <Graham.Sider@amd.com><br>
<b>Subject:</b> [PATCH] drm/amdgpu: disable extra gfx943 legacy flush on rev1+</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">The extra legacy TLB flush mitigation is only required on rev0.<br>
<br>
Signed-off-by: Graham Sider <Graham.Sider@amd.com><br>
---<br>
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 15 +++++----------<br>
1 file changed, 5 insertions(+), 10 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
index 38e4828f574e..ba8251b6b279 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c<br>
@@ -844,11 +844,8 @@ static void gmc_v9_0_flush_gpu_tlb(struct amdgpu_device *adev, uint32_t vmid,<br>
inv_req = gmc_v9_0_get_invalidate_req(vmid, 2);<br>
inv_req2 = gmc_v9_0_get_invalidate_req(vmid, flush_type);<br>
} else if (flush_type == 2 &&<br>
- adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3)) {<br>
- /* FIXME: Temporarily add a legacy flush (type 0) before heavyweight<br>
- * flush for gfx943 to mitigate a bug which causes CPC UTCL1 to return<br>
- * stale translations even after TLB heavyweight flush.<br>
- */<br>
+ adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3) &&<br>
+ adev->rev_id == 0) {<br>
inv_req = gmc_v9_0_get_invalidate_req(vmid, 0);<br>
inv_req2 = gmc_v9_0_get_invalidate_req(vmid, flush_type);<br>
} else {<br>
@@ -993,11 +990,9 @@ static int gmc_v9_0_flush_gpu_tlb_pasid(struct amdgpu_device *adev,<br>
kiq->pmf->kiq_invalidate_tlbs(ring,<br>
pasid, 2, all_hub);<br>
<br>
- /* FIXME: Temporarily add a legacy flush (type 0) before heavyweight<br>
- * flush for gfx943 to mitigate a bug which causes CPC UTCL1 to return<br>
- * stale translations even after TLB heavyweight flush.<br>
- */<br>
- if (flush_type == 2 && adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3))<br>
+ if (flush_type == 2 &&<br>
+ adev->ip_versions[GC_HWIP][0] == IP_VERSION(9, 4, 3) &&<br>
+ adev->rev_id == 0)<br>
kiq->pmf->kiq_invalidate_tlbs(ring,<br>
pasid, 0, all_hub);<br>
<br>
-- <br>
2.25.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>