diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-25 16:17:15 +0300 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-11-25 16:49:23 +0300 |
commit | 4ffd6e0cfe1816fced8ab8d2612e1edde81aac2a (patch) | |
tree | f8df7cafd83cfef61f84b2ea49fc08c6410304a1 /drivers/gpu/drm/i915/i915_gem_request.c | |
parent | 312c3c47ef769f1d3f2a0d4e5db78a6d16fe0b26 (diff) | |
download | linux-4ffd6e0cfe1816fced8ab8d2612e1edde81aac2a.tar.xz |
drm/i915: Add is-completed assert to request retire entrypoint
While we will check that the request is completed prior to being
retired, by placing an assert that the request is complete at the
entrypoint of the function we can more clearly document the function's
preconditions.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161125131718.20978-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_request.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem_request.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_request.c b/drivers/gpu/drm/i915/i915_gem_request.c index 82904595eaae..bd7b21f70283 100644 --- a/drivers/gpu/drm/i915/i915_gem_request.c +++ b/drivers/gpu/drm/i915/i915_gem_request.c @@ -281,6 +281,8 @@ void i915_gem_request_retire_upto(struct drm_i915_gem_request *req) struct drm_i915_gem_request *tmp; lockdep_assert_held(&req->i915->drm.struct_mutex); + GEM_BUG_ON(!i915_gem_request_completed(req)); + if (list_empty(&req->link)) return; |