All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Flush context free work on cleanup
@ 2019-11-12  9:06 ` Chris Wilson
  0 siblings, 0 replies; 16+ messages in thread
From: Chris Wilson @ 2019-11-12  9:06 UTC (permalink / raw)
  To: intel-gfx

Throw in a flush_work() and rcu_barrier() to specifically flush the
context cleanup work.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112248
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/gem/i915_gem_context.c | 1 +
 drivers/gpu/drm/i915/gt/intel_engine_cs.c   | 1 +
 2 files changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
index 72d389afa28a..17f395672e5e 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
@@ -776,6 +776,7 @@ int i915_gem_init_contexts(struct drm_i915_private *i915)
 void i915_gem_driver_release__contexts(struct drm_i915_private *i915)
 {
 	destroy_kernel_context(&i915->kernel_context);
+	flush_work(&i915->gem.contexts.free_work);
 }
 
 static int context_idr_cleanup(int id, void *p, void *data)
diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
index b9613d044393..1f68700a2311 100644
--- a/drivers/gpu/drm/i915/gt/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/gt/intel_engine_cs.c
@@ -402,6 +402,7 @@ void intel_engines_cleanup(struct intel_gt *gt)
 		gt->engine[id] = NULL;
 		gt->i915->engine[id] = NULL;
 	}
+	rcu_barrier();
 }
 
 /**
-- 
2.24.0

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

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

end of thread, other threads:[~2019-11-12 20:03 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-11-12  9:06 [PATCH] drm/i915: Flush context free work on cleanup Chris Wilson
2019-11-12  9:06 ` [Intel-gfx] " Chris Wilson
2019-11-12 10:15 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-11-12 10:15   ` [Intel-gfx] " Patchwork
2019-11-12 13:55 ` [PATCH] " Tvrtko Ursulin
2019-11-12 13:55   ` [Intel-gfx] " Tvrtko Ursulin
2019-11-12 14:04   ` Chris Wilson
2019-11-12 14:04     ` [Intel-gfx] " Chris Wilson
2019-11-12 14:36 ` ✗ Fi.CI.IGT: failure for " Patchwork
2019-11-12 14:36   ` [Intel-gfx] " Patchwork
2019-11-12 15:00 ` [PATCH v2] " Chris Wilson
2019-11-12 15:00   ` [Intel-gfx] " Chris Wilson
2019-11-12 16:01   ` Mika Kuoppala
2019-11-12 16:01     ` [Intel-gfx] " Mika Kuoppala
2019-11-12 20:03 ` ✗ Fi.CI.BAT: failure for drm/i915: Flush context free work on cleanup (rev2) Patchwork
2019-11-12 20:03   ` [Intel-gfx] " 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.