diff options
| author | Jay Cornwall <jay.cornwall@amd.com> | 2015-01-19 12:47:34 -0500 |
|---|---|---|
| committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-01-19 12:47:34 -0500 |
| commit | d752f95e55ed36648fc2bcbca348f5113920c357 (patch) | |
| tree | 15b70eedfca815c542742354c5099e9c760984d7 /drivers/gpu/drm/amd | |
| parent | b6819cec29cc0088e7398db9ed8377ab8328e012 (diff) | |
drm/amdkfd: Preserve CP_MQD_IQ_RPTR internal state
CP microcode uses undocumented bits in this register to record queue
state information. The KFD zeroes these bits in update_mqd, when invoked
through the UPDATE_QUEUE ioctl, causing incoherent state when the ioctl
is used to successively unmap and map a queue.
Since the queue type cannot be changed in this path, move the MQD write
to init_mqd.
Signed-off-by: Jay Cornwall <jay.cornwall@amd.com>
Reviewed-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
| -rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_cik.c | 4 |
1 files changed, 3 insertions, 1 deletions
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 | ||
