This source file includes following definitions.
- to_dma_fence_chain
1
2
3
4
5
6
7
8
9
10 #ifndef __LINUX_DMA_FENCE_CHAIN_H
11 #define __LINUX_DMA_FENCE_CHAIN_H
12
13 #include <linux/dma-fence.h>
14 #include <linux/irq_work.h>
15
16
17
18
19
20
21
22
23
24
25
26 struct dma_fence_chain {
27 struct dma_fence base;
28 spinlock_t lock;
29 struct dma_fence __rcu *prev;
30 u64 prev_seqno;
31 struct dma_fence *fence;
32 struct dma_fence_cb cb;
33 struct irq_work work;
34 };
35
36 extern const struct dma_fence_ops dma_fence_chain_ops;
37
38
39
40
41
42
43
44
45 static inline struct dma_fence_chain *
46 to_dma_fence_chain(struct dma_fence *fence)
47 {
48 if (!fence || fence->ops != &dma_fence_chain_ops)
49 return NULL;
50
51 return container_of(fence, struct dma_fence_chain, base);
52 }
53
54
55
56
57
58
59
60
61
62 #define dma_fence_chain_for_each(iter, head) \
63 for (iter = dma_fence_get(head); iter; \
64 iter = dma_fence_chain_walk(iter))
65
66 struct dma_fence *dma_fence_chain_walk(struct dma_fence *fence);
67 int dma_fence_chain_find_seqno(struct dma_fence **pfence, uint64_t seqno);
68 void dma_fence_chain_init(struct dma_fence_chain *chain,
69 struct dma_fence *prev,
70 struct dma_fence *fence,
71 uint64_t seqno);
72
73 #endif