diff options
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 | ||||
-rw-r--r-- | include/drm/ttm/ttm_page_alloc.h | 32 |
2 files changed, 10 insertions, 24 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 316f831ad5f0..6d48ccca0b38 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c | |||
@@ -1058,7 +1058,6 @@ void ttm_pool_unpopulate(struct ttm_tt *ttm) | |||
1058 | } | 1058 | } |
1059 | EXPORT_SYMBOL(ttm_pool_unpopulate); | 1059 | EXPORT_SYMBOL(ttm_pool_unpopulate); |
1060 | 1060 | ||
1061 | #if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU) | ||
1062 | int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt) | 1061 | int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt) |
1063 | { | 1062 | { |
1064 | unsigned i, j; | 1063 | unsigned i, j; |
@@ -1129,7 +1128,6 @@ void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt) | |||
1129 | ttm_pool_unpopulate(&tt->ttm); | 1128 | ttm_pool_unpopulate(&tt->ttm); |
1130 | } | 1129 | } |
1131 | EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages); | 1130 | EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages); |
1132 | #endif | ||
1133 | 1131 | ||
1134 | int ttm_page_alloc_debugfs(struct seq_file *m, void *data) | 1132 | int ttm_page_alloc_debugfs(struct seq_file *m, void *data) |
1135 | { | 1133 | { |
diff --git a/include/drm/ttm/ttm_page_alloc.h b/include/drm/ttm/ttm_page_alloc.h index 38a2b4770c35..593811362a91 100644 --- a/include/drm/ttm/ttm_page_alloc.h +++ b/include/drm/ttm/ttm_page_alloc.h | |||
@@ -59,11 +59,20 @@ int ttm_pool_populate(struct ttm_tt *ttm); | |||
59 | void ttm_pool_unpopulate(struct ttm_tt *ttm); | 59 | void ttm_pool_unpopulate(struct ttm_tt *ttm); |
60 | 60 | ||
61 | /** | 61 | /** |
62 | * Populates and DMA maps pages to fullfil a ttm_dma_populate() request | ||
63 | */ | ||
64 | int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt); | ||
65 | |||
66 | /** | ||
67 | * Unpopulates and DMA unmaps pages as part of a | ||
68 | * ttm_dma_unpopulate() request */ | ||
69 | void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt); | ||
70 | |||
71 | /** | ||
62 | * Output the state of pools to debugfs file | 72 | * Output the state of pools to debugfs file |
63 | */ | 73 | */ |
64 | int ttm_page_alloc_debugfs(struct seq_file *m, void *data); | 74 | int ttm_page_alloc_debugfs(struct seq_file *m, void *data); |
65 | 75 | ||
66 | |||
67 | #if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU) | 76 | #if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU) |
68 | /** | 77 | /** |
69 | * Initialize pool allocator. | 78 | * Initialize pool allocator. |
@@ -83,17 +92,6 @@ int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data); | |||
83 | int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev); | 92 | int ttm_dma_populate(struct ttm_dma_tt *ttm_dma, struct device *dev); |
84 | void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev); | 93 | void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, struct device *dev); |
85 | 94 | ||
86 | |||
87 | /** | ||
88 | * Populates and DMA maps pages to fullfil a ttm_dma_populate() request | ||
89 | */ | ||
90 | int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt); | ||
91 | |||
92 | /** | ||
93 | * Unpopulates and DMA unmaps pages as part of a | ||
94 | * ttm_dma_unpopulate() request */ | ||
95 | void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt); | ||
96 | |||
97 | #else | 95 | #else |
98 | static inline int ttm_dma_page_alloc_init(struct ttm_mem_global *glob, | 96 | static inline int ttm_dma_page_alloc_init(struct ttm_mem_global *glob, |
99 | unsigned max_pages) | 97 | unsigned max_pages) |
@@ -116,16 +114,6 @@ static inline void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma, | |||
116 | struct device *dev) | 114 | struct device *dev) |
117 | { | 115 | { |
118 | } | 116 | } |
119 | |||
120 | static inline int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt) | ||
121 | { | ||
122 | return -ENOMEM; | ||
123 | } | ||
124 | |||
125 | static inline void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt) | ||
126 | { | ||
127 | } | ||
128 | |||
129 | #endif | 117 | #endif |
130 | 118 | ||
131 | #endif | 119 | #endif |