From: Tom St Denis <tom.stdenis@amd.com>
Date: Tue, 5 Sep 2017 07:30:59 -0400
Subject: drm/ttm: Fix configuration error around populate_and_map() functions
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Git-commit: 7a9667ae197460e6c9c3bb432fe68c708fce6259
Patch-mainline: v4.15-rc1
References: FATE#326289 FATE#326079 FATE#326049 FATE#322398 FATE#326166
Fixed kbuild errors when IOMMU/SWIOTLB are disabled.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Acked-by: Petr Tesarik <ptesarik@suse.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 2 ++
1 file changed, 2 insertions(+)
--- 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 *
}
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(stru
ttm_pool_unpopulate(&tt->ttm);
}
EXPORT_SYMBOL(ttm_unmap_and_unpopulate_pages);
+#endif
int ttm_page_alloc_debugfs(struct seq_file *m, void *data)
{