aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorBen Gamari <bgamari.foss@gmail.com>2009-09-14 17:48:41 -0400
committerJesse Barnes <jbarnes@virtuousgeek.org>2009-09-17 17:33:52 -0400
commitffed1d0920d180962469feb5e14bab7af2e29137 (patch)
tree71cd35575969ed5e288fd9069afad79defc27059 /drivers
parent078a033f45471c44befd72ccacf3f31d75299dba (diff)
drm/i915: Check whether chip is wedged in i915_wait_request()
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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index e0da98602eed..910051321104 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -1751,6 +1751,9 @@ i915_wait_request(struct drm_device *dev, uint32_t seqno)
1751 1751
1752 BUG_ON(seqno == 0); 1752 BUG_ON(seqno == 0);
1753 1753
1754 if (dev_priv->mm.wedged)
1755 return -EIO;
1756
1754 if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) { 1757 if (!i915_seqno_passed(i915_get_gem_seqno(dev), seqno)) {
1755 if (IS_IGDNG(dev)) 1758 if (IS_IGDNG(dev))
1756 ier = I915_READ(DEIER) | I915_READ(GTIER); 1759 ier = I915_READ(DEIER) | I915_READ(GTIER);