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 <chris@chris-wilson.co.uk>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2012-03-25 19:47:33 +02:00
parent a0356fc373
commit 3ae5378330
1 changed files with 1 additions and 0 deletions

View File

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