<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;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - General]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
Yes, those regs are restricted to PF writes. I should update the commit message</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> Dhume, Samir <Samir.Dhume@amd.com><br>
<b>Sent:</b> Wednesday, November 8, 2023 9:54 AM<br>
<b>To:</b> Lu, Victor Cheng Chi (Victor) <VictorChengChi.Lu@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV</font>
<div> </div>
</div>
<div class="BodyFragment"><font face="Times New Roman" size="3"><span style="font-size:12pt;"><a name="BM_BEGIN"></a>
<div><font size="2"><span style="font-size:11pt;">[AMD Official Use Only - General]<br>
<br>
Do you also need to skip programming of mmHDP_NONSURFACE_BASE and mmHDP_NONSURFACE_BASE_HI?<br>
<br>
-----Original Message-----<br>
From: Lu, Victor Cheng Chi (Victor) <VictorChengChi.Lu@amd.com><br>
Sent: Tuesday, November 7, 2023 2:32 PM<br>
To: amd-gfx@lists.freedesktop.org<br>
Cc: Dhume, Samir <Samir.Dhume@amd.com>; Lu, Victor Cheng Chi (Victor) <VictorChengChi.Lu@amd.com><br>
Subject: [PATCH] drm/amdgpu: Do not program HDP_MISC_CNTL in hdp_v4_0.c under SRIOV<br>
<br>
This register is blocked for VF access.<br>
<br>
Signed-off-by: Victor Lu <victorchengchi.lu@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 +++++<br>
 1 file changed, 5 insertions(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c<br>
index 3f3a6445c006..bf3bdf67abb7 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c<br>
@@ -145,6 +145,11 @@ static void hdp_v4_0_init_registers(struct amdgpu_device *adev)<br>
                break;<br>
        }<br>
<br>
+       /* Do not program registers if VF */<br>
+       if (amdgpu_sriov_vf(adev)) {<br>
+               return;<br>
+       }<br>
+<br>
        WREG32_FIELD15(HDP, 0, HDP_MISC_CNTL, FLUSH_INVALIDATE_CACHE, 1);<br>
<br>
        if (amdgpu_ip_version(adev, HDP_HWIP, 0) == IP_VERSION(4, 4, 0))<br>
--<br>
2.34.1<br>
<br>
</span></font></div>
</span></font></div>
</div>
</body>
</html>