All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix up FORCE_GPU_RELOC (debug) to flush CPU write domains
@ 2018-09-03 15:02 Chris Wilson
  2018-09-03 15:31 ` ✗ Fi.CI.BAT: failure for " Patchwork
  2018-09-03 16:49 ` [PATCH] " Matthew Auld
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2018-09-03 15:02 UTC (permalink / raw)
  To: intel-gfx

We currently assert that if the target is in a CPU write domain, we use
a CPU path rather than the GPU path. However, we have a debug override
to force the GPU path and that unfortunately hits the assert. Include
the async clflush under the debug option.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_gem_execbuffer.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 43706c1db31a..7d0b3a2c30e2 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1127,6 +1127,13 @@ static int __reloc_gpu_alloc(struct i915_execbuffer *eb,
 	u32 *cmd;
 	int err;
 
+	if (DBG_FORCE_RELOC == FORCE_GPU_RELOC) {
+		obj = vma->obj;
+		if (obj->cache_dirty & ~obj->cache_coherent)
+			i915_gem_clflush_object(obj, 0);
+		obj->write_domain = 0;
+	}
+
 	GEM_BUG_ON(vma->obj->write_domain & I915_GEM_DOMAIN_CPU);
 
 	obj = i915_gem_batch_pool_get(&eb->engine->batch_pool, PAGE_SIZE);
-- 
2.19.0.rc1

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

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

end of thread, other threads:[~2018-09-03 16:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-09-03 15:02 [PATCH] drm/i915: Fix up FORCE_GPU_RELOC (debug) to flush CPU write domains Chris Wilson
2018-09-03 15:31 ` ✗ Fi.CI.BAT: failure for " Patchwork
2018-09-03 16:49 ` [PATCH] " Matthew Auld

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.