Skip to content

Commit

Permalink
drm/amdkfd: Remove queue node when destroy queue failed
Browse files Browse the repository at this point in the history
HWS may hang in the middle of destroy queue, remove the queue from the
process queue list so it won't be freed again in the future

Signed-off-by: Shaoyun Liu <Shaoyun.Liu@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
  • Loading branch information
Shaoyun Liu authored and Oded Gabbay committed May 1, 2018
1 parent bfdcbfd commit 2533f07
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ int pqm_create_queue(struct process_queue_manager *pqm,
}

if (retval != 0) {
pr_err("DQM create queue failed\n");
pr_err("Pasid %d DQM create queue %d failed. ret %d\n",
pqm->process->pasid, type, retval);
goto err_create_queue;
}

Expand Down Expand Up @@ -319,8 +320,11 @@ int pqm_destroy_queue(struct process_queue_manager *pqm, unsigned int qid)
dqm = pqn->q->device->dqm;
retval = dqm->ops.destroy_queue(dqm, &pdd->qpd, pqn->q);
if (retval) {
pr_debug("Destroy queue failed, returned %d\n", retval);
goto err_destroy_queue;
pr_err("Pasid %d destroy queue %d failed, ret %d\n",
pqm->process->pasid,
pqn->q->properties.queue_id, retval);
if (retval != -ETIME)
goto err_destroy_queue;
}
uninit_queue(pqn->q);
}
Expand Down

0 comments on commit 2533f07

Please sign in to comment.