tl->seqno = seqno;
list_for_each_entry(timeline, &i915->gt.timelines, link)
- memset(timeline->engine[id].sync_seqno, 0,
- sizeof(timeline->engine[id].sync_seqno));
+ memset(timeline->engine[id].global_sync, 0,
+ sizeof(timeline->engine[id].global_sync));
}
return 0;
return ret < 0 ? ret : 0;
}
- if (seqno <= to->timeline->sync_seqno[from->engine->id])
+ if (seqno <= to->timeline->global_sync[from->engine->id])
return 0;
trace_i915_gem_ring_sync_to(to, from);
return ret;
}
- to->timeline->sync_seqno[from->engine->id] = seqno;
+ to->timeline->global_sync[from->engine->id] = seqno;
return 0;
}
* redundant and we can discard it without loss of generality.
*/
struct i915_syncmap *sync;
- u32 sync_seqno[I915_NUM_ENGINES];
+ /**
+ * Separately to the inter-context seqno map above, we track the last
+ * barrier (e.g. semaphore wait) to the global engine timelines. Note
+ * that this tracks global_seqno rather than the context.seqno, and
+ * so it is subject to the limitations of hw wraparound and that we
+ * may need to revoke global_seqno (on pre-emption).
+ */
+ u32 global_sync[I915_NUM_ENGINES];
struct i915_gem_timeline *common;
};