<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-2022-jp">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Please add a comment above the <font size="2">
<span style="font-size:11pt;">CP_PQ_WPTR_POLL_CNTL write to explain that it's to disable the polling. WIth that fixed:</span></font><br>
</p>
<p style="margin-top:0;margin-bottom:0">Acked-by: Alex Deucher <alexander.deucher@amd.com><br>
</p>
</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 Liu, Monk <Monk.Liu@amd.com><br>
<b>Sent:</b> Tuesday, February 27, 2018 12:31:35 AM<br>
<b>To:</b> Alex Deucher<br>
<b>Cc:</b> amd-gfx list<br>
<b>Subject:</b> RE: [PATCH 17/22] drm/amdgpu: disable GFX ring and disable PQ wptr in hw_fini</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">This is only for virtualization, for bare-metal it go another path<br>
<br>
-----Original Message-----<br>
From: Alex Deucher [<a href="mailto:alexdeucher@gmail.com">mailto:alexdeucher@gmail.com</a>]
<br>
Sent: 2018年2月27日 1:40<br>
To: Liu, Monk <Monk.Liu@amd.com><br>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org><br>
Subject: Re: [PATCH 17/22] drm/amdgpu: disable GFX ring and disable PQ wptr in hw_fini<br>
<br>
On Mon, Feb 26, 2018 at 12:18 AM, Monk Liu <Monk.Liu@amd.com> wrote:<br>
> otherwise there will be DMAR reading error comes out from CP since GFX <br>
> is still alive and CPC's WPTR_POLL is still enabled, which would lead <br>
> to DMAR read error.<br>
><br>
> fix:<br>
> we can hault CPG after hw_fini, but cannot halt CPC becaues KIQ stil <br>
> need to be alive to let RLCV invoke, but its WPTR_POLL could be <br>
> disabled.<br>
><br>
> Change-Id: Ia60ee54901531f737d09063bf2037630e7c94771<br>
> Signed-off-by: Monk Liu <Monk.Liu@amd.com><br>
<br>
Is this handled properly for bare metal as well?<br>
<br>
Alex<br>
<br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 3 ++-<br>
> 1 file changed, 2 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c <br>
> b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
> index e9cc03e..793db9f 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c<br>
> @@ -2961,7 +2961,8 @@ static int gfx_v9_0_hw_fini(void *handle)<br>
> gfx_v9_0_kcq_disable(&adev->gfx.kiq.ring, <br>
> &adev->gfx.compute_ring[i]);<br>
><br>
> if (amdgpu_sriov_vf(adev)) {<br>
> - pr_debug("For SRIOV client, shouldn't do anything.\n");<br>
> + gfx_v9_0_cp_gfx_enable(adev, false);<br>
> + WREG32_FIELD15(GC, 0, CP_PQ_WPTR_POLL_CNTL, EN, 0);<br>
> return 0;<br>
> }<br>
> gfx_v9_0_cp_enable(adev, false);<br>
> --<br>
> 2.7.4<br>
><br>
> _______________________________________________<br>
> amd-gfx mailing list<br>
> amd-gfx@lists.freedesktop.org<br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/amd-gfx">https://lists.freedesktop.org/mailman/listinfo/amd-gfx</a><br>
</div>
</span></font></div>
</body>
</html>