drm/amdkfd: Free gang_ctx_bo and wptr_bo in pqm_uninit
authorZhenGuo Yin <zhenguo.yin@amd.com>
Mon, 6 Nov 2023 10:07:51 +0000 (18:07 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Jan 2024 10:51:38 +0000 (11:51 +0100)
commitccba042816400a82ed5d3d2f7b4ed79403d20c4c
tree19dafc2fa39448e407dc1473a27574bd4092c540
parent61dfdb779048332546358ac1847f0bbb07367162
drm/amdkfd: Free gang_ctx_bo and wptr_bo in pqm_uninit

[ Upstream commit 72838777aa38352e20301e123b97110c456cd38e ]

[Why]
Memory leaks of gang_ctx_bo and wptr_bo.

[How]
Free gang_ctx_bo and wptr_bo in pqm_uninit.

v2: add a common function pqm_clean_queue_resource to
free queue's resources.
v3: reset pdd->pqd.num_gws when destorying GWS queue.

Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: ZhenGuo Yin <zhenguo.yin@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c