summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-03-31 16:33:02 -0400
committerTerje Bergstrom <tbergstrom@nvidia.com>2016-04-13 16:12:41 -0400
commit9b5427da37161c350d28a821652f2bb84bca360f (patch)
tree989e7b649b7b5e54d1d316b245b61c1881a15de6 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent2adf9164d9d68cc3ab700af84724034682f44ab8 (diff)
gpu: nvgpu: Support GPUs with no physical mode
Support GPUs which cannot choose between SMMU and physical addressing. Change-Id: If3256fa1bc795a84d039ad3aa63ebdccf5cc0afb Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1120469 GVS: Gerrit_Virtual_Submit Reviewed-by: Alex Waterman <alexw@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index ada67edd..27406f9e 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -729,7 +729,7 @@ int gr_gk20a_ctx_patch_write(struct gk20a *g,
729static int gr_gk20a_fecs_ctx_bind_channel(struct gk20a *g, 729static int gr_gk20a_fecs_ctx_bind_channel(struct gk20a *g,
730 struct channel_gk20a *c) 730 struct channel_gk20a *c)
731{ 731{
732 u32 inst_base_ptr = u64_lo32(gk20a_mem_phys(&c->inst_block) 732 u32 inst_base_ptr = u64_lo32(gk20a_mm_inst_block_addr(g, &c->inst_block)
733 >> ram_in_base_shift_v()); 733 >> ram_in_base_shift_v());
734 u32 ret; 734 u32 ret;
735 735
@@ -1408,7 +1408,7 @@ static int gr_gk20a_fecs_ctx_image_save(struct channel_gk20a *c, u32 save_type)
1408 int ret; 1408 int ret;
1409 1409
1410 u32 inst_base_ptr = 1410 u32 inst_base_ptr =
1411 u64_lo32(gk20a_mem_phys(&c->inst_block) 1411 u64_lo32(gk20a_mm_inst_block_addr(g, &c->inst_block)
1412 >> ram_in_base_shift_v()); 1412 >> ram_in_base_shift_v());
1413 1413
1414 1414
@@ -1875,7 +1875,7 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g,
1875 1875
1876 if (tegra_platform_is_linsim()) { 1876 if (tegra_platform_is_linsim()) {
1877 u32 inst_base_ptr = 1877 u32 inst_base_ptr =
1878 u64_lo32(gk20a_mem_phys(&c->inst_block) 1878 u64_lo32(gk20a_mm_inst_block_addr(g, &c->inst_block)
1879 >> ram_in_base_shift_v()); 1879 >> ram_in_base_shift_v());
1880 1880
1881 ret = gr_gk20a_submit_fecs_method_op(g, 1881 ret = gr_gk20a_submit_fecs_method_op(g,
@@ -2103,7 +2103,7 @@ void gr_gk20a_load_falcon_bind_instblk(struct gk20a *g)
2103 2103
2104 gk20a_writel(g, gr_fecs_arb_ctx_adr_r(), 0x0); 2104 gk20a_writel(g, gr_fecs_arb_ctx_adr_r(), 0x0);
2105 2105
2106 inst_ptr = gk20a_mem_phys(&ucode_info->inst_blk_desc); 2106 inst_ptr = gk20a_mm_inst_block_addr(g, &ucode_info->inst_blk_desc);
2107 gk20a_writel(g, gr_fecs_new_ctx_r(), 2107 gk20a_writel(g, gr_fecs_new_ctx_r(),
2108 gr_fecs_new_ctx_ptr_f(inst_ptr >> 12) | 2108 gr_fecs_new_ctx_ptr_f(inst_ptr >> 12) |
2109 gr_fecs_new_ctx_target_m() | 2109 gr_fecs_new_ctx_target_m() |
@@ -4712,7 +4712,7 @@ static int gk20a_init_gr_bind_fecs_elpg(struct gk20a *g)
4712 4712
4713 4713
4714 err = gr_gk20a_fecs_set_reglist_bind_inst(g, 4714 err = gr_gk20a_fecs_set_reglist_bind_inst(g,
4715 gk20a_mem_phys(&mm->pmu.inst_block)); 4715 gk20a_mm_inst_block_addr(g, &mm->pmu.inst_block));
4716 if (err) { 4716 if (err) {
4717 gk20a_err(dev_from_gk20a(g), 4717 gk20a_err(dev_from_gk20a(g),
4718 "fail to bind pmu inst to gr"); 4718 "fail to bind pmu inst to gr");
@@ -4991,7 +4991,7 @@ int gk20a_gr_reset(struct gk20a *g)
4991 } 4991 }
4992 4992
4993 err = gr_gk20a_fecs_set_reglist_bind_inst(g, 4993 err = gr_gk20a_fecs_set_reglist_bind_inst(g,
4994 gk20a_mem_phys(&g->mm.pmu.inst_block)); 4994 gk20a_mm_inst_block_addr(g, &g->mm.pmu.inst_block));
4995 if (err) { 4995 if (err) {
4996 gk20a_err(dev_from_gk20a(g), 4996 gk20a_err(dev_from_gk20a(g),
4997 "fail to bind pmu inst to gr"); 4997 "fail to bind pmu inst to gr");
@@ -5372,7 +5372,7 @@ static struct channel_gk20a *gk20a_gr_get_channel_from_ctx(
5372 if (!gk20a_channel_get(ch)) 5372 if (!gk20a_channel_get(ch))
5373 continue; 5373 continue;
5374 5374
5375 if ((u32)(gk20a_mem_phys(&ch->inst_block) >> 5375 if ((u32)(gk20a_mm_inst_block_addr(g, &ch->inst_block) >>
5376 ram_in_base_shift_v()) == 5376 ram_in_base_shift_v()) ==
5377 gr_fecs_current_ctx_ptr_v(curr_ctx)) { 5377 gr_fecs_current_ctx_ptr_v(curr_ctx)) {
5378 tsgid = ch->tsgid; 5378 tsgid = ch->tsgid;