diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-07 04:18:22 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-11-07 04:18:22 -0500 |
commit | 045e769ab69ce94dedbcdcfd46c2578b385c2986 (patch) | |
tree | efd9e70e491820bc3d8bad2eb03d56bae223ce43 | |
parent | 75e9e9158f38e5cb21eff23b30bafa6f32e0a606 (diff) |
drm/i915: Handle GPU hangs during fault gracefully.
Instead of killing the process, just return no page found and reschedule
the process giving the GPU some time to (hopefully) recover.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 47c665eeaf17..7c91bf2bbdfd 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -1340,11 +1340,12 @@ unlock: | |||
1340 | mutex_unlock(&dev->struct_mutex); | 1340 | mutex_unlock(&dev->struct_mutex); |
1341 | 1341 | ||
1342 | switch (ret) { | 1342 | switch (ret) { |
1343 | case -EAGAIN: | ||
1344 | set_need_resched(); | ||
1343 | case 0: | 1345 | case 0: |
1344 | case -ERESTARTSYS: | 1346 | case -ERESTARTSYS: |
1345 | return VM_FAULT_NOPAGE; | 1347 | return VM_FAULT_NOPAGE; |
1346 | case -ENOMEM: | 1348 | case -ENOMEM: |
1347 | case -EAGAIN: | ||
1348 | return VM_FAULT_OOM; | 1349 | return VM_FAULT_OOM; |
1349 | default: | 1350 | default: |
1350 | return VM_FAULT_SIGBUS; | 1351 | return VM_FAULT_SIGBUS; |