aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-04 16:18:42 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2012-07-05 04:03:01 -0400
commita9340ccab547f24e3b398b7e3ebd792827ff1be1 (patch)
treeca57f731d43727d243ffcc45e468055c92ffac8d /drivers/gpu/drm/i915/i915_gem.c
parent0a6759c6bacb3998e3d9a7cf690177051238ad87 (diff)
drm/i915: properly SIGBUS on I/O errors
... instead of looping endless with no hope of ever serving that page-fault. We only need to break out of this loop when the gpu died, to run the reset work (and hopefully resurrect it). To clarify questions Chris raised on irc: This is about handling I/O errors not from our own code, but e.g. when the disk died when trying to swap in a gem bo. So this patch remidies the issue that the current handling only handles gpu-death-induced cases of -EIO. Admittedly, dying disks are much rarer than hanging gpus ...To clarify questions Chris raised on irc: This is about handling I/O errors not from our own code, but e.g. when the disk died when trying to swap in a gem bo. So this patch remidies the issue that the current handling only handles gpu-death-induced cases of -EIO. Admittedly, dying disks are much rarer than hanging gpus ... This seems to have been lost in: commit d9bc7e9f32716901c617e1f0fb6ce0f74f172686 Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Mon Feb 7 13:09:31 2011 +0000 drm/i915: Fix infinite loop regression from 21dd3734 Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 7d285554333f..2b54142a46ed 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1141,6 +1141,11 @@ unlock:
1141out: 1141out:
1142 switch (ret) { 1142 switch (ret) {
1143 case -EIO: 1143 case -EIO:
1144 /* If this -EIO is due to a gpu hang, give the reset code a
1145 * chance to clean up the mess. Otherwise return the proper
1146 * SIGBUS. */
1147 if (!atomic_read(&dev_priv->mm.wedged))
1148 return VM_FAULT_SIGBUS;
1144 case -EAGAIN: 1149 case -EAGAIN:
1145 /* Give the error handler a chance to run and move the 1150 /* Give the error handler a chance to run and move the
1146 * objects off the GPU active list. Next time we service the 1151 * objects off the GPU active list. Next time we service the