Lines Matching refs:id

37  * context id to the last u32 fence seqno waited upon from that context.
109 __sync_branch_idx(const struct i915_syncmap *p, u64 id)
111 return (id >> p->height) & MASK;
115 __sync_leaf_idx(const struct i915_syncmap *p, u64 id)
118 return id & MASK;
121 static inline u64 __sync_branch_prefix(const struct i915_syncmap *p, u64 id)
123 return id >> p->height >> SHIFT;
126 static inline u64 __sync_leaf_prefix(const struct i915_syncmap *p, u64 id)
129 return id >> SHIFT;
140 * @id: the context id (other timeline) we are synchronising to
143 * If we have already synchronised this @root timeline with another (@id) then
151 bool i915_syncmap_is_later(struct i915_syncmap **root, u64 id, u32 seqno)
160 if (likely(__sync_leaf_prefix(p, id) == p->prefix))
169 if (__sync_branch_prefix(p, id) == p->prefix)
178 p = __sync_child(p)[__sync_branch_idx(p, id)];
182 if (__sync_branch_prefix(p, id) != p->prefix)
188 idx = __sync_leaf_idx(p, id);
196 __sync_alloc_leaf(struct i915_syncmap *parent, u64 id)
207 p->prefix = __sync_leaf_prefix(p, id);
211 static inline void __sync_set_seqno(struct i915_syncmap *p, u64 id, u32 seqno)
213 unsigned int idx = __sync_leaf_idx(p, id);
227 static noinline int __sync_set(struct i915_syncmap **root, u64 id, u32 seqno)
233 p = __sync_alloc_leaf(NULL, id);
241 GEM_BUG_ON(__sync_leaf_prefix(p, id) == p->prefix);
250 if (__sync_branch_prefix(p, id) == p->prefix)
278 if (__sync_branch_prefix(p, id) != p->prefix) {
288 above = fls64(__sync_branch_prefix(p, id) ^ p->prefix);
291 next->prefix = __sync_branch_prefix(next, id);
295 idx = __sync_branch_idx(p->parent, id);
301 /* Compute the idx of the other branch, not our id! */
315 idx = __sync_branch_idx(p, id);
318 next = __sync_alloc_leaf(p, id);
331 GEM_BUG_ON(p->prefix != __sync_leaf_prefix(p, id));
332 __sync_set_seqno(p, id, seqno);
340 * @id: the context id (other timeline) we have synchronised to
343 * When we synchronise this @root timeline with another (@id), we also know
350 int i915_syncmap_set(struct i915_syncmap **root, u64 id, u32 seqno)
355 * We expect to be called in sequence following is_later(id), which
358 if (likely(p && __sync_leaf_prefix(p, id) == p->prefix)) {
359 __sync_set_seqno(p, id, seqno);
363 return __sync_set(root, id, seqno);