summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2016-09-22 13:13:31 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2016-10-18 15:24:33 -0400
commitfc4f0ddddb50da826b527b7791028a67539f34c8 (patch)
tree0aa570dda2b3714e4ddc103c48821eb2f9903d10 /drivers/gpu/nvgpu/gk20a/mm_gk20a.c
parent641444188f18dbf56dda980e31f1b404dbb6f166 (diff)
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 <alexw@nvidia.com> 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 <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c7
1 files changed, 5 insertions, 2 deletions
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)
925 bootstrap_base, bootstrap_size, 925 bootstrap_base, bootstrap_size,
926 SZ_4K, 0); 926 SZ_4K, 0);
927 927
928 err = gk20a_page_allocator_init(&g->mm.vidmem.allocator, "vidmem", 928 err = gk20a_page_allocator_init(&g->mm.vidmem.allocator,
929 base, size - base, default_page_size, 0); 929 "vidmem",
930 base, size - base,
931 default_page_size,
932 GPU_ALLOC_4K_VIDMEM_PAGES);
930 if (err) { 933 if (err) {
931 gk20a_err(d, "Failed to register vidmem for size %zu: %d", 934 gk20a_err(d, "Failed to register vidmem for size %zu: %d",
932 size, err); 935 size, err);