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

drm/amdgpu: skip GFX FED error in page fault handling

Let kfd interrupt handler process it.

v2: return 0 instead of 1 for fed error.
drop the usage of strcmp in interrupt handler.

Signed-off-by: Tao Zhou <tao.zhou1@amd.com>
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Tao Zhou and committed by
Alex Deucher
0c501d3c 71a8d61e

+9 -1
+9 -1
drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
··· 548 548 { 549 549 bool retry_fault = !!(entry->src_data[1] & 0x80); 550 550 bool write_fault = !!(entry->src_data[1] & 0x20); 551 - uint32_t status = 0, cid = 0, rw = 0; 551 + uint32_t status = 0, cid = 0, rw = 0, fed = 0; 552 552 struct amdgpu_task_info *task_info; 553 553 struct amdgpu_vmhub *hub; 554 554 const char *mmhub_cid; ··· 664 664 status = RREG32(hub->vm_l2_pro_fault_status); 665 665 cid = REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, CID); 666 666 rw = REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, RW); 667 + fed = REG_GET_FIELD(status, VM_L2_PROTECTION_FAULT_STATUS, FED); 668 + 669 + /* for gfx fed error, kfd will handle it, return directly */ 670 + if (fed && amdgpu_ras_is_poison_mode_supported(adev) && 671 + (amdgpu_ip_version(adev, GC_HWIP, 0) >= IP_VERSION(9, 4, 2)) && 672 + (vmhub < AMDGPU_MMHUB0_START)) 673 + return 0; 674 + 667 675 WREG32_P(hub->vm_l2_pro_fault_cntl, 1, ~1); 668 676 669 677 amdgpu_vm_update_fault_cache(adev, entry->pasid, addr, status, vmhub);