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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index 0e005f7c..8f2d4079 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -116,6 +116,8 @@ struct gk20a_dmabuf_priv {
116 struct list_head states; 116 struct list_head states;
117}; 117};
118 118
119static void gk20a_vm_remove_support_nofree(struct vm_gk20a *vm);
120
119static void gk20a_mm_delete_priv(void *_priv) 121static void gk20a_mm_delete_priv(void *_priv)
120{ 122{
121 struct gk20a_buffer_state *s, *s_tmp; 123 struct gk20a_buffer_state *s, *s_tmp;
@@ -278,7 +280,7 @@ static void gk20a_remove_mm_support(struct mm_gk20a *mm)
278 inst_block->cpuva = NULL; 280 inst_block->cpuva = NULL;
279 inst_block->iova = 0; 281 inst_block->iova = 0;
280 282
281 gk20a_vm_remove_support(vm); 283 gk20a_vm_remove_support_nofree(vm);
282} 284}
283 285
284int gk20a_init_mm_setup_sw(struct gk20a *g) 286int gk20a_init_mm_setup_sw(struct gk20a *g)
@@ -2076,7 +2078,7 @@ void gk20a_vm_unmap(struct vm_gk20a *vm, u64 offset)
2076 mutex_unlock(&vm->update_gmmu_lock); 2078 mutex_unlock(&vm->update_gmmu_lock);
2077} 2079}
2078 2080
2079void gk20a_vm_remove_support(struct vm_gk20a *vm) 2081static void gk20a_vm_remove_support_nofree(struct vm_gk20a *vm)
2080{ 2082{
2081 struct gk20a *g = vm->mm->g; 2083 struct gk20a *g = vm->mm->g;
2082 struct mapped_buffer_node *mapped_buffer; 2084 struct mapped_buffer_node *mapped_buffer;
@@ -2140,7 +2142,11 @@ void gk20a_vm_remove_support(struct vm_gk20a *vm)
2140 if (vm->zero_page_cpuva) 2142 if (vm->zero_page_cpuva)
2141 dma_free_coherent(&g->dev->dev, vm->big_page_size, 2143 dma_free_coherent(&g->dev->dev, vm->big_page_size,
2142 vm->zero_page_cpuva, vm->zero_page_iova); 2144 vm->zero_page_cpuva, vm->zero_page_iova);
2145}
2143 2146
2147void gk20a_vm_remove_support(struct vm_gk20a *vm)
2148{
2149 gk20a_vm_remove_support_nofree(vm);
2144 /* vm is not used anymore. release it. */ 2150 /* vm is not used anymore. release it. */
2145 kfree(vm); 2151 kfree(vm);
2146} 2152}