<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:#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, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);" class="elementToProof">
<b style="font-size: 11pt; font-family: Calibri, sans-serif; font-style: inherit; font-variant-ligatures: inherit; font-variant-caps: inherit;">From:</b><span style="font-size: 11pt; font-family: Calibri, sans-serif; color: rgb(0, 0, 0);"> Limonciello, Mario
 <Mario.Limonciello@amd.com></span><br>
</div>
<div dir="ltr"><font face="Calibri, sans-serif" style="font-size: 11pt; color: rgb(0, 0, 0);"><b>Sent:</b> Friday, July 28, 2023 10:39 AM<br>
<b>To:</b> Huang, Tim <Tim.Huang@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <Yifan1.Zhang@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amd/pm: skip the RLC stop when S0i3 suspend for SMU v13.0.4/11</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText elementToProof">On 7/27/23 21:21, Huang, Tim wrote:<br>
> [AMD Official Use Only - General]<br>
> <br>
> <br>
> <br>
> *From:* Limonciello, Mario <Mario.Limonciello@amd.com><br>
> *Sent:* Friday, July 28, 2023 9:14 AM<br>
> *To:* Huang, Tim <Tim.Huang@amd.com>; amd-gfx@lists.freedesktop.org <br>
> <amd-gfx@lists.freedesktop.org><br>
> *Cc:* Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Yifan <br>
> <Yifan1.Zhang@amd.com><br>
> *Subject:* Re: [PATCH] drm/amd/pm: skip the RLC stop when S0i3 suspend <br>
> for SMU v13.0.4/11<br>
> On 7/27/23 20:05, Tim Huang wrote:<br>
>> From: Tim Huang <Tim.Huang@amd.com><br>
>><br>
>> For SMU v13.0.4/11, driver does not need to stop RLC for S0i3,<br>
>> the firmwares will handle that properly.<br>
>> Conceptually I'm aligned to this.<br>
>> But, just to confirm, have you already run some testing with this<br>
>> with current GPU F/W, BIOS and either 6.1.y, 6.4.y or ASDN?<br>
> <br>
>> I checked with this on my side and saw success but I'm fearful<br>
>> that it introduces some of the fence expiration problems we<br>
>> had in the past and I'm just not seeing them for some reason.<br>
> <br>
> Yes, verified based on current BIOS and latest drm-next kernel and the <br>
> working FWs as the latest FWs<br>
> may have some new issues.<br>
> For this patch, it is asked by the FW guys, driver should not touch <br>
> RLC_CNTL in S0i3, let RLC FW to do that. If driver programs RLC_CNTL to <br>
> halt RLC, RLC cannot go GFXOFF exit sequence.<br>
> <br>
> The fence expiration should be still there by the delayed GFXOFF , but <br>
> this patch should be useful to help debug it as it avoids the system <br>
> hang when the issue happens.<br>
<br>
> So in that case you think that when the driver programs RLC_CNTL  but <br>
> GFXOFF was delayed sequence was going out of order and it triggered <br>
</div>
<div class="PlainText elementToProof">
<div><span style="">> system hang.  But now with this patch it will not hang but fences expire.</span><br>
</div>
</div>
<div class="PlainText elementToProof"><br>
> It makes sense to me.  This patch shouldn't be any "more" harmful then.<br>
<br>
> Reviewed-by: Mario Limonciello <mario.limonciello@amd.com><br>
<br>
> For the delayed GFXOFF issue maybe we should revisit my previous idea <br>
> for flushing GFXOFF requests.  IIRC the most recent version was:<br>
> </div>
<div class="PlainText elementToProof">> <a href="https://patchwork.freedesktop.org/patch/537888/?series=117965&rev=1" data-auth="NotApplicable">https://patchwork.freedesktop.org/patch/537888/?series=117965&rev=1</a><br>
</div>
<div class="PlainText elementToProof"><br>
</div>
<div class="PlainText elementToProof"> I agree.  We can add this patch to the latest test build and check whether the issue is gone.</div>
<div class="PlainText elementToProof"><br>
</div>
<div class="PlainText elementToProof"> Thanks.</div>
<div class="PlainText elementToProof"><br>
</div>
<div class="PlainText elementToProof">> <br>
> Best Regards,<br>
> Tim<br>
> <br>
>><br>
>> Signed-off-by: Tim Huang <Tim.Huang@amd.com><br>
>> ---<br>
>>   drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 4 ++--<br>
>>   1 file changed, 2 insertions(+), 2 deletions(-)<br>
>><br>
>> diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
>> index ce41a8309582..222af2fae745 100644<br>
>> --- a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
>> +++ b/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c<br>
>> @@ -1581,9 +1581,9 @@ static int smu_disable_dpms(struct smu_context *smu)<br>
>>   <br>
>>        /*<br>
>>         * For SMU 13.0.4/11, PMFW will handle the features disablement properly<br>
>> -      * for gpu reset case. Driver involvement is unnecessary.<br>
>> +      * for gpu reset and S0i3 cases. Driver involvement is unnecessary.<br>
>>         */<br>
>> -     if (amdgpu_in_reset(adev)) {<br>
>> +     if (amdgpu_in_reset(adev) || adev->in_s0ix) {<br>
>>                switch (adev->ip_versions[MP1_HWIP][0]) {<br>
>>                case IP_VERSION(13, 0, 4):<br>
>>                case IP_VERSION(13, 0, 11):<br>
> <br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>