drm/amdgpu/gfx9: fix compute ring doorbell index
authorAlex Deucher <alexander.deucher@amd.com>
Tue, 13 Jun 2017 02:55:22 +0000 (22:55 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 15 Jun 2017 15:50:28 +0000 (11:50 -0400)
This got lost when the code was revamped.  Copy/paste bug from
gfx8.

Reported-by: Evan Quan <evan.quan@amd.com>
Fixes: 78c168342 (drm/amdgpu: allow split of queues with kfd at queue granularity v4)
Reviewed-by: Junwei Zhang <Jerry.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

index e99df6296611a8f82d9f7053143501368d91a42b..5d5612614ccfc52d7a483b32c3dde57908e2b1ca 100644 (file)
@@ -1281,7 +1281,7 @@ static int gfx_v9_0_compute_ring_init(struct amdgpu_device *adev, int ring_id,
 
        ring->ring_obj = NULL;
        ring->use_doorbell = true;
-       ring->doorbell_index = AMDGPU_DOORBELL_MEC_RING0 + ring_id;
+       ring->doorbell_index = (AMDGPU_DOORBELL_MEC_RING0 + ring_id) << 1;
        ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr
                                + (ring_id * GFX9_MEC_HPD_SIZE);
        sprintf(ring->name, "comp_%d.%d.%d", ring->me, ring->pipe, ring->queue);