Skip to content

Commit

Permalink
drm/i915/execlists: Only mark incomplete requests as -EIO on cancelling
Browse files Browse the repository at this point in the history
Only the requests that have not completed do we want to change the
status of to signal the -EIO when cancelling the inflight set of requests
upon wedging.

Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191011103345.26013-1-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Oct 11, 2019
1 parent c97fb52 commit cbbf278
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions drivers/gpu/drm/i915/gt/intel_lrc.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,12 @@ static void __context_pin_release(struct intel_context *ce)

static void mark_eio(struct i915_request *rq)
{
if (!i915_request_signaled(rq))
dma_fence_set_error(&rq->fence, -EIO);
if (i915_request_completed(rq))
return;

GEM_BUG_ON(i915_request_signaled(rq));

dma_fence_set_error(&rq->fence, -EIO);
i915_request_mark_complete(rq);
}

Expand Down

0 comments on commit cbbf278

Please sign in to comment.