提交 7aeb7448 编写于 作者: T Thomas Hellstrom

drm/ttm: Enable the dma page pool also for intel IOMMUs

Used by the vmwgfx driver
Signed-off-by: NThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: NJakob Bornecrantz <jakob@vmware.com>
Reviewed-by: NKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
上级 4695b039
...@@ -5,10 +5,6 @@ ccflags-y := -Iinclude/drm ...@@ -5,10 +5,6 @@ ccflags-y := -Iinclude/drm
ttm-y := ttm_agp_backend.o ttm_memory.o ttm_tt.o ttm_bo.o \ ttm-y := ttm_agp_backend.o ttm_memory.o ttm_tt.o ttm_bo.o \
ttm_bo_util.o ttm_bo_vm.o ttm_module.o \ ttm_bo_util.o ttm_bo_vm.o ttm_module.o \
ttm_object.o ttm_lock.o ttm_execbuf_util.o ttm_page_alloc.o \ ttm_object.o ttm_lock.o ttm_execbuf_util.o ttm_page_alloc.o \
ttm_bo_manager.o ttm_bo_manager.o ttm_page_alloc_dma.o
ifeq ($(CONFIG_SWIOTLB),y)
ttm-y += ttm_page_alloc_dma.o
endif
obj-$(CONFIG_DRM_TTM) += ttm.o obj-$(CONFIG_DRM_TTM) += ttm.o
...@@ -33,6 +33,7 @@ ...@@ -33,6 +33,7 @@
* when freed). * when freed).
*/ */
#if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
#define pr_fmt(fmt) "[TTM] " fmt #define pr_fmt(fmt) "[TTM] " fmt
#include <linux/dma-mapping.h> #include <linux/dma-mapping.h>
...@@ -1142,3 +1143,5 @@ int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data) ...@@ -1142,3 +1143,5 @@ int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(ttm_dma_page_alloc_debugfs); EXPORT_SYMBOL_GPL(ttm_dma_page_alloc_debugfs);
#endif
...@@ -62,7 +62,7 @@ extern void ttm_pool_unpopulate(struct ttm_tt *ttm); ...@@ -62,7 +62,7 @@ extern void ttm_pool_unpopulate(struct ttm_tt *ttm);
extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data); extern int ttm_page_alloc_debugfs(struct seq_file *m, void *data);
#ifdef CONFIG_SWIOTLB #if defined(CONFIG_SWIOTLB) || defined(CONFIG_INTEL_IOMMU)
/** /**
* Initialize pool allocator. * Initialize pool allocator.
*/ */
...@@ -94,6 +94,15 @@ static inline int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data) ...@@ -94,6 +94,15 @@ static inline int ttm_dma_page_alloc_debugfs(struct seq_file *m, void *data)
{ {
return 0; return 0;
} }
static inline int ttm_dma_populate(struct ttm_dma_tt *ttm_dma,
struct device *dev)
{
return -ENOMEM;
}
static inline void ttm_dma_unpopulate(struct ttm_dma_tt *ttm_dma,
struct device *dev)
{
}
#endif #endif
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册