summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2015-02-05 01:40:10 +0100
committerDave Airlie <airlied@redhat.com>2015-02-05 01:40:10 +0100
commit2f8997902e64951228385ca1cebb0d2f16f99a23 (patch)
treede702f568b47e64b80422bf2c54736243cb41a3e
parentMerge branch 'drm-intel-next' of git://anongit.freedesktop.org/drm-intel into... (diff)
parentdrm/amdkfd: Preserve CP_MQD_IQ_RPTR internal state (diff)
downloadlinux-2f8997902e64951228385ca1cebb0d2f16f99a23.tar.xz
linux-2f8997902e64951228385ca1cebb0d2f16f99a23.zip
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
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c9
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c4
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,
}
list_add(&q->list, &qpd->queues_list);
- dqm->queue_count++;
+ if (q->properties.is_active)
+ dqm->queue_count++;
if (q->properties.type == KFD_QUEUE_TYPE_SDMA)
dqm->sdma_queue_count++;
@@ -313,7 +314,8 @@ static int destroy_queue_nocpsch(struct device_queue_manager *dqm,
list_del(&q->list);
if (list_empty(&qpd->queues_list))
deallocate_vmid(dqm, qpd, q);
- dqm->queue_count--;
+ if (q->properties.is_active)
+ dqm->queue_count--;
/*
* Unconditionally decrement this counter, regardless of the queue's
@@ -1018,7 +1020,8 @@ static int destroy_queue_cpsch(struct device_queue_manager *dqm,
dqm->sdma_queue_count--;
list_del(&q->list);
- dqm->queue_count--;
+ if (q->properties.is_active)
+ dqm->queue_count--;
execute_queues_cpsch(dqm, false);
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,
m->cp_hqd_pipe_priority = 1;
m->cp_hqd_queue_priority = 15;
+ if (q->format == KFD_QUEUE_FORMAT_AQL)
+ m->cp_hqd_iq_rptr = AQL_ENABLE;
+
*mqd = m;
if (gart_addr != NULL)
*gart_addr = addr;
@@ -187,7 +190,6 @@ static int update_mqd(struct mqd_manager *mm, void *mqd,
m->cp_hqd_vmid = q->vmid;
if (q->format == KFD_QUEUE_FORMAT_AQL) {
- m->cp_hqd_iq_rptr = AQL_ENABLE;
m->cp_hqd_pq_control |= NO_UPDATE_RPTR;
}