]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
drm/i915: don't use gtt_pwrite on LLC cached objects
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Sun, 25 Mar 2012 17:47:33 +0000 (19:47 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 27 Mar 2012 11:25:45 +0000 (13:25 +0200)
~120 µs instead fo ~210 µs to write 1mb on my snb. I like this.

Tested-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_gem.c

index 34ef339158c1a609d5aa50f2fc9a47e9a6aa2578..75e3b841fffbe25d33430b58b7a68a78206b04e2 100644 (file)
@@ -808,6 +808,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data,
        }
 
        if (obj->gtt_space &&
+           obj->cache_level == I915_CACHE_NONE &&
            obj->base.write_domain != I915_GEM_DOMAIN_CPU) {
                ret = i915_gem_object_pin(obj, 0, true);
                if (ret)