]> Gentwo Git Trees - linux/.git/commitdiff
drm/amdgpu/tonga_ih: Enable soft IRQ handler ring
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 26 Nov 2025 13:29:46 +0000 (14:29 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Dec 2025 16:02:06 +0000 (11:02 -0500)
We are going to use the soft IRQ handler ring on GMC v8
to process interrupts from VM faults.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/tonga_ih.c

index 7d17ae56f901974e07a84f3f6534686a7c3b7680..ee8038df17e3be2a031000e0729054f8da6f94e0 100644 (file)
@@ -159,6 +159,9 @@ static int tonga_ih_irq_init(struct amdgpu_device *adev)
        /* enable interrupts */
        tonga_ih_enable_interrupts(adev);
 
+       if (adev->irq.ih_soft.ring_size)
+               adev->irq.ih_soft.enabled = true;
+
        return 0;
 }
 
@@ -196,6 +199,9 @@ static u32 tonga_ih_get_wptr(struct amdgpu_device *adev,
 
        wptr = le32_to_cpu(*ih->wptr_cpu);
 
+       if (ih == &adev->irq.ih_soft)
+               goto out;
+
        if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
                goto out;
 
@@ -306,6 +312,10 @@ static int tonga_ih_sw_init(struct amdgpu_ip_block *ip_block)
        if (r)
                return r;
 
+       r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE, true);
+       if (r)
+               return r;
+
        adev->irq.ih.use_doorbell = true;
        adev->irq.ih.doorbell_index = adev->doorbell_index.ih;