Skip to content

Commit 6a5d487

Browse files
jlgreathousealexdeucher
authored andcommitted
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 <[email protected]> Acked-by: Alex Deucher <[email protected]> Reviewed-by: Felix Kuehling <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 8889143 commit 6a5d487

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ void pqm_uninit(struct process_queue_manager *pqm)
150150
struct process_queue_node *pqn, *next;
151151

152152
list_for_each_entry_safe(pqn, next, &pqm->queues, process_queue_list) {
153+
if (pqn->q && pqn->q->gws)
154+
amdgpu_amdkfd_remove_gws_from_process(pqm->process->kgd_process_info,
155+
pqn->q->gws);
153156
uninit_queue(pqn->q);
154157
list_del(&pqn->process_queue_list);
155158
kfree(pqn);

0 commit comments

Comments
 (0)