mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: chip specific init_inst_block
Add function pointer to add chip specific init_inst_block. Update this function pointer for gk20a and gm20b. JIRA GV11B-21 Change-Id: I74ca6a8b4d5d1ed36f7b25b7f62361c2789b9540 Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/1254875 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
499aaafa97
commit
ef95e43d97
@@ -129,9 +129,11 @@ static void free_channel(struct fifo_gk20a *f,
|
||||
|
||||
int channel_gk20a_commit_va(struct channel_gk20a *c)
|
||||
{
|
||||
struct gk20a *g = c->g;
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
gk20a_init_inst_block(&c->inst_block, c->vm,
|
||||
g->ops.mm.init_inst_block(&c->inst_block, c->vm,
|
||||
c->vm->gmmu_page_sizes[gmmu_page_size_big]);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -579,6 +579,8 @@ struct gpu_ops {
|
||||
u32 flags);
|
||||
int (*bar1_bind)(struct gk20a *g, struct mem_desc *bar1_inst);
|
||||
size_t (*get_vidmem_size)(struct gk20a *g);
|
||||
void (*init_inst_block)(struct mem_desc *inst_block,
|
||||
struct vm_gk20a *vm, u32 big_page_size);
|
||||
} mm;
|
||||
struct {
|
||||
int (*init_therm_setup_hw)(struct gk20a *g);
|
||||
|
||||
@@ -4855,7 +4855,7 @@ static int gk20a_init_bar1_vm(struct mm_gk20a *mm)
|
||||
err = gk20a_alloc_inst_block(g, inst_block);
|
||||
if (err)
|
||||
goto clean_up_va;
|
||||
gk20a_init_inst_block(inst_block, vm, big_page_size);
|
||||
g->ops.mm.init_inst_block(inst_block, vm, big_page_size);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -4884,7 +4884,7 @@ static int gk20a_init_system_vm(struct mm_gk20a *mm)
|
||||
err = gk20a_alloc_inst_block(g, inst_block);
|
||||
if (err)
|
||||
goto clean_up_va;
|
||||
gk20a_init_inst_block(inst_block, vm, big_page_size);
|
||||
g->ops.mm.init_inst_block(inst_block, vm, big_page_size);
|
||||
|
||||
return 0;
|
||||
|
||||
@@ -4903,7 +4903,7 @@ static int gk20a_init_hwpm(struct mm_gk20a *mm)
|
||||
err = gk20a_alloc_inst_block(g, inst_block);
|
||||
if (err)
|
||||
return err;
|
||||
gk20a_init_inst_block(inst_block, vm, 0);
|
||||
g->ops.mm.init_inst_block(inst_block, vm, 0);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -5383,5 +5383,6 @@ void gk20a_init_mm(struct gpu_ops *gops)
|
||||
gops->mm.init_pdb = gk20a_mm_init_pdb;
|
||||
gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;
|
||||
gops->mm.bar1_bind = gk20a_mm_bar1_bind;
|
||||
gops->mm.init_inst_block = gk20a_init_inst_block;
|
||||
gops->mm.is_bar1_supported = gk20a_mm_is_bar1_supported;
|
||||
}
|
||||
|
||||
@@ -192,4 +192,5 @@ void gm20b_init_mm(struct gpu_ops *gops)
|
||||
gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;
|
||||
gops->mm.bar1_bind = gm20b_mm_bar1_bind;
|
||||
gops->mm.is_bar1_supported = gm20b_mm_is_bar1_supported;
|
||||
gops->mm.init_inst_block = gk20a_init_inst_block;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user