mirror of
https://github.com/torvalds/linux.git
synced 2024-12-02 09:01:34 +00:00
Revert "drm/i915: Kill GTT mappings when moving from GTT domain"
This reverts commit 4a684a4117
.
Userland has always been required to set the object's domain to GTT
before using it through a GTT mapping, it's not something that the
kernel is supposed to enforce. (The pagefault support is so that we
can handle multiple mappings without userland having to pin across
them, not so that userland can use GTT after GPU domains without
telling the kernel).
Fixes 19.2% +/- 0.8% (n=6) performance regression in cairo-gl
firefox-talos-gfx on my T420 latop.
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
ec6a890dfe
commit
e92d03bff9
@ -1219,11 +1219,11 @@ int i915_gem_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
ret = i915_gem_object_bind_to_gtt(obj, 0, true);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
ret = i915_gem_object_set_to_gtt_domain(obj, write);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
ret = i915_gem_object_set_to_gtt_domain(obj, write);
|
||||
if (ret)
|
||||
goto unlock;
|
||||
}
|
||||
|
||||
if (obj->tiling_mode == I915_TILING_NONE)
|
||||
ret = i915_gem_object_put_fence(obj);
|
||||
@ -2926,8 +2926,6 @@ i915_gem_object_flush_gtt_write_domain(struct drm_i915_gem_object *obj)
|
||||
*/
|
||||
wmb();
|
||||
|
||||
i915_gem_release_mmap(obj);
|
||||
|
||||
old_write_domain = obj->base.write_domain;
|
||||
obj->base.write_domain = 0;
|
||||
|
||||
|
@ -187,10 +187,6 @@ i915_gem_object_set_to_gpu_domain(struct drm_i915_gem_object *obj,
|
||||
if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_CPU)
|
||||
i915_gem_clflush_object(obj);
|
||||
|
||||
/* blow away mappings if mapped through GTT */
|
||||
if ((flush_domains | invalidate_domains) & I915_GEM_DOMAIN_GTT)
|
||||
i915_gem_release_mmap(obj);
|
||||
|
||||
if (obj->base.pending_write_domain)
|
||||
cd->flips |= atomic_read(&obj->pending_flip);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user