<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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:11pt;color:#0078D7;margin:5pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div><span style="font-size: 11pt;">​Hi All,</span></div>
<div><span style="font-size: 11pt;">   Thanks for the inputs, have updated the patch to include these changes.
<br>
</span></div>
<div><span style="font-size: 11pt;"><br>
</span></div>
<div><span style="font-size: 11pt;">Regards,</span></div>
<div><span style="font-size: 11pt;">Bindu <br>
</span></div>
<div><span style="font-size: 11pt;"><font size="2"><span style="font-size:11pt"></span></font><br>
</span></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> Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com><br>
<b>Sent:</b> Wednesday, March 17, 2021 1:02 PM<br>
<b>To:</b> Michel Dänzer <michel@daenzer.net>; R, Bindu <Bindu.R@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Feng, Kenneth <Kenneth.Feng@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amd/display: Allow idle optimization based on vblank.</font>
<div> </div>
</div>
<style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<p align="Left" style="font-family:Arial; font-size:11pt; color:#0078D7; margin:5pt">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Hi Bindu,</div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
<font size="2"><span style="font-size:11pt">dc_allow_idle_optimizations() should be called within mutex_lock(&dm->dc_lock). Please call it right after
<font size="2"><span style="font-size:11pt">WARN_ON(!dc_commit_state(dm->dc, dc_state)) but before unlock().</span></font></span></font></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt"><br>
</span></font></span></font></div>
<div style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<font size="2"><span style="font-size:11pt"><font size="2"><span style="font-size:11pt">Bhawan</span></font></span></font><br>
</div>
<div id="x_appendonsend"></div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Michel Dänzer <michel@daenzer.net><br>
<b>Sent:</b> March 17, 2021 7:37 AM<br>
<b>To:</b> R, Bindu <Bindu.R@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Feng, Kenneth <Kenneth.Feng@amd.com>; Zhou1, Tao <Tao.Zhou1@amd.com>; Lakha, Bhawanpreet <Bhawanpreet.Lakha@amd.com><br>
<b>Subject:</b> Re: [PATCH] drm/amd/display: Allow idle optimization based on vblank.</font>
<div> </div>
</div>
<div class="x_BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="x_PlainText">On 2021-03-17 12:49 a.m., Bindu Ramamurthy wrote:<br>
> [Why]<br>
> idle optimization was being disabled after commit.<br>
> <br>
> [How]<br>
> check vblank count for display off and enable idle optimization based on this count.<br>
> <br>
> Signed-off-by: Bindu Ramamurthy <bindu.r@amd.com><br>
> ---<br>
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++--<br>
>  1 file changed, 5 insertions(+), 2 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> index 553e39f9538c..56a55143ad2d 100644<br>
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c<br>
> @@ -987,7 +987,7 @@ static void event_mall_stutter(struct work_struct *work)<br>
>  <br>
>        if (vblank_work->enable)<br>
>                dm->active_vblank_irq_count++;<br>
> -     else<br>
> +     else if(dm->active_vblank_irq_count)<br>
>                dm->active_vblank_irq_count--;<br>
<br>
The commit log should explain why this part is needed.<br>
<br>
<br>
-- <br>
Earthling Michel Dänzer               |               <a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fredhat.com%2F&amp;data=04%7C01%7Cbhawanpreet.lakha%40amd.com%7C11fd0779679742148e2a08d8e938fe34%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637515778296313590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2BPsyjDxRCTdR9HL1QSlCraWo7YpFg%2FJT8i%2BSsG%2BQvZE%3D&amp;reserved=0">
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fredhat.com%2F&amp;data=04%7C01%7Cbhawanpreet.lakha%40amd.com%7C11fd0779679742148e2a08d8e938fe34%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637515778296313590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=%2BPsyjDxRCTdR9HL1QSlCraWo7YpFg%2FJT8i%2BSsG%2BQvZE%3D&amp;reserved=0</a><br>
Libre software enthusiast             |             Mesa and X developer<br>
_______________________________________________<br>
amd-gfx mailing list<br>
amd-gfx@lists.freedesktop.org<br>
<a href="https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cbhawanpreet.lakha%40amd.com%7C11fd0779679742148e2a08d8e938fe34%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637515778296313590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=L4fr6qPeO5rcMi0zg9bk9xLRTKtyVRTJ3LcSPd3Qlyw%3D&amp;reserved=0">https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&amp;data=04%7C01%7Cbhawanpreet.lakha%40amd.com%7C11fd0779679742148e2a08d8e938fe34%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637515778296313590%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=L4fr6qPeO5rcMi0zg9bk9xLRTKtyVRTJ3LcSPd3Qlyw%3D&amp;reserved=0</a><br>
</div>
</span></font></div>
</div>
</div>
</div>
</body>
</html>