diff options
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_process_queue_manager.c | 10 |
1 files changed, 6 insertions, 4 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 88ad178bffb6..5129dc139219 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,7 @@ int pqm_create_queue(struct process_queue_manager *pqm, | |||
| 150 | struct process_queue_node *pqn; | 150 | struct process_queue_node *pqn; |
| 151 | struct kernel_queue *kq; | 151 | struct kernel_queue *kq; |
| 152 | enum kfd_queue_type type = properties->type; | 152 | enum kfd_queue_type type = properties->type; |
| 153 | unsigned int max_queues = 127; /* HWS limit */ | ||
| 153 | 154 | ||
| 154 | q = NULL; | 155 | q = NULL; |
| 155 | kq = NULL; | 156 | kq = NULL; |
| @@ -166,10 +167,11 @@ int pqm_create_queue(struct process_queue_manager *pqm, | |||
| 166 | * If we are just about to create DIQ, the is_debug flag is not set yet | 167 | * If we are just about to create DIQ, the is_debug flag is not set yet |
| 167 | * Hence we also check the type as well | 168 | * Hence we also check the type as well |
| 168 | */ | 169 | */ |
| 169 | if ((pdd->qpd.is_debug) || (type == KFD_QUEUE_TYPE_DIQ)) { | 170 | if ((pdd->qpd.is_debug) || (type == KFD_QUEUE_TYPE_DIQ)) |
| 170 | if (pdd->qpd.queue_count >= dev->device_info->max_no_of_hqd/2) | 171 | max_queues = dev->device_info->max_no_of_hqd/2; |
| 171 | return -ENOSPC; | 172 | |
| 172 | } | 173 | if (pdd->qpd.queue_count >= max_queues) |
| 174 | return -ENOSPC; | ||
| 173 | 175 | ||
| 174 | retval = find_available_queue_slot(pqm, qid); | 176 | retval = find_available_queue_slot(pqm, qid); |
| 175 | if (retval != 0) | 177 | if (retval != 0) |
