]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915: Only emit a flush if there is an outstanding gpu write
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Dec 2010 14:36:02 +0000 (14:36 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 6 Dec 2010 14:36:02 +0000 (14:36 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/i915_gem.c

index 8685b92790290139f87eb7c6fbf772c7c535d3d7..e7733333767d4383af06d1ca4c9c718c2aeb456b 100644 (file)
@@ -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);