drm/i915: Restore engine->submit_request before unwedging
When we wedge the device, we override engine->submit_request with a nop
to ensure that all in-flight requests are marked in error. However, igt
would like to unwedge the device to test -EIO handling. This requires us
to flush those in-flight requests and restore the original
engine->submit_request.
v2: Use a vfunc to unify enabling request submission to engines
v3: Split new vfunc to a separate patch.
v4: Make the wait interruptible -- the third party fences we wait upon
may be indefinitely broken, so allow the reset to be aborted.
Fixes: 821ed7df6e
("drm/i915: Update reset path to fix incomplete requests")
Testcase: igt/gem_eio
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com> #v3
Link: http://patchwork.freedesktop.org/patch/msgid/20170316171305.12972-3-chris@chris-wilson.co.uk
This commit is contained in:
@@ -1821,7 +1821,9 @@ void i915_reset(struct drm_i915_private *dev_priv)
|
||||
return;
|
||||
|
||||
/* Clear any previous failed attempts at recovery. Time to try again. */
|
||||
__clear_bit(I915_WEDGED, &error->flags);
|
||||
if (!i915_gem_unset_wedged(dev_priv))
|
||||
goto wakeup;
|
||||
|
||||
error->reset_count++;
|
||||
|
||||
pr_notice("drm/i915: Resetting chip after gpu hang\n");
|
||||
@@ -1867,17 +1869,18 @@ void i915_reset(struct drm_i915_private *dev_priv)
|
||||
|
||||
i915_queue_hangcheck(dev_priv);
|
||||
|
||||
wakeup:
|
||||
finish:
|
||||
i915_gem_reset_finish(dev_priv);
|
||||
enable_irq(dev_priv->drm.irq);
|
||||
|
||||
wakeup:
|
||||
clear_bit(I915_RESET_HANDOFF, &error->flags);
|
||||
wake_up_bit(&error->flags, I915_RESET_HANDOFF);
|
||||
return;
|
||||
|
||||
error:
|
||||
i915_gem_set_wedged(dev_priv);
|
||||
goto wakeup;
|
||||
goto finish;
|
||||
}
|
||||
|
||||
static int i915_pm_suspend(struct device *kdev)
|
||||
|
Reference in New Issue
Block a user