drm/i915: Pull sync_scru for device reset outside of wedge_mutex
authorChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Feb 2019 13:50:39 +0000 (13:50 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Mon, 11 Feb 2019 20:46:24 +0000 (20:46 +0000)
commit785fbda5ba66087bf82905c249ccec1fa53bd266
treea9f01dd20129b1a2fee2eddf688bc60b9b87823a
parenta0f52c3d357af218a9c1f7cd906ab70426176a1a
drm/i915: Pull sync_scru for device reset outside of wedge_mutex

We need to flush our srcu protecting resources about to be clobbered
by the reset, inside of our timer failsafe but outside of the
error->wedge_mutex, so that the failsafe can run in case the
synchronize_srcu() takes too long (hits a shrinker deadlock?).

Fixes: 72eb16df010a ("drm/i915: Serialise resets with wedging")
References: https://bugs.freedesktop.org/show_bug.cgi?id=109605
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190211135040.1234-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com>
drivers/gpu/drm/i915/i915_reset.c