diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-05-07 13:11:08 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-05-07 17:40:19 +0100 |
commit | 3970564940ba0322bcefce7fd8fd35c2b85846bf (patch) | |
tree | cbd7ebd1f84fbcd1399f86235fd9cbf07976ccc2 /drivers/gpu/drm/i915/i915_debugfs.c | |
parent | drm/i915: Cancel retire_worker on parking (diff) | |
download | linux-dev-3970564940ba0322bcefce7fd8fd35c2b85846bf.tar.xz linux-dev-3970564940ba0322bcefce7fd8fd35c2b85846bf.zip |
drm/i915: Stop spinning for DROP_IDLE (debugfs/i915_drop_caches)
If the user is racing a call to debugfs/i915_drop_caches with ongoing
submission from another thread/process, we may never end up idling the
GPU and be uninterruptibly spinning in debugfs/i915_drop_caches trying
to catch an idle moment.
Just flush the work once, that should be enough to park the system under
correct conditions. Outside of those we either have a driver bug or the
user is racing themselves. Sadly, because the user may be provoking the
unwanted situation we can't put a warn here to attract attention to a
probable bug.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190507121108.18377-4-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_debugfs.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index fc6e60d82477..b6094063be9b 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -3947,9 +3947,7 @@ i915_drop_caches_set(void *data, u64 val) fs_reclaim_release(GFP_KERNEL); if (val & DROP_IDLE) { - do { - flush_delayed_work(&i915->gem.retire_work); - } while (READ_ONCE(i915->gt.awake)); + flush_delayed_work(&i915->gem.retire_work); flush_work(&i915->gem.idle_work); } |