aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/cik_ih.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/cik_ih.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/cik_ih.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/cik_ih.c b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
index 07d3d895da10..a870b354e3f7 100644
--- a/drivers/gpu/drm/amd/amdgpu/cik_ih.c
+++ b/drivers/gpu/drm/amd/amdgpu/cik_ih.c
@@ -237,8 +237,23 @@ static u32 cik_ih_get_wptr(struct amdgpu_device *adev)
237 */ 237 */
238static bool cik_ih_prescreen_iv(struct amdgpu_device *adev) 238static bool cik_ih_prescreen_iv(struct amdgpu_device *adev)
239{ 239{
240 /* Process all interrupts */ 240 u32 ring_index = adev->irq.ih.rptr >> 2;
241 return true; 241 u16 pasid;
242
243 switch (le32_to_cpu(adev->irq.ih.ring[ring_index]) & 0xff) {
244 case 146:
245 case 147:
246 pasid = le32_to_cpu(adev->irq.ih.ring[ring_index + 2]) >> 16;
247 if (!pasid || amdgpu_vm_pasid_fault_credit(adev, pasid))
248 return true;
249 break;
250 default:
251 /* Not a VM fault */
252 return true;
253 }
254
255 adev->irq.ih.rptr += 16;
256 return false;
242} 257}
243 258
244 /** 259 /**