From ae2306315fe83ba2523d557a8fe472d7c587c1ca Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 7 May 2019 13:11:06 +0100 Subject: drm/i915: Remove delay for idle_work The original intent for the delay before running the idle_work was to provide a hysteresis to avoid ping-ponging the device runtime-pm. Since then we have also pulled in some memory management and general device management for parking. But with the inversion of the wakeref handling, GEM is no longer responsible for the wakeref and by the time we call the idle_work, the device is asleep. It seems appropriate now to drop the delay and just run the worker immediately to flush the cached GEM state before sleeping. Signed-off-by: Chris Wilson Reviewed-by: Tvrtko Ursulin Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-2-chris@chris-wilson.co.uk --- drivers/gpu/drm/i915/i915_debugfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/drm/i915/i915_debugfs.c') diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index f60aed7747e5..fc6e60d82477 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -3949,8 +3949,8 @@ i915_drop_caches_set(void *data, u64 val) if (val & DROP_IDLE) { do { flush_delayed_work(&i915->gem.retire_work); - drain_delayed_work(&i915->gem.idle_work); } while (READ_ONCE(i915->gt.awake)); + flush_work(&i915->gem.idle_work); } if (val & DROP_FREED) -- cgit v1.2.3