[2/2] drm/i915: Serialise i915_active_wait() with its retirement
diff mbox series

Message ID 20191202163334.2628526-2-chris@chris-wilson.co.uk
State New
Headers show
  • [1/2] drm/i915: Specialise i915_active.work lock classes
Related show

Commit Message

Chris Wilson Dec. 2, 2019, 4:33 p.m. UTC
As the i915_active.retire() may be running on another CPU as we detect
that the i915_active is idle, we may not wait for the retirement itself.
Wait for the remote callback by waiting for the retirement worker.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112424
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
 drivers/gpu/drm/i915/i915_active.c | 1 +
 1 file changed, 1 insertion(+)

diff mbox series

diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c
index 7553acc5aa16..ff6ba581527a 100644
--- a/drivers/gpu/drm/i915/i915_active.c
+++ b/drivers/gpu/drm/i915/i915_active.c
@@ -472,6 +472,7 @@  int i915_active_wait(struct i915_active *ref)
 	if (wait_var_event_interruptible(ref, i915_active_is_idle(ref)))
 		return -EINTR;
+	flush_work(&ref->work);
 	return 0;