mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: setup chip specific mm hw init
Add support for setting-up mm hw init per soc. Bug 1587825 Change-Id: Ie5c5e49a767cfb14e3dbbb6902349284cd3dca95 Signed-off-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-on: http://git-master/r/681784 Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
This commit is contained in:
committed by
Dan Willemsen
parent
cdbe8d1fc1
commit
173aceb5b7
@@ -334,6 +334,7 @@ struct gpu_ops {
|
||||
void *inst_ptr, int size);
|
||||
u32 (*get_big_page_sizes)(void);
|
||||
u32 (*get_physical_addr_bits)(struct gk20a *g);
|
||||
int (*init_mm_setup_hw)(struct gk20a *g);
|
||||
int (*init_bar2_vm)(struct gk20a *g);
|
||||
int (*init_bar2_mm_hw_setup)(struct gk20a *g);
|
||||
const struct gk20a_mmu_level *
|
||||
|
||||
@@ -391,7 +391,7 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
|
||||
}
|
||||
|
||||
/* make sure gk20a_init_mm_support is called before */
|
||||
static int gk20a_init_mm_setup_hw(struct gk20a *g)
|
||||
int gk20a_init_mm_setup_hw(struct gk20a *g)
|
||||
{
|
||||
struct mm_gk20a *mm = &g->mm;
|
||||
struct inst_desc *inst_block = &mm->bar1.inst_block;
|
||||
@@ -435,9 +435,8 @@ int gk20a_init_mm_support(struct gk20a *g)
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
err = gk20a_init_mm_setup_hw(g);
|
||||
if (err)
|
||||
return err;
|
||||
if (g->ops.mm.init_mm_setup_hw)
|
||||
err = g->ops.mm.init_mm_setup_hw(g);
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -3116,5 +3115,6 @@ void gk20a_init_mm(struct gpu_ops *gops)
|
||||
gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits;
|
||||
gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels;
|
||||
gops->mm.init_pdb = gk20a_mm_init_pdb;
|
||||
gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;
|
||||
}
|
||||
|
||||
|
||||
@@ -319,6 +319,7 @@ struct channel_gk20a;
|
||||
|
||||
int gk20a_init_mm_support(struct gk20a *g);
|
||||
int gk20a_init_mm_setup_sw(struct gk20a *g);
|
||||
int gk20a_init_mm_setup_hw(struct gk20a *g);
|
||||
|
||||
int gk20a_mm_fb_flush(struct gk20a *g);
|
||||
void gk20a_mm_l2_flush(struct gk20a *g, bool invalidate);
|
||||
|
||||
@@ -126,4 +126,5 @@ void gm20b_init_mm(struct gpu_ops *gops)
|
||||
gops->mm.get_physical_addr_bits = gk20a_mm_get_physical_addr_bits;
|
||||
gops->mm.get_mmu_levels = gk20a_mm_get_mmu_levels;
|
||||
gops->mm.init_pdb = gk20a_mm_init_pdb;
|
||||
gops->mm.init_mm_setup_hw = gk20a_init_mm_setup_hw;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user