drm/i915: Set guilty-flag on fence after detecting a hang
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Jan 2017 17:22:43 +0000 (17:22 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 10 Jan 2017 20:49:30 +0000 (20:49 +0000)
commitc0d5f32c5043e8568ffdbcff60dfba26f408fa10
treeeb494061687e9c051de964874dd6039d38d6a4ea
parent2edc6e0df1c15c0cc665a8aa61dcf2c540e90a70
drm/i915: Set guilty-flag on fence after detecting a hang

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
drivers/gpu/drm/i915/i915_gem.c