summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
diff options
context:
space:
mode:
authorAlex Deucher2017-03-30 18:34:06 +0200
committerAlex Deucher2017-05-24 23:39:51 +0200
commit3d7e30b381d7d37c572a82a56e54dcfebcc1af0b (patch)
treeeb9dab38191cc8f1953dadc34883630cf0660e3d /drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
parentdrm/amdgpu/gfx8: move SET_RESOURCES into the same command stream (diff)
downloadkernel-qcow2-linux-3d7e30b381d7d37c572a82a56e54dcfebcc1af0b.tar.gz
kernel-qcow2-linux-3d7e30b381d7d37c572a82a56e54dcfebcc1af0b.tar.xz
kernel-qcow2-linux-3d7e30b381d7d37c572a82a56e54dcfebcc1af0b.zip
drm/amdgpu/gfx8: use new KIQ packet defines
Rather than open coding them. Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
index 47c417f2c9db..d3bc30de6d08 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
@@ -4675,11 +4675,13 @@ static int gfx_v8_0_kiq_kcq_enable(struct amdgpu_device *adev)
/* map queues */
amdgpu_ring_write(kiq_ring, PACKET3(PACKET3_MAP_QUEUES, 5));
/* Q_sel:0, vmid:0, vidmem: 1, engine:0, num_Q:1*/
- amdgpu_ring_write(kiq_ring, 0x21010000);
- amdgpu_ring_write(kiq_ring, (ring->doorbell_index << 2) |
- (ring->queue << 26) |
- (ring->pipe << 29) |
- ((ring->me == 1 ? 0 : 1) << 31)); /* doorbell */
+ amdgpu_ring_write(kiq_ring,
+ PACKET3_MAP_QUEUES_NUM_QUEUES(1));
+ amdgpu_ring_write(kiq_ring,
+ PACKET3_MAP_QUEUES_DOORBELL_OFFSET(ring->doorbell_index) |
+ PACKET3_MAP_QUEUES_QUEUE(ring->queue) |
+ PACKET3_MAP_QUEUES_PIPE(ring->pipe) |
+ PACKET3_MAP_QUEUES_ME(ring->me == 1 ? 0 : 1)); /* doorbell */
amdgpu_ring_write(kiq_ring, lower_32_bits(mqd_addr));
amdgpu_ring_write(kiq_ring, upper_32_bits(mqd_addr));
amdgpu_ring_write(kiq_ring, lower_32_bits(wptr_addr));