summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
diff options
context:
space:
mode:
authorLe Ma <le.ma@amd.com>2022-03-18 11:46:04 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-06-09 16:43:56 +0300
commitfeb36dd01403689140a42f906fc75769d3158400 (patch)
tree960c91bb10bc7cb3485e2c37c3b0a11a502adea0 /drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
parent5de6bd6a13f1c717279c870eb8290e466c8f6a80 (diff)
downloadlinux-feb36dd01403689140a42f906fc75769d3158400.tar.xz
drm/amdgpu: convert the doorbell_index to 2 dwords offset for kiq
KIQ doorbell_index is non-zero from XCC1, thus need to left-shift it like other rings. Signed-off-by: Le Ma <le.ma@amd.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
index 682c157f2d8f..49b18cf987aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
@@ -313,14 +313,13 @@ int amdgpu_gfx_kiq_init_ring(struct amdgpu_device *adev,
ring->adev = NULL;
ring->ring_obj = NULL;
ring->use_doorbell = true;
- ring->doorbell_index = adev->doorbell_index.kiq;
ring->xcc_id = xcc_id;
ring->vm_hub = AMDGPU_GFXHUB(xcc_id);
if (xcc_id >= 1)
- ring->doorbell_index = adev->doorbell_index.xcc1_kiq_start +
- xcc_id - 1;
+ ring->doorbell_index = (adev->doorbell_index.xcc1_kiq_start +
+ xcc_id - 1) << 1;
else
- ring->doorbell_index = adev->doorbell_index.kiq;
+ ring->doorbell_index = adev->doorbell_index.kiq << 1;
r = amdgpu_gfx_kiq_acquire(adev, ring, xcc_id);
if (r)