All of lore.kernel.org
 help / color / mirror / Atom feed
* [CI] drm/i915/gt: Always call kref_init for the timeline
@ 2019-06-25 23:25 Chris Wilson
  2019-06-26  3:07 ` ✓ Fi.CI.BAT: success for " Patchwork
  2019-06-26  9:32 ` ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2019-06-25 23:25 UTC (permalink / raw)
  To: intel-gfx

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>
---
 drivers/gpu/drm/i915/gt/intel_timeline.c | 5 +++--
 1 file 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 478258274986..c9abc5c8c839 100644
--- a/drivers/gpu/drm/i915/gt/intel_timeline.c
+++ b/drivers/gpu/drm/i915/gt/intel_timeline.c
@@ -220,8 +220,11 @@ int intel_timeline_init(struct intel_timeline *timeline,
 	 */
 	BUILD_BUG_ON(KSYNCMAP < I915_NUM_ENGINES);
 
+	kref_init(&timeline->kref);
+
 	timeline->gt = gt;
 	timeline->pin_count = 0;
+
 	timeline->has_initial_breadcrumb = !hwsp;
 	timeline->hwsp_cacheline = NULL;
 
@@ -367,8 +370,6 @@ intel_timeline_create(struct intel_gt *gt, struct i915_vma *global_hwsp)
 		return ERR_PTR(err);
 	}
 
-	kref_init(&timeline->kref);
-
 	return timeline;
 }
 
-- 
2.20.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-26  9:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 23:25 [CI] drm/i915/gt: Always call kref_init for the timeline Chris Wilson
2019-06-26  3:07 ` ✓ Fi.CI.BAT: success for " Patchwork
2019-06-26  9:32 ` ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.