Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdgpu/gmc6: Delegate VM faults to soft IRQ handler ring

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>

authored by

Timur Kristóf and committed by
Alex Deucher
4996b4c1 61673efc

+6
+6
drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c
··· 1070 1070 { 1071 1071 u32 addr, status; 1072 1072 1073 + /* Delegate to the soft IRQ handler ring */ 1074 + if (adev->irq.ih_soft.enabled && entry->ih != &adev->irq.ih_soft) { 1075 + amdgpu_irq_delegate(adev, entry, 4); 1076 + return 1; 1077 + } 1078 + 1073 1079 addr = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_ADDR); 1074 1080 status = RREG32(mmVM_CONTEXT1_PROTECTION_FAULT_STATUS); 1075 1081 WREG32_P(mmVM_CONTEXT1_CNTL2, 1, ~1);