summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-29 21:06:16 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-29 21:06:16 +0100
commitf4e0b29bf23687ac16dc476bd90cd4d8b0eacd5c (patch)
treec3edcd8ef447c323fbec6ad774ab02c70012f00c /drivers/gpu/drm/i915
parent6dda569fe0fb71a03e2a2e815761796f98232cdb (diff)
downloadblackbird-op-linux-f4e0b29bf23687ac16dc476bd90cd4d8b0eacd5c.tar.gz
blackbird-op-linux-f4e0b29bf23687ac16dc476bd90cd4d8b0eacd5c.zip
drm/i915: Check if the GPU hung whilst waiting for the ring to clear
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 4d00da97905f..2e72d3a0740f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -711,6 +711,8 @@ int intel_wait_ring_buffer(struct intel_ring_buffer *ring, int n)
}
msleep(1);
+ if (atomic_read(&dev_priv->mm.wedged))
+ return -EAGAIN;
} while (!time_after(jiffies, end));
trace_i915_ring_wait_end (dev);
return -EBUSY;
OpenPOWER on IntegriCloud