From fc4f0ddddb50da826b527b7791028a67539f34c8 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 22 Sep 2016 10:13:31 -0700 Subject: gpu: nvgpu: SLAB allocation for page allocator Add the ability to do "SLAB" allocation in the page allocator. This is generally useful since the allocator manages 64K pages but often we only need 4k chunks (for example when allocating memory for page table entries). Bug 1799159 JIRA DNVGPU-100 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1225322 (cherry picked from commit 299a5639243e44be504391d9155b4ae17d914aa2) Change-Id: Ib3a8558d40ba16bd3a413f4fd38b146beaa3c66b Reviewed-on: http://git-master/r/1227924 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index 1bacb70a..df58feb2 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c @@ -925,8 +925,11 @@ static int gk20a_init_vidmem(struct mm_gk20a *mm) bootstrap_base, bootstrap_size, SZ_4K, 0); - err = gk20a_page_allocator_init(&g->mm.vidmem.allocator, "vidmem", - base, size - base, default_page_size, 0); + err = gk20a_page_allocator_init(&g->mm.vidmem.allocator, + "vidmem", + base, size - base, + default_page_size, + GPU_ALLOC_4K_VIDMEM_PAGES); if (err) { gk20a_err(d, "Failed to register vidmem for size %zu: %d", size, err); -- cgit v1.2.2