diff options
author | Joseph Greathouse <Joseph.Greathouse@amd.com> | 2019-07-17 17:47:58 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2019-07-17 21:34:31 +0300 |
commit | 6a5d4877544b9014c70533200ad4a5f9d6e005c5 (patch) | |
tree | 370cf63beb9defc6b5331d2907e92301b5006d32 /drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | |
parent | 88891430a2c06b6be9b1ed08c095befb17fb4cb2 (diff) | |
download | linux-6a5d4877544b9014c70533200ad4a5f9d6e005c5.tar.xz |
drm/amdkfd: Remove GWS from process during uninit
If we shut down a process without having destroyed its GWS-using
queues, it is possible that GWS BO will still be in the process
BO list during the gpuvm destruction. This list should be empty
at that time, so we should remove the GWS allocation at the
process uninit point if it is still around.
Signed-off-by: Joseph Greathouse <Joseph.Greathouse@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); |