]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Repeat flush of idle work during suspend
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 23 Dec 2016 14:57:56 +0000 (14:57 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 23 Dec 2016 16:07:11 +0000 (16:07 +0000)
commite859497e58327253c6228b7f3118f630a0b8d89a
tree4d88a9af0a0222f261e95b2189d9fc71386b8066
parent26759147c377aafc3f6e74e8ede4a44c2c745ac9
drm/i915: Repeat flush of idle work during suspend

The idle work handler is self-arming - if it detects that it needs to
run again it will queue itself from its work handler. Take greater care
when trying to drain the idle work, and double check that it is flushed.

The free worker has a similar issue where it is armed by an RCU task
which may be running concurrently with us.

This should hopefully help with the sporadic WARN_ON(dev_priv->gt.awake)
from i915_gem_suspend.

v2: Reuse drain_freed_objects.
v3: Don't try to flush the freed objects from the shrinker, as it may be
underneath the struct_mutex already.
v4: do while and comment upon the excess rcu_barrier in drain_freed_objects

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161223145804.6605-2-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_debugfs.c
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_gem.c