Lines Matching defs:id

37  * context id to the last u32 fence seqno waited upon from that context.
112 __sync_branch_idx(const struct i915_syncmap *p, u64 id)
114 return (id >> p->height) & MASK;
118 __sync_leaf_idx(const struct i915_syncmap *p, u64 id)
121 return id & MASK;
124 static inline u64 __sync_branch_prefix(const struct i915_syncmap *p, u64 id)
126 return id >> p->height >> SHIFT;
129 static inline u64 __sync_leaf_prefix(const struct i915_syncmap *p, u64 id)
132 return id >> SHIFT;
143 * @id: the context id (other timeline) we are synchronising to
146 * If we have already synchronised this @root timeline with another (@id) then
154 bool i915_syncmap_is_later(struct i915_syncmap **root, u64 id, u32 seqno)
163 if (likely(__sync_leaf_prefix(p, id) == p->prefix))
172 if (__sync_branch_prefix(p, id) == p->prefix)
181 p = __sync_child(p)[__sync_branch_idx(p, id)];
185 if (__sync_branch_prefix(p, id) != p->prefix)
191 idx = __sync_leaf_idx(p, id);
199 __sync_alloc_leaf(struct i915_syncmap *parent, u64 id)
210 p->prefix = __sync_leaf_prefix(p, id);
214 static inline void __sync_set_seqno(struct i915_syncmap *p, u64 id, u32 seqno)
216 unsigned int idx = __sync_leaf_idx(p, id);
230 static noinline int __sync_set(struct i915_syncmap **root, u64 id, u32 seqno)
236 p = __sync_alloc_leaf(NULL, id);
244 GEM_BUG_ON(__sync_leaf_prefix(p, id) == p->prefix);
253 if (__sync_branch_prefix(p, id) == p->prefix)
281 if (__sync_branch_prefix(p, id) != p->prefix) {
291 above = fls64(__sync_branch_prefix(p, id) ^ p->prefix);
294 next->prefix = __sync_branch_prefix(next, id);
298 idx = __sync_branch_idx(p->parent, id);
304 /* Compute the idx of the other branch, not our id! */
318 idx = __sync_branch_idx(p, id);
321 next = __sync_alloc_leaf(p, id);
334 GEM_BUG_ON(p->prefix != __sync_leaf_prefix(p, id));
335 __sync_set_seqno(p, id, seqno);
343 * @id: the context id (other timeline) we have synchronised to
346 * When we synchronise this @root timeline with another (@id), we also know
353 int i915_syncmap_set(struct i915_syncmap **root, u64 id, u32 seqno)
358 * We expect to be called in sequence following is_later(id), which
361 if (likely(p && __sync_leaf_prefix(p, id) == p->prefix)) {
362 __sync_set_seqno(p, id, seqno);
366 return __sync_set(root, id, seqno);