Skip to content

Commit

Permalink
drm/i915: Set guilty-flag on fence after detecting a hang
Browse files Browse the repository at this point in the history
The struct dma_fence carries a status field exposed to userspace by
sync_file. This is inspected after the fence is signaled and can convey
whether or not the request completed successfully, or in our case if we
detected a hang during the request (signaled via -EIO in
SYNC_IOC_FILE_INFO).

v2: Mark all cancelled requests as failed.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170110172246.27297-2-chris@chris-wilson.co.uk
  • Loading branch information
Chris Wilson committed Jan 10, 2017
1 parent 2edc6e0 commit c0d5f32
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/gpu/drm/i915/i915_gem.c
Original file line number Diff line number Diff line change
Expand Up @@ -2626,6 +2626,8 @@ static void reset_request(struct drm_i915_gem_request *request)
head = 0;
}
memset(vaddr + head, 0, request->postfix - head);

dma_fence_set_error(&request->fence, -EIO);
}

void i915_gem_reset_prepare(struct drm_i915_private *dev_priv)
Expand Down

0 comments on commit c0d5f32

Please sign in to comment.