From efdafc14afdd7736bf271db68acf18f28f25df93 Mon Sep 17 00:00:00 2001 From: Sri Krishna chowdary Date: Thu, 6 Feb 2014 19:29:47 +0530 Subject: 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 Reviewed-on: http://git-master/r/363230 Reviewed-by: Hiroshi Doyu Tested-by: Hiroshi Doyu --- drivers/video/tegra/nvmap/nvmap_dmabuf.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers') 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); -- cgit v1.2.3