Skip to contentSkip to conversation

drm/ttm: Fix configuration error around populate_and_map() functions

PATCH In review Tom St Denis 2 participants 2 messages Sep 5, 2017 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/ttm: Fix configuration error around populate_and_map() functions

Fixed kbuild errors when IOMMU/SWIOTLB are disabled.

---
 drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/ttm/ttm_page_alloc.c +2 -0
index 6a660d196d87..052e1f102113 100644
@@ -920,6 +920,7 @@ void ttm_pool_unpopulate(struct ttm_tt *ttm)
 }
 EXPORT_SYMBOL(ttm_pool_unpopulate);
 
+#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
 int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt)
 {
 	unsigned i;
@@ -960,6 +961,7 @@ void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt)
 	ttm_pool_unpopulate(&tt->ttm);
 }
 EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages);
+#endif
 
 int ttm_page_alloc_debugfs(struct seq_file *m, void *data)
 {
Signature · 6 lines
2.12.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

A message that is not in the archive (sent off-list or not yet received): [email protected]

Reviewed-by
#2 lore raw

Am 05.09.2017 um 13:32 schrieb Tom St Denis:

Quoted 3 lines

Fixed kbuild errors when IOMMU/SWIOTLB are disabled.

Quoted 17 lines
---
  drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++
  1 file changed, 2 insertions(+)
drivers/gpu/drm/ttm/ttm_page_alloc.c +1 -0
index 6a660d196d87..052e1f102113 100644
@@ -920,6 +920,7 @@ void ttm_pool_unpopulate(struct ttm_tt *ttm)
  }
  EXPORT_SYMBOL(ttm_pool_unpopulate);
 
+#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
  int ttm_populate_and_map_pages(struct device *dev, struct ttm_dma_tt *tt)
  {
  	unsigned i;

drivers/gpu/drm/ttm/ttm_page_alloc.c void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt) · line 967

Quoted 7 lines
drivers/gpu/drm/ttm/ttm_page_alloc.c +1 -0
@@ -960,6 +961,7 @@ void ttm_unmap_and_unpopulate_pages(struct device *dev, struct ttm_dma_tt *tt)
  	ttm_pool_unpopulate(&tt->ttm);
  }
  EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages);
+#endif
 
  int ttm_page_alloc_debugfs(struct seq_file *m, void *data)
  {

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx