From: Tom St Denis Date: Tue, 5 Sep 2017 11:30:59 +0000 (-0400) Subject: drm/ttm: Fix configuration error around populate_and_map() functions X-Git-Tag: iommu-v4.15-rc3~17^2~46^2~145 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=7a9667ae197460e6c9c3bb432fe68c708fce6259;p=users%2Fdwmw2%2Flinux.git drm/ttm: Fix configuration error around populate_and_map() functions Fixed kbuild errors when IOMMU/SWIOTLB are disabled. Signed-off-by: Tom St Denis Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c index 6a660d196d877..052e1f102113f 100644 --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c @@ -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) {