summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index e4186c95..f588d112 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -129,7 +129,7 @@ static void gk20a_mm_delete_priv(void *_priv)
129 BUG_ON(!priv->comptag_allocator); 129 BUG_ON(!priv->comptag_allocator);
130 priv->comptag_allocator->free(priv->comptag_allocator, 130 priv->comptag_allocator->free(priv->comptag_allocator,
131 priv->comptags.offset, 131 priv->comptags.offset,
132 priv->comptags.lines); 132 priv->comptags.lines, 1);
133 } 133 }
134 134
135 /* Free buffer states */ 135 /* Free buffer states */
@@ -229,7 +229,7 @@ static int gk20a_alloc_comptags(struct device *dev,
229 229
230 /* store the allocator so we can use it when we free the ctags */ 230 /* store the allocator so we can use it when we free the ctags */
231 priv->comptag_allocator = allocator; 231 priv->comptag_allocator = allocator;
232 err = allocator->alloc(allocator, &offset, lines); 232 err = allocator->alloc(allocator, &offset, lines, 1);
233 if (!err) { 233 if (!err) {
234 priv->comptags.lines = lines; 234 priv->comptags.lines = lines;
235 priv->comptags.offset = offset; 235 priv->comptags.offset = offset;
@@ -837,7 +837,7 @@ u64 gk20a_vm_alloc_va(struct vm_gk20a *vm,
837 /* The vma allocator represents page accounting. */ 837 /* The vma allocator represents page accounting. */
838 num_pages = size >> ilog2(vm->gmmu_page_sizes[gmmu_pgsz_idx]); 838 num_pages = size >> ilog2(vm->gmmu_page_sizes[gmmu_pgsz_idx]);
839 839
840 err = vma->alloc(vma, &start_page_nr, num_pages); 840 err = vma->alloc(vma, &start_page_nr, num_pages, 1);
841 841
842 if (err) { 842 if (err) {
843 gk20a_err(dev_from_vm(vm), 843 gk20a_err(dev_from_vm(vm),
@@ -868,7 +868,7 @@ int gk20a_vm_free_va(struct vm_gk20a *vm,
868 start_page_nr = (u32)(offset >> page_shift); 868 start_page_nr = (u32)(offset >> page_shift);
869 num_pages = (u32)((size + page_size - 1) >> page_shift); 869 num_pages = (u32)((size + page_size - 1) >> page_shift);
870 870
871 err = vma->free(vma, start_page_nr, num_pages); 871 err = vma->free(vma, start_page_nr, num_pages, 1);
872 if (err) { 872 if (err) {
873 gk20a_err(dev_from_vm(vm), 873 gk20a_err(dev_from_vm(vm),
874 "not found: offset=0x%llx, sz=0x%llx", 874 "not found: offset=0x%llx, sz=0x%llx",
@@ -2290,9 +2290,8 @@ static int gk20a_init_vm(struct mm_gk20a *mm,
2290 vm->gmmu_page_sizes[gmmu_page_size_small]>>10); 2290 vm->gmmu_page_sizes[gmmu_page_size_small]>>10);
2291 err = gk20a_allocator_init(&vm->vma[gmmu_page_size_small], 2291 err = gk20a_allocator_init(&vm->vma[gmmu_page_size_small],
2292 alloc_name, 2292 alloc_name,
2293 low_hole_pages, /*start*/ 2293 low_hole_pages, /*start*/
2294 num_pages - low_hole_pages,/* length*/ 2294 num_pages - low_hole_pages);/* length*/
2295 1); /* align */
2296 if (err) 2295 if (err)
2297 goto clean_up_map_pde; 2296 goto clean_up_map_pde;
2298 2297
@@ -2305,8 +2304,7 @@ static int gk20a_init_vm(struct mm_gk20a *mm,
2305 err = gk20a_allocator_init(&vm->vma[gmmu_page_size_big], 2304 err = gk20a_allocator_init(&vm->vma[gmmu_page_size_big],
2306 alloc_name, 2305 alloc_name,
2307 num_pages, /* start */ 2306 num_pages, /* start */
2308 num_pages, /* length */ 2307 num_pages); /* length */
2309 1); /* align */
2310 if (err) 2308 if (err)
2311 goto clean_up_small_allocator; 2309 goto clean_up_small_allocator;
2312 } 2310 }
@@ -2435,7 +2433,7 @@ int gk20a_vm_alloc_space(struct gk20a_as_share *as_share,
2435 ilog2(vm->gmmu_page_sizes[pgsz_idx])); 2433 ilog2(vm->gmmu_page_sizes[pgsz_idx]));
2436 2434
2437 vma = &vm->vma[pgsz_idx]; 2435 vma = &vm->vma[pgsz_idx];
2438 err = vma->alloc(vma, &start_page_nr, args->pages); 2436 err = vma->alloc(vma, &start_page_nr, args->pages, 1);
2439 if (err) { 2437 if (err) {
2440 kfree(va_node); 2438 kfree(va_node);
2441 goto clean_up; 2439 goto clean_up;
@@ -2458,7 +2456,7 @@ int gk20a_vm_alloc_space(struct gk20a_as_share *as_share,
2458 pgsz_idx, true); 2456 pgsz_idx, true);
2459 if (err) { 2457 if (err) {
2460 mutex_unlock(&vm->update_gmmu_lock); 2458 mutex_unlock(&vm->update_gmmu_lock);
2461 vma->free(vma, start_page_nr, args->pages); 2459 vma->free(vma, start_page_nr, args->pages, 1);
2462 kfree(va_node); 2460 kfree(va_node);
2463 goto clean_up; 2461 goto clean_up;
2464 } 2462 }
@@ -2506,7 +2504,7 @@ int gk20a_vm_free_space(struct gk20a_as_share *as_share,
2506 ilog2(vm->gmmu_page_sizes[pgsz_idx])); 2504 ilog2(vm->gmmu_page_sizes[pgsz_idx]));
2507 2505
2508 vma = &vm->vma[pgsz_idx]; 2506 vma = &vm->vma[pgsz_idx];
2509 err = vma->free(vma, start_page_nr, args->pages); 2507 err = vma->free(vma, start_page_nr, args->pages, 1);
2510 2508
2511 if (err) 2509 if (err)
2512 goto clean_up; 2510 goto clean_up;