drm/amdgpu: assign different AMDGPU_GFXHUB for rings on each xcc
authorLe Ma <le.ma@amd.com>
Mon, 20 Dec 2021 08:06:25 +0000 (16:06 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:40:22 +0000 (09:40 -0400)
Pass the xcc_id to AMDGPU_GFXHUB(x)

Signed-off-by: Le Ma <le.ma@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_4_3.c

index 488b3bb..e5ff0bf 100644 (file)
@@ -315,7 +315,7 @@ int amdgpu_gfx_kiq_init_ring(struct amdgpu_device *adev,
        ring->use_doorbell = true;
        ring->doorbell_index = adev->doorbell_index.kiq;
        ring->xcc_id = xcc_id;
-       ring->vm_hub = AMDGPU_GFXHUB(0);
+       ring->vm_hub = AMDGPU_GFXHUB(xcc_id);
        if (xcc_id >= 1)
                ring->doorbell_index = adev->doorbell_index.xcc1_kiq_start +
                                        xcc_id - 1;
index f5104b9..064cd02 100644 (file)
@@ -757,7 +757,7 @@ static int gfx_v9_4_3_compute_ring_init(struct amdgpu_device *adev, int ring_id,
                                (adev->doorbell_index.mec_ring0 + ring_id) << 1;
        ring->eop_gpu_addr = adev->gfx.mec.hpd_eop_gpu_addr
                                + (ring_id * GFX9_MEC_HPD_SIZE);
-       ring->vm_hub = AMDGPU_GFXHUB(0);
+       ring->vm_hub = AMDGPU_GFXHUB(xcc_id);
        sprintf(ring->name, "comp_%d.%d.%d.%d",
                        ring->xcc_id, ring->me, ring->pipe, ring->queue);