This source file includes following definitions.
- dma_fence_is_array
- to_dma_fence_array
1
2
3
4
5
6
7
8
9
10
11
12 #ifndef __LINUX_DMA_FENCE_ARRAY_H
13 #define __LINUX_DMA_FENCE_ARRAY_H
14
15 #include <linux/dma-fence.h>
16 #include <linux/irq_work.h>
17
18
19
20
21
22
23 struct dma_fence_array_cb {
24 struct dma_fence_cb cb;
25 struct dma_fence_array *array;
26 };
27
28
29
30
31
32
33
34
35
36
37 struct dma_fence_array {
38 struct dma_fence base;
39
40 spinlock_t lock;
41 unsigned num_fences;
42 atomic_t num_pending;
43 struct dma_fence **fences;
44
45 struct irq_work work;
46 };
47
48 extern const struct dma_fence_ops dma_fence_array_ops;
49
50
51
52
53
54
55
56 static inline bool dma_fence_is_array(struct dma_fence *fence)
57 {
58 return fence->ops == &dma_fence_array_ops;
59 }
60
61
62
63
64
65
66
67
68 static inline struct dma_fence_array *
69 to_dma_fence_array(struct dma_fence *fence)
70 {
71 if (fence->ops != &dma_fence_array_ops)
72 return NULL;
73
74 return container_of(fence, struct dma_fence_array, base);
75 }
76
77 struct dma_fence_array *dma_fence_array_create(int num_fences,
78 struct dma_fence **fences,
79 u64 context, unsigned seqno,
80 bool signal_on_any);
81
82 bool dma_fence_match_context(struct dma_fence *fence, u64 context);
83
84 #endif