diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-06 09:36:02 -0500 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-12-06 09:36:02 -0500 |
commit | 0ac74c6b3386f0413baf48f6d61850650e0dc4ab (patch) | |
tree | cef6462fb5fffb8c99ad22bc076130eaaca777dd /drivers/gpu/drm/i915/i915_gem.c | |
parent | 6bda10d152735c22baf1dcd92937420b4b0a359a (diff) |
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, | |||
2154 | if (list_empty(&ring->gpu_write_list) && list_empty(&ring->active_list)) | 2154 | if (list_empty(&ring->gpu_write_list) && list_empty(&ring->active_list)) |
2155 | return 0; | 2155 | return 0; |
2156 | 2156 | ||
2157 | i915_gem_flush_ring(dev, ring, | 2157 | if (!list_empty(&ring->gpu_write_list)) |
2158 | I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); | 2158 | i915_gem_flush_ring(dev, ring, |
2159 | I915_GEM_GPU_DOMAINS, I915_GEM_GPU_DOMAINS); | ||
2159 | return i915_wait_request(dev, | 2160 | return i915_wait_request(dev, |
2160 | i915_gem_next_request_seqno(dev, ring), | 2161 | i915_gem_next_request_seqno(dev, ring), |
2161 | ring); | 2162 | ring); |