drm/i915: Flush the workqueue before draining
authorChris Wilson <chris@chris-wilson.co.uk>
Wed, 3 Jul 2019 17:19:13 +0000 (18:19 +0100)
committerChris Wilson <chris@chris-wilson.co.uk>
Thu, 4 Jul 2019 12:44:10 +0000 (13:44 +0100)
commit4fda44bf16b79a0b78fe36c6b9859e9ce2d09f43
treedb88f80ec456f8445d70a683bafb77382e842c26
parent2006058e9988421a113e8edc004a8e0eae1a6d3f
drm/i915: Flush the workqueue before draining

Trying to drain a workqueue while we may still be adding to it from
background tasks is, according to kernel/workqueue.c, verboten. So, add
a flush_workqueue() at the start of our cleanup procedure.

References: https://bugs.freedesktop.org/show_bug.cgi?id=110550
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190703171913.16585-4-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/i915_drv.h