Skip to content

Commit f808585

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amdgpu/tonga_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>
1 parent f4fa4c9 commit f808585

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

drivers/gpu/drm/amd/amdgpu/tonga_ih.c

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,9 @@ static int tonga_ih_irq_init(struct amdgpu_device *adev)
159159
/* enable interrupts */
160160
tonga_ih_enable_interrupts(adev);
161161

162+
if (adev->irq.ih_soft.ring_size)
163+
adev->irq.ih_soft.enabled = true;
164+
162165
return 0;
163166
}
164167

@@ -196,6 +199,9 @@ static u32 tonga_ih_get_wptr(struct amdgpu_device *adev,
196199

197200
wptr = le32_to_cpu(*ih->wptr_cpu);
198201

202+
if (ih == &adev->irq.ih_soft)
203+
goto out;
204+
199205
if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
200206
goto out;
201207

@@ -306,6 +312,10 @@ static int tonga_ih_sw_init(struct amdgpu_ip_block *ip_block)
306312
if (r)
307313
return r;
308314

315+
r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE, true);
316+
if (r)
317+
return r;
318+
309319
adev->irq.ih.use_doorbell = true;
310320
adev->irq.ih.doorbell_index = adev->doorbell_index.ih;
311321

0 commit comments

Comments
 (0)