diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-06 14:36:02 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-06 14:36:02 +0000 |
commit | 0ac74c6b3386f0413baf48f6d61850650e0dc4ab (patch) | |
tree | cef6462fb5fffb8c99ad22bc076130eaaca777dd /drivers/gpu/drm/i915/i915_gem.c | |
parent | 6bda10d152735c22baf1dcd92937420b4b0a359a (diff) | |
download | lwn-0ac74c6b3386f0413baf48f6d61850650e0dc4ab.tar.gz lwn-0ac74c6b3386f0413baf48f6d61850650e0dc4ab.zip |
drm/i915: Only emit a flush if there is an outstanding gpu write
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 8685b9279029..e7733333767d 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -2154,8 +2154,9 @@ static int i915_ring_idle(struct drm_device *dev, if (list_empty(&ring->gpu_write_list) && list_empty(&ring->active_list)) return 0; - i915_gem_flush_ring(dev, ring, - I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); + if (!list_empty(&ring->gpu_write_list)) + i915_gem_flush_ring(dev, ring, + I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); return i915_wait_request(dev, i915_gem_next_request_seqno(dev, ring), ring); |