Lines Matching refs:pt
133 struct sync_pt *pt = dma_fence_to_sync_pt(fence); in timeline_fence_release() local
138 if (!list_empty(&pt->link)) { in timeline_fence_release()
139 list_del(&pt->link); in timeline_fence_release()
140 rb_erase(&pt->node, &parent->pt_tree); in timeline_fence_release()
195 struct sync_pt *pt, *next; in sync_timeline_signal() local
203 list_for_each_entry_safe(pt, next, &obj->pt_list, link) { in sync_timeline_signal()
204 if (!timeline_fence_signaled(&pt->base)) in sync_timeline_signal()
207 dma_fence_get(&pt->base); in sync_timeline_signal()
209 list_move_tail(&pt->link, &signalled); in sync_timeline_signal()
210 rb_erase(&pt->node, &obj->pt_tree); in sync_timeline_signal()
212 dma_fence_signal_locked(&pt->base); in sync_timeline_signal()
217 list_for_each_entry_safe(pt, next, &signalled, link) { in sync_timeline_signal()
218 list_del_init(&pt->link); in sync_timeline_signal()
219 dma_fence_put(&pt->base); in sync_timeline_signal()
236 struct sync_pt *pt; in sync_pt_create() local
238 pt = kzalloc(sizeof(*pt), GFP_KERNEL); in sync_pt_create()
239 if (!pt) in sync_pt_create()
243 dma_fence_init(&pt->base, &timeline_fence_ops, &obj->lock, in sync_pt_create()
245 INIT_LIST_HEAD(&pt->link); in sync_pt_create()
248 if (!dma_fence_is_signaled_locked(&pt->base)) { in sync_pt_create()
257 other = rb_entry(parent, typeof(*pt), node); in sync_pt_create()
266 kfree(pt); in sync_pt_create()
267 pt = other; in sync_pt_create()
273 rb_link_node(&pt->node, parent, p); in sync_pt_create()
274 rb_insert_color(&pt->node, &obj->pt_tree); in sync_pt_create()
276 parent = rb_next(&pt->node); in sync_pt_create()
277 list_add_tail(&pt->link, in sync_pt_create()
278 parent ? &rb_entry(parent, typeof(*pt), node)->link : &obj->pt_list); in sync_pt_create()
283 return pt; in sync_pt_create()
312 struct sync_pt *pt, *next; in sw_sync_debugfs_release() local
316 list_for_each_entry_safe(pt, next, &obj->pt_list, link) { in sw_sync_debugfs_release()
317 dma_fence_set_error(&pt->base, -ENOENT); in sw_sync_debugfs_release()
318 dma_fence_signal_locked(&pt->base); in sw_sync_debugfs_release()
332 struct sync_pt *pt; in sw_sync_ioctl_create_fence() local
344 pt = sync_pt_create(obj, data.value); in sw_sync_ioctl_create_fence()
345 if (!pt) { in sw_sync_ioctl_create_fence()
350 sync_file = sync_file_create(&pt->base); in sw_sync_ioctl_create_fence()
351 dma_fence_put(&pt->base); in sw_sync_ioctl_create_fence()