Skip to content

Commit 488d9e7

Browse files
Timur Kristófalexdeucher
authored andcommitted
drm/amdgpu/cz_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 f808585 commit 488d9e7

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ static int cz_ih_irq_init(struct amdgpu_device *adev)
157157
/* enable interrupts */
158158
cz_ih_enable_interrupts(adev);
159159

160+
if (adev->irq.ih_soft.ring_size)
161+
adev->irq.ih_soft.enabled = true;
162+
160163
return 0;
161164
}
162165

@@ -194,6 +197,9 @@ static u32 cz_ih_get_wptr(struct amdgpu_device *adev,
194197

195198
wptr = le32_to_cpu(*ih->wptr_cpu);
196199

200+
if (ih == &adev->irq.ih_soft)
201+
goto out;
202+
197203
if (!REG_GET_FIELD(wptr, IH_RB_WPTR, RB_OVERFLOW))
198204
goto out;
199205

@@ -297,6 +303,10 @@ static int cz_ih_sw_init(struct amdgpu_ip_block *ip_block)
297303
if (r)
298304
return r;
299305

306+
r = amdgpu_ih_ring_init(adev, &adev->irq.ih_soft, IH_SW_RING_SIZE, true);
307+
if (r)
308+
return r;
309+
300310
r = amdgpu_irq_init(adev);
301311

302312
return r;

0 commit comments

Comments
 (0)