summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-12-14 12:17:15 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2010-12-14 12:19:25 +0000
commitb5ba177d8d71f011c23b1cabec99fdaddae65c4d (patch)
treea774159e1d82df03b1e3b2da26bc3bbb815957fc
parent9097eef024db4f1850015e837a84aca0aa40a288 (diff)
downloadlinux-b5ba177d8d71f011c23b1cabec99fdaddae65c4d.tar.bz2
drm/i915: Poll for seqno completion if IRQ is disabled
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=32288 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 726c2ccd674c..5a0fbe59dd5b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2000,7 +2000,6 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno,
trace_i915_gem_request_wait_begin(dev, seqno);
ring->waiting_seqno = seqno;
- ret = -ENODEV;
if (ring->irq_get(ring)) {
if (interruptible)
ret = wait_event_interruptible(ring->irq_queue,
@@ -2012,7 +2011,10 @@ i915_do_wait_request(struct drm_device *dev, uint32_t seqno,
|| atomic_read(&dev_priv->mm.wedged));
ring->irq_put(ring);
- }
+ } else if (wait_for(i915_seqno_passed(ring->get_seqno(ring),
+ seqno) ||
+ atomic_read(&dev_priv->mm.wedged), 3000))
+ ret = -EBUSY;
ring->waiting_seqno = 0;
trace_i915_gem_request_wait_end(dev, seqno);