In the loop that iterates over the different VCN instances from VCN
4.0.3, the same irq source has been passed for different instances.
This commit addresses the issue by adding the missing index to the array
access for the IRQ.

Signed-off-by: Rodrigo Siqueira <[email protected]>
---
 drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c 
b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
index a63a1e3435ab..018a526a8801 100644
--- a/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
+++ b/drivers/gpu/drm/amd/amdgpu/vcn_v4_0_3.c
@@ -212,7 +212,7 @@ static int vcn_v4_0_3_sw_init(struct amdgpu_ip_block 
*ip_block)
 
                ring->vm_hub = AMDGPU_MMHUB0(adev->vcn.inst[i].aid_id);
                sprintf(ring->name, "vcn_unified_%d", adev->vcn.inst[i].aid_id);
-               r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst->irq, 0,
+               r = amdgpu_ring_init(adev, ring, 512, &adev->vcn.inst[i].irq, 0,
                                     AMDGPU_RING_PRIO_DEFAULT,
                                     &adev->vcn.inst[i].sched_score);
                if (r)
-- 
2.47.2

Reply via email to