aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-13 05:09:14 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-19 04:17:11 -0400
commite60a0b107b3df072e23cb6d68510aa2615b059ce (patch)
tree2cb350c6d8bd2a67bcb32b26e6d74808a86d042e /drivers/gpu
parent7b5337ddbaf7e4b71ef6fd6307c6f9ef84f636e9 (diff)
drm/i915: Sleep whilst waiting for the ring
If userspace is submitting so many long running batches that the ring becomes full, throttle by sleeping for a 1ms before checking for free space. Simply yielding was causing excessive scheduler overhead whilst making no progress. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index d89b88791aac..89004a622f49 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -707,7 +707,7 @@ int intel_wait_ring_buffer(struct drm_device *dev,
707 master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT; 707 master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
708 } 708 }
709 709
710 yield(); 710 msleep(1);
711 } while (!time_after(jiffies, end)); 711 } while (!time_after(jiffies, end));
712 trace_i915_ring_wait_end (dev); 712 trace_i915_ring_wait_end (dev);
713 return -EBUSY; 713 return -EBUSY;