All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite
@ 2016-08-17 17:33 Chris Wilson
  2016-08-17 17:33 ` [PATCH 2/2] drm/i915: Fallback to single page pwrite/pread if unable to release fence Chris Wilson
  2016-08-18  5:27 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Chris Wilson @ 2016-08-17 17:33 UTC (permalink / raw)
  To: intel-gfx

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>
---
 drivers/gpu/drm/i915/i915_gem.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a8d0f70c22f9..5fd93c918a01 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -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);
@@ -1149,7 +1149,7 @@ out_flush:
 		}
 	}
 
-	intel_fb_obj_flush(obj, false, ORIGIN_GTT);
+	intel_fb_obj_flush(obj, false, ORIGIN_CPU);
 out_unpin:
 	if (node.allocated) {
 		wmb();
-- 
2.8.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-18  7:14 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-17 17:33 [PATCH 1/2] drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite Chris Wilson
2016-08-17 17:33 ` [PATCH 2/2] drm/i915: Fallback to single page pwrite/pread if unable to release fence Chris Wilson
2016-08-18  7:13   ` Joonas Lahtinen
2016-08-18  5:27 ` ✗ Ro.CI.BAT: failure for series starting with [1/2] drm/i915: Use ORIGIN_CPU for fb invalidation from pwrite Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.