<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
{font-family:SimSun;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:DengXian;
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Aptos;}
@font-face
{font-family:"\@DengXian";
panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
{font-family:"\@SimSun";
panose-1:2 1 6 0 3 1 1 1 1 1;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:12.0pt;
font-family:"Aptos",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#467886;
text-decoration:underline;}
span.EmailStyle20
{mso-style-type:personal-reply;
font-family:"Aptos",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;
mso-ligatures:none;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#467886" vlink="#96607D" style="word-wrap:break-word">
<p style="font-family:Calibri;font-size:10pt;color:#0000FF;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[AMD Official Use Only - AMD Internal Distribution Only]<br>
</p>
<br>
<div>
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt">Previously, the S3 process aborted before calling the noirq suspend, and this issue was successfully sorted by checking the suspend_complete flag. However, there are now some S3 suspend cases, such as pm_test
platform/core mode, which abort the S3 process after the noirq suspend. In these cases of abort, the issue cannot be sorted out by setting the suspend_complete flag in the noirq suspend callback, and it’s fine to use the MP0 SOL register directly to determine
whether to reset the GPU on resume. However, on the GFX9 series, the driver still needs to rely on the suspend_complete flag to determine whether it needs to skip reprogramming the clear state register values during resume from suspend abort cases, so now
it sounds that the suspend_complete flag cannot be completely removed. <o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-ligatures:standardcontextual">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;mso-ligatures:standardcontextual">Prikec<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span style="font-size:11.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> Deucher, Alexander <Alexander.Deucher@amd.com>
<br>
<b>Sent:</b> Saturday, September 7, 2024 1:34 AM<br>
<b>To:</b> Liang, Prike <Prike.Liang@amd.com>; amd-gfx@lists.freedesktop.org<br>
<b>Subject:</b> Re: [PATCH] drm/amdgpu: update suspend status for aborting from deeper suspend<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p style="margin:5.0pt"><span style="font-size:10.0pt;font-family:"Calibri",sans-serif;color:blue">[AMD Official Use Only - AMD Internal Distribution Only]<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal"><span style="color:black">Can you elaborate on how this fails? Seems like maybe we should just get rid of adev->suspend_complete and just check the MP0 SOL register to determine whether or not we need to reset the GPU on resume.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black">Alex<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="98%" align="center">
</div>
<div id="divRplyFwdMsg">
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:black"> Liang, Prike <<a href="mailto:Prike.Liang@amd.com">Prike.Liang@amd.com</a>><br>
<b>Sent:</b> Thursday, September 5, 2024 3:36 AM<br>
<b>To:</b> <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a> <<a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>><br>
<b>Cc:</b> Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>><br>
<b>Subject:</b> RE: [PATCH] drm/amdgpu: update suspend status for aborting from deeper suspend</span>
<o:p></o:p></p>
<div>
<p class="MsoNormal"> <o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><a name="BM_BEGIN"></a><span style="font-size:11.0pt;font-family:"Times New Roman",serif">[AMD Official Use Only - AMD Internal Distribution Only]<br>
<br>
According to the ChromeOS team test, this patch can resolve the S3 suspend abort from deeper sleep, which occurs when suspension aborts after calling the noirq suspend and before executing the _S3 and turning off the power rail.<br>
<br>
Could this patch get a review or acknowledgment?<br>
<br>
Thanks,<br>
Prike<br>
<br>
> -----Original Message-----<br>
> From: Liang, Prike <<a href="mailto:Prike.Liang@amd.com">Prike.Liang@amd.com</a>><br>
> Sent: Monday, September 2, 2024 4:13 PM<br>
> To: <a href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a><br>
> Cc: Deucher, Alexander <<a href="mailto:Alexander.Deucher@amd.com">Alexander.Deucher@amd.com</a>>; Liang, Prike<br>
> <<a href="mailto:Prike.Liang@amd.com">Prike.Liang@amd.com</a>><br>
> Subject: [PATCH] drm/amdgpu: update suspend status for aborting from<br>
> deeper suspend<br>
><br>
> There're some other suspend abort cases which can call the noirq suspend<br>
> except for executing _S3 method. In those cases need to process as<br>
> incomplete suspendsion.<br>
><br>
> Signed-off-by: Prike Liang <<a href="mailto:Prike.Liang@amd.com">Prike.Liang@amd.com</a>><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/soc15.c | 10 ++++++----<br>
> 1 file changed, 6 insertions(+), 4 deletions(-)<br>
><br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
> b/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
> index 8d16dacdc172..cf701bb8fc79 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/soc15.c<br>
> @@ -587,11 +587,13 @@ static bool soc15_need_reset_on_resume(struct<br>
> amdgpu_device *adev)<br>
> * 2) S3 suspend abort and TOS already launched.<br>
> */<br>
> if (adev->flags & AMD_IS_APU && adev->in_s3 &&<br>
> - !adev->suspend_complete &&<br>
> - sol_reg)<br>
> + sol_reg) {<br>
> + adev->suspend_complete = false;<br>
> return true;<br>
> -<br>
> - return false;<br>
> + } else {<br>
> + adev->suspend_complete = true;<br>
> + return false;<br>
> + }<br>
> }<br>
><br>
> static int soc15_asic_reset(struct amdgpu_device *adev)<br>
> --<br>
> 2.34.1</span><span style="font-family:"Times New Roman",serif"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>