Commit 209b3f7e authored by Chris Wilson's avatar Chris Wilson

drm/i915: Assert that the request hasn't been retired

With all callers now not playing tricks with dropping the struct_mutex
between waiting and retiring, we can assert that the request is ready to
be retired.
Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1470388464-28458-19-git-send-email-chris@chris-wilson.co.uk
parent 3e510a8e
...@@ -170,7 +170,7 @@ static void i915_gem_request_retire(struct drm_i915_gem_request *request) ...@@ -170,7 +170,7 @@ static void i915_gem_request_retire(struct drm_i915_gem_request *request)
struct i915_gem_active *active, *next; struct i915_gem_active *active, *next;
trace_i915_gem_request_retire(request); trace_i915_gem_request_retire(request);
list_del_init(&request->link); list_del(&request->link);
/* We know the GPU must have read the request to have /* We know the GPU must have read the request to have
* sent us the seqno + interrupt, so use the position * sent us the seqno + interrupt, so use the position
...@@ -228,9 +228,7 @@ void i915_gem_request_retire_upto(struct drm_i915_gem_request *req) ...@@ -228,9 +228,7 @@ void i915_gem_request_retire_upto(struct drm_i915_gem_request *req)
struct drm_i915_gem_request *tmp; struct drm_i915_gem_request *tmp;
lockdep_assert_held(&req->i915->drm.struct_mutex); lockdep_assert_held(&req->i915->drm.struct_mutex);
GEM_BUG_ON(list_empty(&req->link));
if (list_empty(&req->link))
return;
do { do {
tmp = list_first_entry(&engine->request_list, tmp = list_first_entry(&engine->request_list,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment