diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-26 00:33:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2019-06-26 07:25:54 +0100 |
commit | f0ca820cc0067ce4debd9893650e5c188c83b941 (patch) | |
tree | 3e11e86dfdaddab7e7923a5e8cfa77d54dbc0405 | |
parent | b38565faded7da1f84b2b9a9a6d41ea1ebc48936 (diff) |
drm/i915/gt: Always call kref_init for the timeline
Always initialise the refcount, even for the embedded timelines inside
mock devices.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190625233349.32371-2-chris@chris-wilson.co.uk
-rw-r--r-- | drivers/gpu/drm/i915/gt/intel_timeline.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/gt/intel_timeline.c b/drivers/gpu/drm/i915/gt/intel_timeline.c index 3bbb632cb535..6daa9eb59e19 100644 --- a/drivers/gpu/drm/i915/gt/intel_timeline.c +++ b/drivers/gpu/drm/i915/gt/intel_timeline.c @@ -210,8 +210,11 @@ int intel_timeline_init(struct intel_timeline *timeline, { void *vaddr; + kref_init(&timeline->kref); + timeline->gt = gt; timeline->pin_count = 0; + timeline->has_initial_breadcrumb = !hwsp; timeline->hwsp_cacheline = NULL; @@ -357,8 +360,6 @@ intel_timeline_create(struct intel_gt *gt, struct i915_vma *global_hwsp) return ERR_PTR(err); } - kref_init(&timeline->kref); - return timeline; } |