Commit 3c1b2847 authored by Chris Wilson's avatar Chris Wilson

drm/i915: Set an error status for a resubmitted request

Let userspace know if its request was resubmitted due to it being
executed at the time of a global reset. In this case, the reset was for
a guilty request on another engine, and this request was an innocent
victim that will be re-executed upon restarting. However, since it was
running at the time of the reset, we can not guarantee that it suffered
no ill-effects from the reset (e.g. some context state may be lost, or
some self-modifying fragment shaders will be restarted from the final
state not their initial state), to let userspace know that it has been
corrupted set a special value on the fence->error, -EAGAIN.

If the request does hang on resubmission, the error will be overwritten
with -EIO.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-3-chris@chris-wilson.co.uk
parent c0d5f32c
...@@ -2665,6 +2665,7 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine) ...@@ -2665,6 +2665,7 @@ static void i915_gem_reset_engine(struct intel_engine_cs *engine)
reset_request(request); reset_request(request);
} else { } else {
i915_gem_context_mark_innocent(hung_ctx); i915_gem_context_mark_innocent(hung_ctx);
dma_fence_set_error(&request->fence, -EAGAIN);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment