Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 318660
b: refs/heads/master
c: 0a6759c
h: refs/heads/master
v: v3
  • Loading branch information
Daniel Vetter committed Jul 5, 2012
1 parent 9d15a45 commit 740cbb3
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6b2c790a4742a69624e6884b48e5d72f275abd0
refs/heads/master: 0a6759c6bacb3998e3d9a7cf690177051238ad87
13 changes: 11 additions & 2 deletions trunk/drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,18 @@ i915_gem_wait_for_error(struct drm_device *dev)
if (!atomic_read(&dev_priv->mm.wedged))
return 0;

ret = wait_for_completion_interruptible(x);
if (ret)
/*
* Only wait 10 seconds for the gpu reset to complete to avoid hanging
* userspace. If it takes that long something really bad is going on and
* we should simply try to bail out and fail as gracefully as possible.
*/
ret = wait_for_completion_interruptible_timeout(x, 10*HZ);
if (ret == 0) {
DRM_ERROR("Timed out waiting for the gpu reset to complete\n");
return -EIO;
} else if (ret < 0) {
return ret;
}

if (atomic_read(&dev_priv->mm.wedged)) {
/* GPU is hung, bump the completion count to account for
Expand Down

0 comments on commit 740cbb3

Please sign in to comment.