This source file includes following definitions.
- intel_timeline_get
- intel_timeline_put
- __intel_timeline_sync_set
- intel_timeline_sync_set
- __intel_timeline_sync_is_later
- intel_timeline_sync_is_later
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 #ifndef I915_TIMELINE_H
26 #define I915_TIMELINE_H
27
28 #include <linux/lockdep.h>
29
30 #include "i915_active.h"
31 #include "i915_syncmap.h"
32 #include "gt/intel_timeline_types.h"
33
34 int intel_timeline_init(struct intel_timeline *tl,
35 struct intel_gt *gt,
36 struct i915_vma *hwsp);
37 void intel_timeline_fini(struct intel_timeline *tl);
38
39 struct intel_timeline *
40 intel_timeline_create(struct intel_gt *gt, struct i915_vma *global_hwsp);
41
42 static inline struct intel_timeline *
43 intel_timeline_get(struct intel_timeline *timeline)
44 {
45 kref_get(&timeline->kref);
46 return timeline;
47 }
48
49 void __intel_timeline_free(struct kref *kref);
50 static inline void intel_timeline_put(struct intel_timeline *timeline)
51 {
52 kref_put(&timeline->kref, __intel_timeline_free);
53 }
54
55 static inline int __intel_timeline_sync_set(struct intel_timeline *tl,
56 u64 context, u32 seqno)
57 {
58 return i915_syncmap_set(&tl->sync, context, seqno);
59 }
60
61 static inline int intel_timeline_sync_set(struct intel_timeline *tl,
62 const struct dma_fence *fence)
63 {
64 return __intel_timeline_sync_set(tl, fence->context, fence->seqno);
65 }
66
67 static inline bool __intel_timeline_sync_is_later(struct intel_timeline *tl,
68 u64 context, u32 seqno)
69 {
70 return i915_syncmap_is_later(&tl->sync, context, seqno);
71 }
72
73 static inline bool intel_timeline_sync_is_later(struct intel_timeline *tl,
74 const struct dma_fence *fence)
75 {
76 return __intel_timeline_sync_is_later(tl, fence->context, fence->seqno);
77 }
78
79 int intel_timeline_pin(struct intel_timeline *tl);
80 void intel_timeline_enter(struct intel_timeline *tl);
81 int intel_timeline_get_seqno(struct intel_timeline *tl,
82 struct i915_request *rq,
83 u32 *seqno);
84 void intel_timeline_exit(struct intel_timeline *tl);
85 void intel_timeline_unpin(struct intel_timeline *tl);
86
87 int intel_timeline_read_hwsp(struct i915_request *from,
88 struct i915_request *until,
89 u32 *hwsp_offset);
90
91 void intel_timelines_init(struct drm_i915_private *i915);
92 void intel_timelines_fini(struct drm_i915_private *i915);
93
94 #endif