diff options
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index ecc78ece634c..36b95e16eab1 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | |||
| @@ -167,7 +167,8 @@ static int create_queue_nocpsch(struct device_queue_manager *dqm, | |||
| 167 | } | 167 | } |
| 168 | 168 | ||
| 169 | list_add(&q->list, &qpd->queues_list); | 169 | list_add(&q->list, &qpd->queues_list); |
| 170 | dqm->queue_count++; | 170 | if (q->properties.is_active) |
| 171 | dqm->queue_count++; | ||
| 171 | 172 | ||
| 172 | if (q->properties.type == KFD_QUEUE_TYPE_SDMA) | 173 | if (q->properties.type == KFD_QUEUE_TYPE_SDMA) |
| 173 | dqm->sdma_queue_count++; | 174 | dqm->sdma_queue_count++; |
| @@ -313,7 +314,8 @@ static int destroy_queue_nocpsch(struct device_queue_manager *dqm, | |||
| 313 | list_del(&q->list); | 314 | list_del(&q->list); |
| 314 | if (list_empty(&qpd->queues_list)) | 315 | if (list_empty(&qpd->queues_list)) |
| 315 | deallocate_vmid(dqm, qpd, q); | 316 | deallocate_vmid(dqm, qpd, q); |
| 316 | dqm->queue_count--; | 317 | if (q->properties.is_active) |
| 318 | dqm->queue_count--; | ||
| 317 | 319 | ||
| 318 | /* | 320 | /* |
| 319 | * Unconditionally decrement this counter, regardless of the queue's | 321 | * Unconditionally decrement this counter, regardless of the queue's |
| @@ -1018,7 +1020,8 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm, | |||
| 1018 | dqm->sdma_queue_count--; | 1020 | dqm->sdma_queue_count--; |
| 1019 | 1021 | ||
| 1020 | list_del(&q->list); | 1022 | list_del(&q->list); |
| 1021 | dqm->queue_count--; | 1023 | if (q->properties.is_active) |
| 1024 | dqm->queue_count--; | ||
| 1022 | 1025 | ||
| 1023 | execute_queues_cpsch(dqm, false); | 1026 | execute_queues_cpsch(dqm, false); |
| 1024 | 1027 | ||
