diff options
author | Dave Airlie <airlied@redhat.com> | 2015-02-04 19:40:10 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2015-02-04 19:40:10 -0500 |
commit | 2f8997902e64951228385ca1cebb0d2f16f99a23 (patch) | |
tree | de702f568b47e64b80422bf2c54736243cb41a3e /drivers/gpu | |
parent | 225963dd3eb71357b086bc091a5594d0fa2ac783 (diff) | |
parent | d752f95e55ed36648fc2bcbca348f5113920c357 (diff) |
Merge tag 'drm-amdkfd-next-fixes-2015-02-03' of git://people.freedesktop.org/~gabbayo/linux into drm-next
- Fixing accounting of active queues
- Preserving a register internal state
* tag 'drm-amdkfd-next-fixes-2015-02-03' of git://people.freedesktop.org/~gabbayo/linux:
drm/amdkfd: Preserve CP_MQD_IQ_RPTR internal state
drm/amdkfd: Fix dqm->queue_count tracking
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 9 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 |
2 files changed, 9 insertions, 4 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 | ||
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c index a318743cdcc2..a09e18a339f3 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | |||
@@ -94,6 +94,9 @@ static int init_mqd(struct mqd_manager *mm, void **mqd, | |||
94 | m->cp_hqd_pipe_priority = 1; | 94 | m->cp_hqd_pipe_priority = 1; |
95 | m->cp_hqd_queue_priority = 15; | 95 | m->cp_hqd_queue_priority = 15; |
96 | 96 | ||
97 | if (q->format == KFD_QUEUE_FORMAT_AQL) | ||
98 | m->cp_hqd_iq_rptr = AQL_ENABLE; | ||
99 | |||
97 | *mqd = m; | 100 | *mqd = m; |
98 | if (gart_addr != NULL) | 101 | if (gart_addr != NULL) |
99 | *gart_addr = addr; | 102 | *gart_addr = addr; |
@@ -187,7 +190,6 @@ static int update_mqd(struct mqd_manager *mm, void *mqd, | |||
187 | m->cp_hqd_vmid = q->vmid; | 190 | m->cp_hqd_vmid = q->vmid; |
188 | 191 | ||
189 | if (q->format == KFD_QUEUE_FORMAT_AQL) { | 192 | if (q->format == KFD_QUEUE_FORMAT_AQL) { |
190 | m->cp_hqd_iq_rptr = AQL_ENABLE; | ||
191 | m->cp_hqd_pq_control |= NO_UPDATE_RPTR; | 193 | m->cp_hqd_pq_control |= NO_UPDATE_RPTR; |
192 | } | 194 | } |
193 | 195 | ||