Commit b19482d7 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite

As pwrite does not use the fence for its GTT access, and may even go
through a secondary interface avoiding the main VMA, we cannot treat the
write as automatically invalidated by the hardware and so we require
ORIGIN_CPU frontbufer invalidate/flushes.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-4-chris@chris-wilson.co.ukReviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 4b30cb23
...@@ -1082,7 +1082,7 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915, ...@@ -1082,7 +1082,7 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915,
if (ret) if (ret)
goto out_unpin; goto out_unpin;
intel_fb_obj_invalidate(obj, ORIGIN_GTT); intel_fb_obj_invalidate(obj, ORIGIN_CPU);
obj->dirty = true; obj->dirty = true;
user_data = u64_to_user_ptr(args->data_ptr); user_data = u64_to_user_ptr(args->data_ptr);
...@@ -1149,7 +1149,7 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915, ...@@ -1149,7 +1149,7 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915,
} }
} }
intel_fb_obj_flush(obj, false, ORIGIN_GTT); intel_fb_obj_flush(obj, false, ORIGIN_CPU);
out_unpin: out_unpin:
if (node.allocated) { if (node.allocated) {
wmb(); wmb();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment