提交 d51dafaf 编写于 作者: C Chris Wilson

drm/i915: Assert all timeline requests are gone before fini

During i915_gem_timeline_fini(), assert that all the timeline's request
are completed and removed from the timeline.
Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170105153023.30575-1-chris@chris-wilson.co.uk
上级 b1ed35d9
......@@ -81,10 +81,18 @@ int i915_gem_timeline_init__global(struct drm_i915_private *i915)
&class, "&global_timeline->lock");
}
void i915_gem_timeline_fini(struct i915_gem_timeline *tl)
void i915_gem_timeline_fini(struct i915_gem_timeline *timeline)
{
lockdep_assert_held(&tl->i915->drm.struct_mutex);
int i;
list_del(&tl->link);
kfree(tl->name);
lockdep_assert_held(&timeline->i915->drm.struct_mutex);
for (i = 0; i < ARRAY_SIZE(timeline->engine); i++) {
struct intel_timeline *tl = &timeline->engine[i];
GEM_BUG_ON(!list_empty(&tl->requests));
}
list_del(&timeline->link);
kfree(timeline->name);
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册