mirror of https://gitee.com/openkylin/linux.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 <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:
parent
a0356fc373
commit
3ae5378330
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue