drm/amdkfd: allow unregister process with queues
authorOded Gabbay <oded.gabbay@gmail.com>
Tue, 14 Apr 2015 11:13:18 +0000 (14:13 +0300)
committerOded Gabbay <oded.gabbay@gmail.com>
Thu, 7 May 2015 14:37:41 +0000 (17:37 +0300)
Sometimes we might unregister process that have queues, because we couldn't
preempt the queues. Until now we blocked it with BUG_ON but instead just
print it as debug.

Reviewed-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: stable@vger.kernel.org
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c

index 69af73f153103075f00c9344f836bd7eb3b24668..7b1d5109e9f2311a61a78255ca6a89ebca0a7c1d 100644 (file)
@@ -430,9 +430,10 @@ static int unregister_process_nocpsch(struct device_queue_manager *dqm,
 
        BUG_ON(!dqm || !qpd);
 
-       BUG_ON(!list_empty(&qpd->queues_list));
+       pr_debug("In func %s\n", __func__);
 
-       pr_debug("kfd: In func %s\n", __func__);
+       pr_debug("qpd->queues_list is %s\n",
+                       list_empty(&qpd->queues_list) ? "empty" : "not empty");
 
        retval = 0;
        mutex_lock(&dqm->lock);