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)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 29 Nov 2023 23:12:29 +0000 (18:12 -0500)
commit72838777aa38352e20301e123b97110c456cd38e
tree0c6408213a895cf9b20287bba4c39286dcc1c13f
parente0409021e34af50e7b6f31635c8d21583d7c43dd
drm/amdkfd: Free gang_ctx_bo and wptr_bo in pqm_uninit

[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>
drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c