- /*
- * by using fence.error = -EIO, full reset sets the wedged flag, do one
- * more full reset to re-enable the hw.
- */
- if (i915_terminally_wedged(&i915->gpu_error)) {
- global_reset_lock(i915);
- rq->fence.error = 0;
-
- mutex_lock(&i915->drm.struct_mutex);
- set_bit(I915_RESET_HANDOFF, &i915->gpu_error.flags);
- i915_reset(i915, I915_RESET_QUIET);
- GEM_BUG_ON(test_bit(I915_RESET_HANDOFF,
- &i915->gpu_error.flags));
- mutex_unlock(&i915->drm.struct_mutex);
-
- if (i915_reset_count(&i915->gpu_error) == reset_count) {
- pr_err("No full GPU reset recorded!\n");
- err = -EINVAL;
- goto out_rq;
- }
- }
-
-out_rq:
- i915_gem_request_put(rq);
- hang_fini(&h);
-out_backoff:
- global_reset_unlock(i915);