int kgsl_sync_timeline_create(struct kgsl_context *context) { struct kgsl_sync_timeline *ktimeline; /* Generate a name which includes the thread name, thread id, process * name, process id, and context id. This makes it possible to * identify the context of a timeline in the sync dump. */ char ktimeline_name[sizeof(context->timeline->name)] = {}; snprintf(ktimeline_name, sizeof(ktimeline_name), "%s_%.15s(%d)-%.15s(%d)-%d", context->device->name, current->group_leader->comm, current->group_leader->pid, current->comm, current->pid, context->id); context->timeline = sync_timeline_create(&kgsl_sync_timeline_ops, (int) sizeof(struct kgsl_sync_timeline), ktimeline_name); if (context->timeline == NULL) return -EINVAL; ktimeline = (struct kgsl_sync_timeline *) context->timeline; ktimeline->last_timestamp = 0; ktimeline->device = context->device; ktimeline->context_id = context->id; spin_lock_init(&ktimeline->lock); return 0; }
struct sw_sync_timeline *sw_sync_timeline_create(const char *name) { struct sw_sync_timeline *obj = (struct sw_sync_timeline *) sync_timeline_create(&sw_sync_timeline_ops, sizeof(struct sw_sync_timeline), name); return obj; }
int kgsl_sync_timeline_create(struct kgsl_context *context) { struct kgsl_sync_timeline *ktimeline; context->timeline = sync_timeline_create(&kgsl_sync_timeline_ops, (int) sizeof(struct kgsl_sync_timeline), "kgsl-timeline"); if (context->timeline == NULL) return -EINVAL; ktimeline = (struct kgsl_sync_timeline *) context->timeline; ktimeline->last_timestamp = 0; return 0; }
struct viv_sync_timeline * viv_sync_timeline_create( const char * name, gckOS os ) { struct viv_sync_timeline * obj; obj = (struct viv_sync_timeline *) sync_timeline_create(&viv_timeline_ops, sizeof(struct viv_sync_timeline), name); obj->os = os; obj->stamp = 0; return obj; }
int i915_sync_timeline_create(struct drm_device *dev, const char *name, struct intel_ring_buffer *ring) { struct i915_sync_timeline *obj = (struct i915_sync_timeline *) sync_timeline_create(&i915_sync_timeline_ops, sizeof(struct i915_sync_timeline), name); if (!obj) return -EINVAL; obj->pvt.dev = dev; obj->pvt.ring = ring; /* Start the timeline from seqno 0 as this is a special value * that is never assigned to a batch buffer. */ obj->pvt.value = 0; ring->timeline = obj; return 0; }