diff options
author | Hiroshi DOYU <hdoyu@nvidia.com> | 2012-02-21 16:47:08 +0200 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-07-16 02:24:12 -0700 |
commit | b8b0b4c42fc77d94b8deadaa46f795784f3bbb5e (patch) | |
tree | 0b351c35e4f8b2308efc02564a372644003157b2 /drivers | |
parent | 7653853c08f7850aa229a363a23399f9a7495306 (diff) |
video: tegra: nvmap: Make IOMMU/IOVMM selectable in Kconfig
This patch allows nvmap to use the standard IOMMU API as its backend
engine instead of the legacy tegra IOVMM by Kconfig.
Enable TEGRA_IOMMU_{GART,SMMU} under IOMMU in config, and it
automatically disables IOVMM, instead.
Change-Id: I71112ef8072591aac4a93075623ca31c8851a960
Signed-off-by: Hiroshi DOYU <hdoyu@nvidia.com>
Reviewed-on: http://git-master/r/114217
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/tegra/Kconfig | 7 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dev.c | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/drivers/video/tegra/Kconfig b/drivers/video/tegra/Kconfig index d02109c39af0..6109078deb47 100644 --- a/drivers/video/tegra/Kconfig +++ b/drivers/video/tegra/Kconfig @@ -50,6 +50,7 @@ config TEGRA_DC_EXTENSIONS config TEGRA_NVMAP bool "Tegra GPU memory management driver (nvmap)" + select ARM_DMA_USE_IOMMU if IOMMU_API default y help Say Y here to include the memory management driver for the Tegra @@ -57,7 +58,7 @@ config TEGRA_NVMAP config NVMAP_RECLAIM_UNPINNED_VM bool "Virtualize IOVMM memory in nvmap" - depends on TEGRA_NVMAP && TEGRA_IOVMM + depends on TEGRA_NVMAP && (TEGRA_IOVMM || IOMMU_API) default y help Say Y here to enable nvmap to reclaim I/O virtual memory after @@ -76,7 +77,7 @@ config NVMAP_ALLOW_SYSMEM config NVMAP_HIGHMEM_ONLY bool "Use only HIGHMEM for nvmap" - depends on TEGRA_NVMAP && (NVMAP_ALLOW_SYSMEM || TEGRA_IOVMM) && HIGHMEM + depends on TEGRA_NVMAP && (NVMAP_ALLOW_SYSMEM || TEGRA_IOVMM || IOMMU_API) && HIGHMEM default n help Say Y here to restrict nvmap system memory allocations (both @@ -142,7 +143,7 @@ config TEGRA_DSI config NVMAP_CONVERT_CARVEOUT_TO_IOVMM bool "Convert carveout to IOVMM" - depends on TEGRA_NVMAP && TEGRA_IOVMM_SMMU + depends on TEGRA_NVMAP && (TEGRA_IOVMM || IOMMU_API) default y help Say Y here to force to convert carveout memory requests to diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index 758bc3d8cba0..98b0bcc18ba5 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -1192,7 +1192,7 @@ static int nvmap_probe(struct platform_device *pdev) dev->iovmm_master.iovmm = tegra_iovmm_alloc_client(&pdev->dev, NULL, &(dev->dev_user)); -#ifdef CONFIG_TEGRA_IOVMM +#if defined(CONFIG_TEGRA_IOVMM) || defined(CONFIG_IOMMU_API) if (!dev->iovmm_master.iovmm) { e = PTR_ERR(dev->iovmm_master.iovmm); dev_err(&pdev->dev, "couldn't create iovmm client\n"); |