Lines Matching full:timeline
58 intel_timeline_pin_map(struct intel_timeline *timeline) in intel_timeline_pin_map() argument
60 struct drm_i915_gem_object *obj = timeline->hwsp_ggtt->obj; in intel_timeline_pin_map()
61 u32 ofs = offset_in_page(timeline->hwsp_offset); in intel_timeline_pin_map()
68 timeline->hwsp_map = vaddr; in intel_timeline_pin_map()
69 timeline->hwsp_seqno = memset(vaddr + ofs, 0, TIMELINE_SEQNO_BYTES); in intel_timeline_pin_map()
75 static int intel_timeline_init(struct intel_timeline *timeline, in intel_timeline_init() argument
80 kref_init(&timeline->kref); in intel_timeline_init()
81 atomic_set(&timeline->pin_count, 0); in intel_timeline_init()
83 timeline->gt = gt; in intel_timeline_init()
86 timeline->hwsp_offset = offset; in intel_timeline_init()
87 timeline->hwsp_ggtt = i915_vma_get(hwsp); in intel_timeline_init()
89 timeline->has_initial_breadcrumb = true; in intel_timeline_init()
93 timeline->hwsp_ggtt = hwsp; in intel_timeline_init()
96 timeline->hwsp_map = NULL; in intel_timeline_init()
97 timeline->hwsp_seqno = (void *)(long)timeline->hwsp_offset; in intel_timeline_init()
99 GEM_BUG_ON(timeline->hwsp_offset >= hwsp->size); in intel_timeline_init()
101 timeline->fence_context = dma_fence_context_alloc(1); in intel_timeline_init()
103 mutex_init(&timeline->mutex); in intel_timeline_init()
105 INIT_ACTIVE_FENCE(&timeline->last_request); in intel_timeline_init()
106 INIT_LIST_HEAD(&timeline->requests); in intel_timeline_init()
108 i915_syncmap_init(&timeline->sync); in intel_timeline_init()
109 i915_active_init(&timeline->active, __timeline_active, in intel_timeline_init()
125 struct intel_timeline *timeline = in intel_timeline_fini() local
128 if (timeline->hwsp_map) in intel_timeline_fini()
129 i915_gem_object_unpin_map(timeline->hwsp_ggtt->obj); in intel_timeline_fini()
131 i915_vma_put(timeline->hwsp_ggtt); in intel_timeline_fini()
132 i915_active_fini(&timeline->active); in intel_timeline_fini()
140 i915_syncmap_free(&timeline->sync); in intel_timeline_fini()
142 kfree(timeline); in intel_timeline_fini()
150 struct intel_timeline *timeline; in __intel_timeline_create() local
153 timeline = kzalloc(sizeof(*timeline), GFP_KERNEL); in __intel_timeline_create()
154 if (!timeline) in __intel_timeline_create()
157 err = intel_timeline_init(timeline, gt, global_hwsp, offset); in __intel_timeline_create()
159 kfree(timeline); in __intel_timeline_create()
163 return timeline; in __intel_timeline_create()
211 GT_TRACE(tl->gt, "timeline:%llx using HWSP offset:%x\n", in intel_timeline_pin()
239 * Pretend we are serialised by the timeline->mutex. in intel_timeline_enter()
244 * timeline, it uses the power mutex as a global serialisation in intel_timeline_enter()
245 * lock to prevent any other request entering its timeline. in intel_timeline_enter()
252 * pin the timeline in the active_list while the locks are dropped. in intel_timeline_enter()
292 * Since this timeline is idle, all bariers upon which we were waiting in intel_timeline_exit()
347 tl = rcu_dereference(from->timeline); in intel_timeline_read_hwsp()
393 struct intel_timeline *timeline = in __intel_timeline_free() local
394 container_of(kref, typeof(*timeline), kref); in __intel_timeline_free()
396 GEM_BUG_ON(atomic_read(&timeline->pin_count)); in __intel_timeline_free()
397 GEM_BUG_ON(!list_empty(&timeline->requests)); in __intel_timeline_free()
398 GEM_BUG_ON(timeline->retire); in __intel_timeline_free()
400 call_rcu(&timeline->rcu, intel_timeline_fini); in __intel_timeline_free()
428 drm_printf(m, "Timeline %llx: busy; skipping\n", in intel_gt_show_timelines()
452 drm_printf(m, "Timeline %llx: { ", tl->fence_context); in intel_gt_show_timelines()