Lines Matching full:fence
32 fence_notify(struct i915_sw_fence *fence, enum i915_sw_fence_notify state) in fence_notify() argument
39 /* Leave the fence for the caller to free it after testing */ in fence_notify()
48 struct i915_sw_fence *fence; in alloc_fence() local
50 fence = kmalloc(sizeof(*fence), GFP_KERNEL); in alloc_fence()
51 if (!fence) in alloc_fence()
54 i915_sw_fence_init(fence, fence_notify); in alloc_fence()
55 return fence; in alloc_fence()
58 static void free_fence(struct i915_sw_fence *fence) in free_fence() argument
60 i915_sw_fence_fini(fence); in free_fence()
61 kfree(fence); in free_fence()
64 static int __test_self(struct i915_sw_fence *fence) in __test_self() argument
66 if (i915_sw_fence_done(fence)) in __test_self()
69 i915_sw_fence_commit(fence); in __test_self()
70 if (!i915_sw_fence_done(fence)) in __test_self()
73 i915_sw_fence_wait(fence); in __test_self()
74 if (!i915_sw_fence_done(fence)) in __test_self()
82 struct i915_sw_fence *fence; in test_self() local
86 fence = alloc_fence(); in test_self()
87 if (!fence) in test_self()
90 ret = __test_self(fence); in test_self()
92 free_fence(fence); in test_self()
155 pr_err("fence C not done\n"); in test_dag()
159 pr_err("fence B not done\n"); in test_dag()
163 pr_err("fence A not done\n"); in test_dag()
194 pr_err("Incorrectly reported fence A was complete before await\n"); in test_AB()
206 pr_err("Fence B is not done\n"); in test_AB()
211 pr_err("Fence A is not done\n"); in test_AB()
249 pr_err("Incorrectly reported fence B was complete before await\n"); in test_ABC()
257 pr_err("Incorrectly reported fence C was complete before await\n"); in test_ABC()
264 pr_err("Fence A completed early\n"); in test_ABC()
270 pr_err("Fence B completed early\n"); in test_ABC()
275 pr_err("Fence A completed early (after signaling B)\n"); in test_ABC()
283 pr_err("Fence C not done\n"); in test_ABC()
287 pr_err("Fence B not done\n"); in test_ABC()
291 pr_err("Fence A not done\n"); in test_ABC()
346 pr_err("Fence A completed early\n"); in test_AB_C()
351 pr_err("Fence B completed early\n"); in test_AB_C()
357 pr_err("Fence C not done\n"); in test_AB_C()
362 pr_err("Fence B not done\n"); in test_AB_C()
367 pr_err("Fence A not done\n"); in test_AB_C()
385 /* Test multiple event sources (A,B) for a single fence (C) */ in test_C_AB()
427 pr_err("Fence A not done\n"); in test_C_AB()
432 pr_err("Fence B not done\n"); in test_C_AB()
437 pr_err("Fence C not done\n"); in test_C_AB()
486 pr_err("Fence[%d] completed early\n", i); in test_chain()
493 pr_err("Fence[%d] is not done\n", i); in test_chain()
586 if (!i915_sw_fence_done(&tf.fence)) { in test_timer()
587 pr_err("Fence with immediate expiration not signaled\n"); in test_timer()
596 if (i915_sw_fence_done(&tf.fence)) { in test_timer()
597 pr_err("Fence with future expiration (%lu jiffies) already signaled\n", delay); in test_timer()
602 i915_sw_fence_wait(&tf.fence); in test_timer()
605 if (!i915_sw_fence_done(&tf.fence)) { in test_timer()
606 pr_err("Fence not signaled after wait\n"); in test_timer()
610 pr_err("Fence signaled too early, target=%lu, now=%lu\n", in test_timer()
626 static const char *mock_name(struct dma_fence *fence) in mock_name() argument
652 struct i915_sw_fence *fence; in wrap_dma_fence() local
655 fence = alloc_fence(); in wrap_dma_fence()
656 if (!fence) in wrap_dma_fence()
659 err = i915_sw_fence_await_dma_fence(fence, dma, delay, GFP_NOWAIT); in wrap_dma_fence()
660 i915_sw_fence_commit(fence); in wrap_dma_fence()
662 free_fence(fence); in wrap_dma_fence()
666 return fence; in wrap_dma_fence()
699 /* We round the timeout for the fence up to the next second */ in test_dma_fence()
718 pr_err("Timeout fence unsignaled!\n"); in test_dma_fence()
723 pr_err("No timeout fence signaled!\n"); in test_dma_fence()