diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/mm_vgpu.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c index ed5e1548..c1624ec8 100644 --- a/drivers/gpu/nvgpu/vgpu/mm_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/mm_vgpu.c | |||
@@ -33,11 +33,6 @@ static int vgpu_init_mm_setup_sw(struct gk20a *g) | |||
33 | } | 33 | } |
34 | 34 | ||
35 | mm->g = g; | 35 | mm->g = g; |
36 | mm->big_page_size = gmmu_page_sizes[gmmu_page_size_big]; | ||
37 | mm->compression_page_size = gmmu_page_sizes[gmmu_page_size_big]; | ||
38 | mm->pde_stride = mm->big_page_size << 10; | ||
39 | mm->pde_stride_shift = ilog2(mm->pde_stride); | ||
40 | BUG_ON(mm->pde_stride_shift > 31); /* we have assumptions about this */ | ||
41 | 36 | ||
42 | /*TBD: make channel vm size configurable */ | 37 | /*TBD: make channel vm size configurable */ |
43 | mm->channel.size = 1ULL << NV_GMMU_VA_RANGE; | 38 | mm->channel.size = 1ULL << NV_GMMU_VA_RANGE; |
@@ -202,11 +197,6 @@ static void vgpu_vm_remove_support(struct vm_gk20a *vm) | |||
202 | 197 | ||
203 | mutex_unlock(&vm->update_gmmu_lock); | 198 | mutex_unlock(&vm->update_gmmu_lock); |
204 | 199 | ||
205 | /* release zero page if used */ | ||
206 | if (vm->zero_page_cpuva) | ||
207 | dma_free_coherent(&g->dev->dev, vm->mm->big_page_size, | ||
208 | vm->zero_page_cpuva, vm->zero_page_iova); | ||
209 | |||
210 | /* vm is not used anymore. release it. */ | 200 | /* vm is not used anymore. release it. */ |
211 | kfree(vm); | 201 | kfree(vm); |
212 | } | 202 | } |
@@ -236,7 +226,8 @@ u64 vgpu_bar1_map(struct gk20a *g, struct sg_table **sgt, u64 size) | |||
236 | } | 226 | } |
237 | 227 | ||
238 | /* address space interfaces for the gk20a module */ | 228 | /* address space interfaces for the gk20a module */ |
239 | static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share) | 229 | static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share, |
230 | u32 big_page_size) | ||
240 | { | 231 | { |
241 | struct gk20a_as *as = as_share->as; | 232 | struct gk20a_as *as = as_share->as; |
242 | struct gk20a *g = gk20a_from_as(as); | 233 | struct gk20a *g = gk20a_from_as(as); |
@@ -263,7 +254,7 @@ static int vgpu_vm_alloc_share(struct gk20a_as_share *as_share) | |||
263 | 254 | ||
264 | vm->big_pages = true; | 255 | vm->big_pages = true; |
265 | 256 | ||
266 | vm->va_start = mm->pde_stride; /* create a one pde hole */ | 257 | vm->va_start = big_page_size << 10; /* create a one pde hole */ |
267 | vm->va_limit = mm->channel.size; /* note this means channel.size is | 258 | vm->va_limit = mm->channel.size; /* note this means channel.size is |
268 | really just the max */ | 259 | really just the max */ |
269 | 260 | ||