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 21:49:23 +0000 (16:49 -0500)
commitd581ceab26a1be9fe94befe2604cbe99eadf1acc
tree83d3293e17e4b60e7adf845dc238226ed2c56cd0
parentca0ad76089a8171d7a075e50b7beecf092f8fd0c
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