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

drm/amdgpu/iceland_ih: Enable soft IRQ handler ring

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>

authored by

Timur Kristóf and committed by
Alex Deucher
f4fa4c9e 45bef899

+10
+10
drivers/gpu/drm/amd/amdgpu/iceland_ih.c
··· 157 157 /* enable interrupts */ 158 158 iceland_ih_enable_interrupts(adev); 159 159 160 + if (adev->irq.ih_soft.ring_size) 161 + adev->irq.ih_soft.enabled = true; 162 + 160 163 return 0; 161 164 } 162 165 ··· 196 193 u32 wptr, tmp; 197 194 198 195 wptr = le32_to_cpu(*ih->wptr_cpu); 196 + 197 + if (ih == &adev->irq.ih_soft) 198 + goto out; 199 199 200 200 if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW)) 201 201 goto out; ··· 299 293 struct amdgpu_device *adev = ip_block->adev; 300 294 301 295 r = amdgpu_ih_ring_init(adev, &adev->irq.ih, 64 * 1024, false); 296 + if (r) 297 + return r; 298 + 299 + r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE, true); 302 300 if (r) 303 301 return r; 304 302