<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Calibri;font-size:10pt;color:#008000;margin:5pt;font-style:normal;font-weight:normal;text-decoration:none;" align="Left">
[Public]<br>
</p>
<br>
<div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Reviewed-by: Alex Deucher <alexander.deucher@amd.com></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> amd-gfx <amd-gfx-bounces@lists.freedesktop.org> on behalf of Kent Russell <kent.russell@amd.com><br>
<b>Sent:</b> Monday, December 23, 2024 9:29 AM<br>
<b>To:</b> amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Jiang Liu <gerry@linux.alibaba.com>; Russell, Kent <Kent.Russell@amd.com><br>
<b>Subject:</b> [PATCH] amdgpu: tear down ttm range manager for doorbell in amdgpu_ttm_fini()</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">From: Jiang Liu <gerry@linux.alibaba.com><br>
<br>
Tear down ttm range manager for doorbell in function amdgpu_ttm_fini(),<br>
to avoid memory leakage.<br>
<br>
Signed-off-by: Jiang Liu <gerry@linux.alibaba.com><br>
Signed-off-by: Kent Russell <kent.russell@amd.com><br>
---<br>
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 1 +<br>
 1 file changed, 1 insertion(+)<br>
<br>
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
index 9ff6cfacfd34..e6fc89440210 100644<br>
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c<br>
@@ -2066,6 +2066,7 @@ void amdgpu_ttm_fini(struct amdgpu_device *adev)<br>
         ttm_range_man_fini(&adev->mman.bdev, AMDGPU_PL_GDS);<br>
         ttm_range_man_fini(&adev->mman.bdev, AMDGPU_PL_GWS);<br>
         ttm_range_man_fini(&adev->mman.bdev, AMDGPU_PL_OA);<br>
+       ttm_range_man_fini(&adev->mman.bdev, AMDGPU_PL_DOORBELL);<br>
         ttm_device_fini(&adev->mman.bdev);<br>
         adev->mman.initialized = false;<br>
         DRM_INFO("amdgpu: ttm finalized\n");<br>
-- <br>
2.43.0<br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>