Skip to content

Commit

Permalink
drm/i915: don't use gtt_pwrite on LLC cached objects
Browse files Browse the repository at this point in the history
~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>
  • Loading branch information
Daniel Vetter committed Mar 27, 2012
1 parent a0356fc commit 3ae5378
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit 3ae5378

Please sign in to comment.