diff options
author | Sri Krishna chowdary <schowdary@nvidia.com> | 2014-02-06 19:29:47 +0530 |
---|---|---|
committer | Hiroshi Doyu <hdoyu@nvidia.com> | 2014-02-26 09:22:08 -0800 |
commit | efdafc14afdd7736bf271db68acf18f28f25df93 (patch) | |
tree | 5c3ff332961b680a65d77d5443cf2aadfd4a0809 /drivers | |
parent | 3f2a67e4fcc11e4a4da53695c848446b87552430 (diff) |
video: tegra: nvmap: skip iova gap
GPU maps chunks that are 258 pages (~1.008 MB) and these get aligned
on 2MB boundaries. So, for each 1MB texture, another 1MB of address space
is lost.
This change skips the iova gap pages from being mapped.
So for each 1 MB texture, only 1 MB of address space is lost.
Bug 1433460
Change-Id: Idde7f6eb4f47320ff4f9c60930ce111542a59f7d
Signed-off-by: Sri Krishna chowdary <schowdary@nvidia.com>
Reviewed-on: http://git-master/r/363230
Reviewed-by: Hiroshi Doyu <hdoyu@nvidia.com>
Tested-by: Hiroshi Doyu <hdoyu@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/tegra/nvmap/nvmap_dmabuf.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/video/tegra/nvmap/nvmap_dmabuf.c b/drivers/video/tegra/nvmap/nvmap_dmabuf.c index 496b7c945afe..9d4ce803b6f9 100644 --- a/drivers/video/tegra/nvmap/nvmap_dmabuf.c +++ b/drivers/video/tegra/nvmap/nvmap_dmabuf.c @@ -206,6 +206,7 @@ static void __nvmap_dmabuf_free_sgt_locked(struct nvmap_handle_sgt *nvmap_sgt) list_del(&nvmap_sgt->maps_entry); if (info->handle->heap_pgalloc) { + dma_set_attr(DMA_ATTR_SKIP_IOVA_GAP, &attrs); dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs); dma_unmap_sg_attrs(nvmap_sgt->dev, nvmap_sgt->sgt->sgl, nvmap_sgt->sgt->nents, @@ -364,6 +365,7 @@ static struct sg_table *nvmap_dmabuf_map_dma_buf( } if (info->handle->heap_pgalloc && info->handle->alloc) { + dma_set_attr(DMA_ATTR_SKIP_IOVA_GAP, &attrs); dma_set_attr(DMA_ATTR_SKIP_CPU_SYNC, &attrs); ents = dma_map_sg_attrs(attach->dev, sgt->sgl, sgt->nents, dir, &attrs); |