Hi Alex Thanks a lot. I got it. Best Regards Yintian Tao From: Deucher, Alexander Sent: Wednesday, January 03, 2018 10:32 PM To: Tao, Yintian <Yintian.Tao at amd.com>; amd-gfx at lists.freedesktop.org Subject: Re: [PATCH] drm/amd/powerplay: fix memory leakage when reload Did you see my reply yesterday? I reviewed it. I also think we need to fix up cz, rv, and vg10. ________________________________ From: Tao, Yintian Sent: Tuesday, January 2, 2018 9:22:23 PM To: Tao, Yintian; amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org>; Deucher, Alexander Subject: RE: [PATCH] drm/amd/powerplay: fix memory leakage when reload Add Alex -----Original Message----- From: Yintian Tao [mailto:yttao@xxxxxxx] Sent: Monday, January 01, 2018 11:16 AM To: amd-gfx at lists.freedesktop.org<mailto:amd-gfx at lists.freedesktop.org> Cc: Tao, Yintian <Yintian.Tao at amd.com<mailto:Yintian.Tao at amd.com>> Subject: [PATCH] drm/amd/powerplay: fix memory leakage when reload add smu_free_memory when smu fini to prevent memory leakage Change-Id: Id9103d8b54869b63f22a9af53d9fbc3b7a221191 Signed-off-by: Yintian Tao <yttao at amd.com<mailto:yttao at amd.com>> --- drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c index c49a6f2..925217e 100644 --- a/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c +++ b/drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c @@ -607,6 +607,12 @@ int smu7_init(struct pp_smumgr *smumgr) int smu7_smu_fini(struct pp_smumgr *smumgr) { + struct smu7_smumgr *smu_data = (struct smu7_smumgr +*)(smumgr->backend); + + smu_free_memory(smumgr->device, smu_data->header_buffer.handle); + if (!cgs_is_virtualization_enabled(smumgr->device)) + smu_free_memory(smumgr->device, smu_data->smu_buffer.handle); + if (smumgr->backend) { kfree(smumgr->backend); smumgr->backend = NULL; -- 2.7.4 -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.freedesktop.org/archives/amd-gfx/attachments/20180104/7e23f6a1/attachment.html>