summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
authorDeepak Nibade <dnibade@nvidia.com>2018-05-31 18:33:50 -0400
committerTejal Kudav <tkudav@nvidia.com>2018-06-14 09:44:06 -0400
commit328a7bd3ffc9590c0c432724d45da9f25732c2a1 (patch)
tree12edca4ddd00dc8adf39a7267a63da7bf180f151 /drivers/gpu/nvgpu/gk20a/gr_gk20a.c
parent85b920442a617f47a7ef1f6c314c8096c2708574 (diff)
gpu: nvgpu: initialze bundle64 state
We receive bundle with address and 64 bit values from ucode on some platforms This patch adds the support to handle 64 bit values Add struct av64_gk20a to store an address and corresponding 64 bit value Add struct av64_list_gk20a to store count and list of av64_gk20a Add API alloc_av64_list_gk20a() to allocate the list that supports 64bit values In gr_gk20a_init_ctx_vars_fw(), if we see NETLIST_REGIONID_SW_BUNDLE64_INIT, load the bundle64 state into above local structures Add new HAL gops.gr.init_sw_bundle64() and call it from gk20a_init_sw_bundle() if defined Also load the bundle for simulation cases in gr_gk20a_init_ctx_vars_sim() Jira NVGPUT-96 Change-Id: I1ab7fb37ff91c5fbd968c93d714725b01fd4f59b Signed-off-by: Deepak Nibade <dnibade@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1736450 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_gk20a.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
index d4b31c86..52346541 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c
@@ -1373,6 +1373,12 @@ u32 gk20a_init_sw_bundle(struct gk20a *g)
1373 goto error; 1373 goto error;
1374 } 1374 }
1375 1375
1376 if (g->ops.gr.init_sw_bundle64) {
1377 err = g->ops.gr.init_sw_bundle64(g);
1378 if (err)
1379 goto error;
1380 }
1381
1376 /* disable pipe mode override */ 1382 /* disable pipe mode override */
1377 gk20a_writel(g, gr_pipe_bundle_config_r(), 1383 gk20a_writel(g, gr_pipe_bundle_config_r(),
1378 gr_pipe_bundle_config_override_pipe_mode_disabled_f()); 1384 gr_pipe_bundle_config_override_pipe_mode_disabled_f());
@@ -3130,6 +3136,7 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr)
3130 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.gpc_router.l); 3136 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.gpc_router.l);
3131 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_ltc.l); 3137 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_ltc.l);
3132 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_fbpa.l); 3138 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_fbpa.l);
3139 nvgpu_kfree(g, gr->ctx_vars.sw_bundle64_init.l);
3133 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_cau.l); 3140 nvgpu_kfree(g, gr->ctx_vars.ctxsw_regs.pm_cau.l);
3134 3141
3135 nvgpu_vfree(g, gr->ctx_vars.local_golden_image); 3142 nvgpu_vfree(g, gr->ctx_vars.local_golden_image);