]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c
drm/amdgpu: add graceful VM fault handling v3
[linux.git] / drivers / gpu / drm / amd / amdgpu / gmc_v9_0.c
index a991a6c4f468d770a325fa3f04867d3eb09a5166..6102deaa03cafef346a5dada69ec5ae29e9885cb 100644 (file)
@@ -380,6 +380,10 @@ static int gmc_v9_0_process_interrupt(struct amdgpu_device *adev,
        }
 
        /* If it's the first fault for this address, process it normally */
+       if (retry_fault && !in_interrupt() &&
+           amdgpu_vm_handle_fault(adev, entry->pasid, addr))
+               return 1; /* This also prevents sending it to KFD */
+
        if (!amdgpu_sriov_vf(adev)) {
                /*
                 * Issue a dummy read to wait for the status register to