This source file includes following definitions.
- ttm_dma_page_alloc_init
- ttm_dma_page_alloc_fini
- ttm_dma_page_alloc_debugfs
- ttm_dma_populate
- ttm_dma_unpopulate
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26 #ifndef TTM_PAGE_ALLOC
27 #define TTM_PAGE_ALLOC
28
29 #include <drm/ttm/ttm_bo_driver.h>
30 #include <drm/ttm/ttm_memory.h>
31
32 struct device;
33
34
35
36
37 int ttm_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages);
38
39
40
41 void ttm_page_alloc_fini(void);
42
43
44
45
46
47
48
49
50 int ttm_pool_populate(struct ttm_tt *ttm, struct ttm_operation_ctx *ctx);
51
52
53
54
55
56
57
58
59 void ttm_pool_unpopulate(struct ttm_tt *ttm);
60
61
62
63
64 int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt,
65 struct ttm_operation_ctx *ctx);
66
67
68
69
70 void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt);
71
72
73
74
75 int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
76
77 #if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
78
79
80
81 int ttm_dma_page_alloc_init(struct ttm_mem_global *glob, unsigned max_pages);
82
83
84
85
86 void ttm_dma_page_alloc_fini(void);
87
88
89
90
91 int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data);
92
93 int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev,
94 struct ttm_operation_ctx *ctx);
95 void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev);
96
97 #else
98 static inline int ttm_dma_page_alloc_init(struct ttm_mem_global *glob,
99 unsigned max_pages)
100 {
101 return -ENODEV;
102 }
103
104 static inline void ttm_dma_page_alloc_fini(void) { return; }
105
106 static inline int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data)
107 {
108 return 0;
109 }
110 static inline int ttm_dma_populate(struct ttm_dma_tt *ttm_dma,
111 struct device *dev,
112 struct ttm_operation_ctx *ctx)
113 {
114 return -ENOMEM;
115 }
116 static inline void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma,
117 struct device *dev)
118 {
119 }
120 #endif
121
122 #endif