]> Gentwo Git Trees - linux/.git/commitdiff
drm/amdgpu/gmc8: Delegate VM faults to soft IRQ handler ring
authorTimur Kristóf <timur.kristof@gmail.com>
Wed, 26 Nov 2025 13:29:52 +0000 (14:29 +0100)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Dec 2025 16:02:07 +0000 (11:02 -0500)
On old GPUs, it may be an issue that handling the interrupts from
VM faults is too slow and the interrupt handler (IH) ring may
overflow, which can cause an eventual hang.

Delegate the processing of all VM faults to the soft
IRQ handler ring.

As a result, we spend much less time in the IRQ handler that
interacts with the HW IH ring, which significantly reduces the
chance of hangs/reboots.

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/gmc_v8_0.c

index e1509480dfc23335890614e9e9471e8e868fb796..6551b60f2584764460c4da31bdee579d9e8cb07e 100644 (file)
@@ -1439,6 +1439,12 @@ static int gmc_v8_0_process_interrupt(struct amdgpu_device *adev,
                return 0;
        }
 
+       /* Delegate to the soft IRQ handler ring */
+       if (adev->irq.ih_soft.enabled && entry->ih != &adev->irq.ih_soft) {
+               amdgpu_irq_delegate(adev, entry, 4);
+               return 1;
+       }
+
        addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR);
        status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS);
        mc_client = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_MCCLIENT);