<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
It's missing the "drm_connector_list_update" call which I assume is
important.<br>
<br>
Stylon, can you review Lee Starnes's patch? Is the
drm_connector_list_update call maybe not needed?<br>
<br>
Thanks,<br>
Harry<br>
<br>
<div class="moz-cite-prefix">On 2020-11-10 11:26 a.m., Deucher,
Alexander wrote:<br>
</div>
<blockquote type="cite" cite="mid:MN2PR12MB4488F51CB06882617DE3BD60F7E90@MN2PR12MB4488.namprd12.prod.outlook.com">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;}</style>
<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 style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Lee Starnes just sent the exact same patch yesterday. Please
review that one:</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<a href="https://patchwork.freedesktop.org/patch/399497/" id="LPlnk260581" moz-do-not-send="true">https://patchwork.freedesktop.org/patch/399497/</a><br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
Alex</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif;
font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b>
Wentland, Harry <a class="moz-txt-link-rfc2396E" href="mailto:Harry.Wentland@amd.com"><Harry.Wentland@amd.com></a><br>
<b>Sent:</b> Tuesday, November 10, 2020 9:27 AM<br>
<b>To:</b> Wang, Chao-kai (Stylon)
<a class="moz-txt-link-rfc2396E" href="mailto:Stylon.Wang@amd.com"><Stylon.Wang@amd.com></a>; <a class="moz-txt-link-abbreviated" href="mailto:amd-gfx@lists.freedesktop.org">amd-gfx@lists.freedesktop.org</a>
<a class="moz-txt-link-rfc2396E" href="mailto:amd-gfx@lists.freedesktop.org"><amd-gfx@lists.freedesktop.org></a><br>
<b>Cc:</b> Kazlauskas, Nicholas
<a class="moz-txt-link-rfc2396E" href="mailto:Nicholas.Kazlauskas@amd.com"><Nicholas.Kazlauskas@amd.com></a>; Deucher, Alexander
<a class="moz-txt-link-rfc2396E" href="mailto:Alexander.Deucher@amd.com"><Alexander.Deucher@amd.com></a><br>
<b>Subject:</b> Re: [PATCH] drm/amd/display: Fix memory
leaks in S3 resume</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2020-11-10 2:49 a.m., Stylon
Wang wrote:<br>
> EDID parsing in S3 resume pushes new display modes<br>
> to probed_modes list but doesn't consolidate to
actual<br>
> mode list. This creates a race condition when<br>
> amdgpu_dm_connector_ddc_get_modes() re-initializes
the<br>
> list head without walking the list and results in
memory leak.<br>
> <br>
> Signed-off-by: Stylon Wang
<a class="moz-txt-link-rfc2396E" href="mailto:stylon.wang@amd.com"><stylon.wang@amd.com></a><br>
<br>
Looks reasonable to me but haven't had a chance to
understand whether <br>
this is the best solution.<br>
<br>
Acked-by: Harry Wentland <a class="moz-txt-link-rfc2396E" href="mailto:harry.wentland@amd.com"><harry.wentland@amd.com></a><br>
<br>
Harry<br>
<br>
> ---<br>
> drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
| 3 ++-<br>
> 1 file changed, 2 insertions(+), 1 deletion(-)<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 0b6adf23d316..715e0bd489f8 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>
> @@ -2337,7 +2337,8 @@ void
amdgpu_dm_update_connector_after_detect(<br>
> <br>
>
drm_connector_update_edid_property(connector,<br>
>
aconnector->edid);<br>
> - drm_add_edid_modes(connector,
aconnector->edid);<br>
> + aconnector->num_modes =
drm_add_edid_modes(connector, aconnector->edid);<br>
> +
drm_connector_list_update(connector);<br>
> <br>
> if
(aconnector->dc_link->aux_mode)<br>
>
drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,<br>
> <br>
</div>
</span></font></div>
</div>
</blockquote>
<br>
</body>
</html>