mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-02-14 03:35:39 +07:00
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
This commit is contained in:
parent
2006058e99
commit
4fda44bf16
@ -2473,6 +2473,7 @@ static inline void i915_gem_drain_workqueue(struct drm_i915_private *i915)
|
||||
*/
|
||||
int pass = 3;
|
||||
do {
|
||||
flush_workqueue(i915->wq);
|
||||
rcu_barrier();
|
||||
i915_gem_drain_freed_objects(i915);
|
||||
} while (--pass);
|
||||
|
Loading…
Reference in New Issue
Block a user