Skip to content

Commit

Permalink
drm/i915/gt: Always call kref_init for the timeline
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Chris Wilson committed Jun 26, 2019
1 parent b38565f commit f0ca820
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/gpu/drm/i915/gt/intel_timeline.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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;
}

Expand Down

0 comments on commit f0ca820

Please sign in to comment.