drm/amdkfd: Remove GWS from process during uninit

Submitted by Deucher, Alexander on July 17, 2019, 3:02 p.m.

Details

Message ID BN6PR12MB1809B7289753A4D44644CABDF7C90@BN6PR12MB1809.namprd12.prod.outlook.com
State New
Headers show
Series "drm/amdkfd: Remove GWS from process during uninit" ( rev: 2 ) in AMD X.Org drivers

Not browsing as part of any series.

Commit Message

Deucher, Alexander July 17, 2019, 3:02 p.m.
Acked-by: Alex Deucher <alexander.deucher@amd.com>

Patch hide | download patch | download mbox

diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
index da0958625861..7e6c3ee82f5b 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -150,6 +150,9 @@  void pqm_uninit(struct process_queue_manager *pqm)
         struct process_queue_node *pqn, *next;

         list_for_each_entry_safe(pqn, next, &pqm->queues, process_queue_list) {
+               if (pqn->q && pqn->q->gws)
+                       amdgpu_amdkfd_remove_gws_from_process(pqm->process->kgd_process_info,
+                               pqn->q->gws);
                 uninit_queue(pqn->q);
                 list_del(&pqn->process_queue_list);
                 kfree(pqn);