summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
diff options
context:
space:
mode:
authorFelix Kuehling <Felix.Kuehling@amd.com>2017-09-27 00:09:54 -0400
committerOded Gabbay <oded.gabbay@gmail.com>2017-09-27 00:09:54 -0400
commitbc920fd4f4350a2e3094c165a77798d721f39e7b (patch)
treeeacd4bf02a22b52cff8dded993c99ee399dc962a /drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
parente6f791b1b068b168c6f5203f29040b972d7fbc20 (diff)
downloadblackbird-op-linux-bc920fd4f4350a2e3094c165a77798d721f39e7b.tar.gz
blackbird-op-linux-bc920fd4f4350a2e3094c165a77798d721f39e7b.zip
drm/amdkfd: Clean up process queue management
Removed unused num_concurrent_processes. Implemented counting of queues in QPD. This makes counting the queue list repeatedly in several places unnecessary. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.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.c9
1 files changed, 2 insertions, 7 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 63c569b62cee..88ad178bffb6 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c
@@ -149,8 +149,6 @@ int pqm_create_queue(struct process_queue_manager *pqm,
struct queue *q;
struct process_queue_node *pqn;
struct kernel_queue *kq;
- int num_queues = 0;
- struct queue *cur;
enum kfd_queue_type type = properties->type;
q = NULL;
@@ -168,11 +166,8 @@ int pqm_create_queue(struct process_queue_manager *pqm,
* If we are just about to create DIQ, the is_debug flag is not set yet
* Hence we also check the type as well
*/
- if ((pdd->qpd.is_debug) ||
- (type == KFD_QUEUE_TYPE_DIQ)) {
- list_for_each_entry(cur, &pdd->qpd.queues_list, list)
- num_queues++;
- if (num_queues >= dev->device_info->max_no_of_hqd/2)
+ if ((pdd->qpd.is_debug) || (type == KFD_QUEUE_TYPE_DIQ)) {
+ if (pdd->qpd.queue_count >= dev->device_info->max_no_of_hqd/2)
return -ENOSPC;
}
OpenPOWER on IntegriCloud