<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<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:#317100;margin:15pt;" align="Left">
[AMD Public Use]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Please fix up the patch title.  E.g.,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
drm/amdgpu: <font face="Calibri, sans-serif">Don't write <font size="2"><span style="font-size:11pt">GCVM_L2_CNTL* regs on navi12 VF</span></font></font><br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
With that fixed, patch is:</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Reviewed-by: Alex Deucher@amd.com><br>
</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Rohit Khaire <Rohit.Khaire@amd.com><br>
<b>Sent:</b> Friday, February 21, 2020 3:24 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Khaire, Rohit <Rohit.Khaire@amd.com><br>
<b>Subject:</b> [PATCH] SWDEV-220585 - Navi12 L1 policy GC regs WAR #1</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">This change disables programming of GCVM_L2_CNTL* regs on VF.<br>
<br>
Signed-off-by: Rohit Khaire <Rohit.Khaire@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c | 12 +++++++++---<br>
 1 file changed, 9 insertions(+), 3 deletions(-)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c<br>
index b70c7b483c24..e0654a216ab5 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_0.c<br>
@@ -135,6 +135,10 @@ static void gfxhub_v2_0_init_cache_regs(struct amdgpu_device *adev)<br>
 {<br>
         uint32_t tmp;<br>
 <br>
+       /* These regs are not accessible for VF, PF will program these in SRIOV */<br>
+       if (amdgpu_sriov_vf(adev))<br>
+               return;<br>
+<br>
         /* Setup L2 cache */<br>
         tmp = RREG32_SOC15(GC, 0, mmGCVM_L2_CNTL);<br>
         tmp = REG_SET_FIELD(tmp, GCVM_L2_CNTL, ENABLE_L2_CACHE, 1);<br>
@@ -298,9 +302,11 @@ void gfxhub_v2_0_gart_disable(struct amdgpu_device *adev)<br>
                             ENABLE_ADVANCED_DRIVER_MODEL, 0);<br>
         WREG32_SOC15(GC, 0, mmGCMC_VM_MX_L1_TLB_CNTL, tmp);<br>
 <br>
-       /* Setup L2 cache */<br>
-       WREG32_FIELD15(GC, 0, GCVM_L2_CNTL, ENABLE_L2_CACHE, 0);<br>
-       WREG32_SOC15(GC, 0, mmGCVM_L2_CNTL3, 0);<br>
+       if (!amdgpu_sriov_vf(adev)) {<br>
+               /* Setup L2 cache */<br>
+               WREG32_FIELD15(GC, 0, GCVM_L2_CNTL, ENABLE_L2_CACHE, 0);<br>
+               WREG32_SOC15(GC, 0, mmGCVM_L2_CNTL3, 0);<br>
+       }<br>
 }<br>
 <br>
 /**<br>
-- <br>
2.17.1<br>
<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C52705cf7b1bc4750932a08d7b70c0e38%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637179135079462923&amp;sdata=6YT8MUoBGMujktD%2BoYjEcxCAq2TE4gt7CO7GO4mGpoc%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=02%7C01%7Calexander.deucher%40amd.com%7C52705cf7b1bc4750932a08d7b70c0e38%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637179135079462923&amp;sdata=6YT8MUoBGMujktD%2BoYjEcxCAq2TE4gt7CO7GO4mGpoc%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</body>
</html>