public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches
@ 2017-10-17  9:26 Chris Wilson
  2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Chris Wilson @ 2017-10-17  9:26 UTC (permalink / raw)
  To: intel-gfx

After being requested to idle the GPU, flush the idle worker to drop the
residual active state, and any internal object caches.

References: https://bugs.freedesktop.org/show_bug.cgi?id=102655
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
---
 drivers/gpu/drm/i915/i915_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index 40287e9f00d7..bfcdfb6b7225 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -4266,6 +4266,9 @@ i915_drop_caches_set(void *data, u64 val)
 		i915_gem_shrink_all(dev_priv);
 	fs_reclaim_release(GFP_KERNEL);
 
+	if (!READ_ONCE(dev_priv->gt.active_requests))
+		drain_delayed_work(&dev_priv->gt.idle_work);
+
 	if (val & DROP_FREED) {
 		synchronize_rcu();
 		i915_gem_drain_freed_objects(dev_priv);
-- 
2.15.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] 7+ messages in thread

end of thread, other threads:[~2017-10-18 21:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-17  9:26 [PATCH] drm/i915: Flush the idle-worker for debugfs/i915_drop_caches Chris Wilson
2017-10-17 10:19 ` ✗ Fi.CI.BAT: warning for " Patchwork
2017-10-18 12:16 ` [PATCH v2] " Chris Wilson
2017-10-18 12:55   ` Joonas Lahtinen
2017-10-18 12:47 ` ✓ Fi.CI.BAT: success for drm/i915: Flush the idle-worker for debugfs/i915_drop_caches (rev2) Patchwork
2017-10-18 21:36 ` ✗ Fi.CI.IGT: warning " Patchwork
2017-10-18 21:55   ` Chris Wilson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox