Skip to content

Commit

Permalink
drm/i915: Check whether chip is wedged in i915_wait_request()
Browse files Browse the repository at this point in the history
i915_wait_request() only checks mm.wedged after it interacts with the
hardware, generally causing the driver to lock up waiting for a wedged
chip. Make sure we check mm.wedged as the first thing we do.

Reported-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ben Gamari <bgamari.foss@gmail.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Ben Gamari authored and Jesse Barnes committed Sep 17, 2009
1 parent 078a033 commit ffed1d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1751,6 +1751,9 @@ i915_wait_request(struct drm_device *dev, uint32_t seqno)

BUG_ON(seqno == 0);

if (dev_priv->mm.wedged)
return -EIO;

if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) {
if (IS_IGDNG(dev))
ier = I915_READ(DEIER) | I915_READ(GTIER);
Expand Down

0 comments on commit ffed1d0

Please sign in to comment.