<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body>
<div>Ping for both patches.</div>
<div><br>
</div>
<div>Andrey</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> Andrey Grodzovsky <andrey.grodzovsky@amd.com><br>
<b>Sent:</b> 14 October 2020 13:24<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Kazlauskas, Nicholas <Nicholas.Kazlauskas@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Pan, Xinhui <Xinhui.Pan@amd.com>; Grodzovsky, Andrey <Andrey.Grodzovsky@amd.com><br>
<b>Subject:</b> [PATCH 2/2] drm/amd/display: Avoid MST manager resource leak.</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On connector destruction call drm_dp_mst_topology_mgr_destroy<br>
to release resources allocated in drm_dp_mst_topology_mgr_init.<br>
Do it only if MST manager was initialized before otherwsie a crash<br>
is seen on driver unload/device unplug.<br>
<br>
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com><br>
---<br>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 +++++++<br>
1 file changed, 7 insertions(+)<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 a72447d..64799c4 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>
@@ -5170,6 +5170,13 @@ static void amdgpu_dm_connector_destroy(struct drm_connector *connector)<br>
struct amdgpu_device *adev = drm_to_adev(connector->dev);<br>
struct amdgpu_display_manager *dm = &adev->dm;<br>
<br>
+ /*<br>
+ * Call only if mst_mgr was initialized before since it's not done<br>
+ * for all connector types.<br>
+ */<br>
+ if (aconnector->mst_mgr.dev)<br>
+ drm_dp_mst_topology_mgr_destroy(&aconnector->mst_mgr);<br>
+<br>
#if defined(CONFIG_BACKLIGHT_CLASS_DEVICE) ||\<br>
defined(CONFIG_BACKLIGHT_CLASS_DEVICE_MODULE)<br>
<br>
-- <br>
2.7.4<br>
<br>
</div>
</span></font></div>
</body>
</html>