diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_gk20a.c | 4 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 7 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gm20b/mm_gm20b.c | 1 |
4 files changed, 10 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c index 6207ab23..8b5a1a9e 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c | |||
@@ -129,9 +129,11 @@ static void free_channel(struct fifo_gk20a *f, | |||
129 | 129 | ||
130 | int channel_gk20a_commit_va(struct channel_gk20a *c) | 130 | int channel_gk20a_commit_va(struct channel_gk20a *c) |
131 | { | 131 | { |
132 | struct gk20a *g = c->g; | ||
133 | |||
132 | gk20a_dbg_fn(""); | 134 | gk20a_dbg_fn(""); |
133 | 135 | ||
134 | gk20a_init_inst_block(&c->inst_block, c->vm, | 136 | g->ops.mm.init_inst_block(&c->inst_block, c->vm, |
135 | c->vm->gmmu_page_sizes[gmmu_page_size_big]); | 137 | c->vm->gmmu_page_sizes[gmmu_page_size_big]); |
136 | 138 | ||
137 | return 0; | 139 | return 0; |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index dd64e3b2..5539ca62 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -579,6 +579,8 @@ struct gpu_ops { | |||
579 | u32 flags); | 579 | u32 flags); |
580 | int (*bar1_bind)(struct gk20a *g, struct mem_desc *bar1_inst); | 580 | int (*bar1_bind)(struct gk20a *g, struct mem_desc *bar1_inst); |
581 | size_t (*get_vidmem_size)(struct gk20a *g); | 581 | size_t (*get_vidmem_size)(struct gk20a *g); |
582 | void (*init_inst_block)(struct mem_desc *inst_block, | ||
583 | struct vm_gk20a *vm, u32 big_page_size); | ||
582 | } mm; | 584 | } mm; |
583 | struct { | 585 | struct { |
584 | int (*init_therm_setup_hw)(struct gk20a *g); | 586 | int (*init_therm_setup_hw)(struct gk20a *g); |
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c index fcd5d664..5faff04b 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c | |||
@@ -4855,7 +4855,7 @@ static int gk20a_init_bar1_vm(struct mm_gk20a *mm) | |||
4855 | err = gk20a_alloc_inst_block(g, inst_block); | 4855 | err = gk20a_alloc_inst_block(g, inst_block); |
4856 | if (err) | 4856 | if (err) |
4857 | goto clean_up_va; | 4857 | goto clean_up_va; |
4858 | gk20a_init_inst_block(inst_block, vm, big_page_size); | 4858 | g->ops.mm.init_inst_block(inst_block, vm, big_page_size); |
4859 | 4859 | ||
4860 | return 0; | 4860 | return 0; |
4861 | 4861 | ||
@@ -4884,7 +4884,7 @@ static int gk20a_init_system_vm(struct mm_gk20a *mm) | |||
4884 | err = gk20a_alloc_inst_block(g, inst_block); | 4884 | err = gk20a_alloc_inst_block(g, inst_block); |
4885 | if (err) | 4885 | if (err) |
4886 | goto clean_up_va; | 4886 | goto clean_up_va; |
4887 | gk20a_init_inst_block(inst_block, vm, big_page_size); | 4887 | g->ops.mm.init_inst_block(inst_block, vm, big_page_size); |
4888 | 4888 | ||
4889 | return 0; | 4889 | return 0; |
4890 | 4890 | ||
@@ -4903,7 +4903,7 @@ static int gk20a_init_hwpm(struct mm_gk20a *mm) | |||
4903 | err = gk20a_alloc_inst_block(g, inst_block); | 4903 | err = gk20a_alloc_inst_block(g, inst_block); |
4904 | if (err) | 4904 | if (err) |
4905 | return err; | 4905 | return err; |
4906 | gk20a_init_inst_block(inst_block, vm, 0); | 4906 | g->ops.mm.init_inst_block(inst_block, vm, 0); |
4907 | 4907 | ||
4908 | return 0; | 4908 | return 0; |
4909 | } | 4909 | } |
@@ -5383,5 +5383,6 @@ void gk20a_init_mm(struct gpu_ops *gops) | |||
5383 | gops->mm.init_pdb = gk20a_mm_init_pdb; | 5383 | gops->mm.init_pdb = gk20a_mm_init_pdb; |
5384 | gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw; | 5384 | gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw; |
5385 | gops->mm.bar1_bind = gk20a_mm_bar1_bind; | 5385 | gops->mm.bar1_bind = gk20a_mm_bar1_bind; |
5386 | gops->mm.init_inst_block = gk20a_init_inst_block; | ||
5386 | gops->mm.is_bar1_supported = gk20a_mm_is_bar1_supported; | 5387 | gops->mm.is_bar1_supported = gk20a_mm_is_bar1_supported; |
5387 | } | 5388 | } |
diff --git a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c index 36d1192a..e1a135f8 100644 --- a/drivers/gpu/nvgpu/gm20b/mm_gm20b.c +++ b/drivers/gpu/nvgpu/gm20b/mm_gm20b.c | |||
@@ -192,4 +192,5 @@ void gm20b_init_mm(struct gpu_ops *gops) | |||
192 | gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw; | 192 | gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw; |
193 | gops->mm.bar1_bind = gm20b_mm_bar1_bind; | 193 | gops->mm.bar1_bind = gm20b_mm_bar1_bind; |
194 | gops->mm.is_bar1_supported = gm20b_mm_is_bar1_supported; | 194 | gops->mm.is_bar1_supported = gm20b_mm_is_bar1_supported; |
195 | gops->mm.init_inst_block = gk20a_init_inst_block; | ||
195 | } | 196 | } |