Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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

+9 -4
+6 -3
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
··· 167 167 } 168 168 169 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 173 if (q->properties.type == KFD_QUEUE_TYPE_SDMA) 173 174 dqm->sdma_queue_count++; ··· 314 313 list_del(&q->list); 315 314 if (list_empty(&qpd->queues_list)) 316 315 deallocate_vmid(dqm, qpd, q); 317 - dqm->queue_count--; 316 + if (q->properties.is_active) 317 + dqm->queue_count--; 318 318 319 319 /* 320 320 * Unconditionally decrement this counter, regardless of the queue's ··· 1020 1018 dqm->sdma_queue_count--; 1021 1019 1022 1020 list_del(&q->list); 1023 - dqm->queue_count--; 1021 + if (q->properties.is_active) 1022 + dqm->queue_count--; 1024 1023 1025 1024 execute_queues_cpsch(dqm, false); 1026 1025
+3 -1
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c
··· 94 94 m->cp_hqd_pipe_priority = 1; 95 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 100 *mqd = m; 98 101 if (gart_addr != NULL) 99 102 *gart_addr = addr; ··· 190 187 m->cp_hqd_vmid = q->vmid; 191 188 192 189 if (q->format == KFD_QUEUE_FORMAT_AQL) { 193 - m->cp_hqd_iq_rptr = AQL_ENABLE; 194 190 m->cp_hqd_pq_control |= NO_UPDATE_RPTR; 195 191 } 196 192