Skip to content

Commit

Permalink
drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite
Browse files Browse the repository at this point in the history
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: Chris Wilson <chris@chris-wilson.co.uk>
Link: http://patchwork.freedesktop.org/patch/msgid/20160818161718.27187-4-chris@chris-wilson.co.uk
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
  • Loading branch information
Chris Wilson committed Aug 18, 2016
1 parent 4b30cb2 commit b19482d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -1082,7 +1082,7 @@ i915_gem_gtt_pwrite_fast(struct drm_i915_private *i915,
if (ret)
goto out_unpin;

intel_fb_obj_invalidate(obj, ORIGIN_GTT);
intel_fb_obj_invalidate(obj, ORIGIN_CPU);
obj->dirty = true;

user_data = u64_to_user_ptr(args->data_ptr);
Expand Down Expand Up @@ -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:
if (node.allocated) {
wmb();
Expand Down

0 comments on commit b19482d

Please sign in to comment.