diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-03-25 13:47:38 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-03-27 07:29:08 -0400 |
commit | ffc62976d215870e3082d9778660167c5fa3946d (patch) | |
tree | 1d869f03e99475124733303b506ce53fbd01b25f /drivers/gpu/drm/i915/i915_gem.c | |
parent | 586428852a4fe64d77dc3e34c446fba33a2ca971 (diff) |
drm/i915: fall back to shmem pwrite when the buffer is not accessible
It's too expensive to move it around just for that pwrite, especially
when we're trashing on the mappable gtt part like crazy.
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>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 83dfb4407c8f..7f33e6af6ecb 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c | |||
@@ -771,6 +771,7 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void *data, | |||
771 | 771 | ||
772 | if (obj->gtt_space && | 772 | if (obj->gtt_space && |
773 | obj->cache_level == I915_CACHE_NONE && | 773 | obj->cache_level == I915_CACHE_NONE && |
774 | obj->map_and_fenceable && | ||
774 | obj->base.write_domain != I915_GEM_DOMAIN_CPU) { | 775 | obj->base.write_domain != I915_GEM_DOMAIN_CPU) { |
775 | ret = i915_gem_gtt_pwrite_fast(dev, obj, args, file); | 776 | ret = i915_gem_gtt_pwrite_fast(dev, obj, args, file); |
776 | /* Note that the gtt paths might fail with non-page-backed user | 777 | /* Note that the gtt paths might fail with non-page-backed user |