video: tegra: nvmap: Prevent reverting to sysmem for small allocations
authorColin Cross <ccross@android.com>
Wed, 20 Oct 2010 01:33:52 +0000 (18:33 -0700)
committerColin Cross <ccross@android.com>
Wed, 20 Oct 2010 21:30:17 +0000 (14:30 -0700)
Change-Id: Icfe552ad4a968329a1a2959d5b438062587a83b6
Signed-off-by: Colin Cross <ccross@android.com>
drivers/video/tegra/nvmap/nvmap_handle.c

index 725a132ff6fdfd049e4b1e719763ee6350c91641..2f50c0a1b8d3d8bfa7f8f6794a2ad3d8c8fc5146 100644 (file)
@@ -149,8 +149,10 @@ static int handle_page_alloc(struct nvmap_client *client,
 
        prot = nvmap_pgprot(h, pgprot_kernel);
 
+#ifdef CONFIG_NVMAP_ALLOW_SYSMEM
        if (nr_page == 1)
                contiguous = true;
+#endif
 
        h->pgalloc.area = NULL;
        if (contiguous) {