]> Git Repo - linux.git/commitdiff
drm/amdgpu: convert the doorbell_index to 2 dwords offset for kiq
authorLe Ma <[email protected]>
Fri, 18 Mar 2022 08:46:04 +0000 (16:46 +0800)
committerAlex Deucher <[email protected]>
Fri, 9 Jun 2023 13:43:56 +0000 (09:43 -0400)
KIQ doorbell_index is non-zero from XCC1, thus need to left-shift it like
other rings.

Signed-off-by: Le Ma <[email protected]>
Acked-by: Felix Kuehling <[email protected]>
Reviewed-by: Lijo Lazar <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c

index 682c157f2d8f96398b3b4308de02659ce84f3a14..49b18cf987aa38154e1b65ffe1f7000e1235ad38 100644 (file)
@@ -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)
This page took 0.06208 seconds and 4 git commands to generate.