<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:#008000;margin:15pt;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" 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 Peng Ju Zhou <PengJu.Zhou@amd.com><br>
<b>Sent:</b> Monday, October 31, 2022 9:45 PM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> [PATCH] drm/amdgpu: Remove unnecessary register program in SRIOV</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">Remove unnecessary register program in SRIOV<br>
<br>
Signed-off-by: Peng Ju Zhou <PengJu.Zhou@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c<br>
index ff738e9725ee..6aa02d835ecb 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/gfxhub_v2_1.c<br>
@@ -395,6 +395,9 @@ static void gfxhub_v2_1_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>
+       if (amdgpu_sriov_vf(adev))<br>
+               return;<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>
-- <br>
2.33.1<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>