From: Daniel Vetter Date: Sun, 25 Mar 2012 17:47:33 +0000 (+0200) Subject: drm/i915: don't use gtt_pwrite on LLC cached objects X-Git-Tag: firefly_0821_release~3680^2~2315^2~115^2~64 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=3ae5378330f581466b05bcea2dd3bc8731a598cb;p=firefly-linux-kernel-4.4.55.git drm/i915: don't use gtt_pwrite on LLC cached objects ~120 µs instead fo ~210 µs to write 1mb on my snb. I like this. Tested-by: Chris Wilson Reviewed-by: Chris Wilson Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 34ef339158c1..75e3b841fffb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -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)