summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2010-10-13 10:09:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-19 09:17:11 +0100
commite60a0b107b3df072e23cb6d68510aa2615b059ce (patch)
tree2cb350c6d8bd2a67bcb32b26e6d74808a86d042e /drivers/gpu
parent7b5337ddbaf7e4b71ef6fd6307c6f9ef84f636e9 (diff)
downloadtalos-op-linux-e60a0b107b3df072e23cb6d68510aa2615b059ce.tar.gz
talos-op-linux-e60a0b107b3df072e23cb6d68510aa2615b059ce.zip
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,
master_priv->sarea_priv->perf_boxes |= I915_BOX_WAIT;
}
- yield();
+ msleep(1);
} while (!time_after(jiffies, end));
trace_i915_ring_wait_end (dev);
return -EBUSY;
OpenPOWER on IntegriCloud