drm/i915/guc: Support request cancellation
This adds GuC backend support for i915_request_cancel(), which in turn makes CONFIG_DRM_I915_REQUEST_TIMEOUT work. This implementation makes use of fence while there are likely simplier options. A fence was chosen because of another feature coming soon which requires a user to block on a context until scheduling is disabled. In that case we return the fence to the user and the user can wait on that fence. v2: (Daniele) - A comment about locking the blocked incr / decr - A comments about the use of the fence - Update commit message explaining why fence - Delete redundant check blocked count in unblock function - Ring buffer implementation - Comment about blocked in submission path - Shorter rpm path v3: (Checkpatch) - Fix typos in commit message (Daniel) - Rework to simplier locking structure in guc_context_block / unblock Signed-off-by:Matthew Brost <matthew.brost@intel.com> Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com> Reviewed-by:
Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com> Signed-off-by:
John Harrison <John.C.Harrison@Intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210727002348.97202-26-matthew.brost@intel.com
Showing
- drivers/gpu/drm/i915/gt/intel_context.c 13 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_context.c
- drivers/gpu/drm/i915/gt/intel_context.h 7 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_context.h
- drivers/gpu/drm/i915/gt/intel_context_types.h 8 additions, 1 deletiondrivers/gpu/drm/i915/gt/intel_context_types.h
- drivers/gpu/drm/i915/gt/intel_execlists_submission.c 18 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_execlists_submission.c
- drivers/gpu/drm/i915/gt/intel_ring_submission.c 16 additions, 0 deletionsdrivers/gpu/drm/i915/gt/intel_ring_submission.c
- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c 188 additions, 0 deletionsdrivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
- drivers/gpu/drm/i915/i915_request.c 1 addition, 13 deletionsdrivers/gpu/drm/i915/i915_request.c
Loading
Please register or sign in to comment