diff options
author | Hiro Sugawara <hsugawara@nvidia.com> | 2011-08-26 10:21:45 -0700 |
---|---|---|
committer | Simone Willett <swillett@nvidia.com> | 2011-09-12 17:03:43 -0700 |
commit | f10b613bbd27b8a5f25cbbaebecfe50fd9c0be3f (patch) | |
tree | 01ecac9bf16b471eeba4b91bd0c274b028e26bbc /drivers/video | |
parent | 253660cd414a39b6b0026486089f2ceb1e5d8cf6 (diff) |
arm: tegra: nvmap: Removed dependency on CONFIG_TEGRA_IOVMM
Made kernel boot up with CONFIG_TEGRA_IOVMM=n
Change-Id: I02dead119bc232622abf494d29cbe4d4b13d7131
Reviewed-on: http://git-master/r/49476
Reviewed-by: Simone Willett <swillett@nvidia.com>
Tested-by: Simone Willett <swillett@nvidia.com>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dev.c | 4 | ||||
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_handle.c | 6 |
2 files changed, 9 insertions, 1 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dev.c b/drivers/video/tegra/nvmap/nvmap_dev.c index a21c6730899a..db581229db91 100644 --- a/drivers/video/tegra/nvmap/nvmap_dev.c +++ b/drivers/video/tegra/nvmap/nvmap_dev.c @@ -1185,11 +1185,13 @@ static int nvmap_probe(struct platform_device *pdev) dev->iovmm_master.iovmm = tegra_iovmm_alloc_client(dev_name(&pdev->dev), NULL, &(dev->dev_user)); - if (IS_ERR(dev->iovmm_master.iovmm)) { +#ifdef CONFIG_TEGRA_IOVMM + if (!dev->iovmm_master.iovmm) { e = PTR_ERR(dev->iovmm_master.iovmm); dev_err(&pdev->dev, "couldn't create iovmm client\n"); goto fail; } +#endif dev->vm_rgn = alloc_vm_area(NVMAP_NUM_PTES * PAGE_SIZE); if (!dev->vm_rgn) { e = -ENOMEM; diff --git a/drivers/video/tegra/nvmap/nvmap_handle.c b/drivers/video/tegra/nvmap/nvmap_handle.c index d3fc7492e71c..d06c948f6bd5 100644 --- a/drivers/video/tegra/nvmap/nvmap_handle.c +++ b/drivers/video/tegra/nvmap/nvmap_handle.c @@ -350,6 +350,12 @@ int nvmap_alloc_handle_id(struct nvmap_client *client, h->flags = (flags & NVMAP_HANDLE_CACHE_FLAG); h->align = max_t(size_t, align, L1_CACHE_BYTES); +#ifndef CONFIG_TEGRA_IOVMM + if (heap_mask & NVMAP_HEAP_IOVMM) { + heap_mask &= NVMAP_HEAP_IOVMM; + heap_mask |= NVMAP_HEAP_CARVEOUT_GENERIC; + } +#endif #ifndef CONFIG_NVMAP_CONVERT_CARVEOUT_TO_IOVMM #ifdef CONFIG_NVMAP_ALLOW_SYSMEM /* Allow single pages allocations in system memory to save |