summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-03-08 20:08:32 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-29 14:50:21 -0400
commitbc92e2fb972e039ee33c1f1477204a4d145a8b96 (patch)
treea43df80fe921f3e4b50c70bf67aef30a0b5dd5bb /drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c
parent4022b989aa2e91fe77ed52df49d45838f6d8b9bb (diff)
gpu: nvgpu: Use new kmem API functions (gk20a core)
Use the new kmem API functions in core gk20a code. Also add a struct gk20a pointer to several functions to ensure that the kmem APIs can be used. Bug 1799159 Bug 1823380 Change-Id: I41276509c4f0b68e80b989aa55cf94d8dbbdf156 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1318322 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c35
1 files changed, 17 insertions, 18 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c
index 34b315e6..2fdbc01a 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c
+++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c
@@ -71,23 +71,23 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr)
71 gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_PM_TPC_COUNT", 0, 71 gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_PM_TPC_COUNT", 0,
72 &g->gr.ctx_vars.ctxsw_regs.pm_tpc.count); 72 &g->gr.ctx_vars.ctxsw_regs.pm_tpc.count);
73 73
74 err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.fecs.inst); 74 err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.inst);
75 err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.fecs.data); 75 err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.data);
76 err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.gpccs.inst); 76 err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.gpccs.inst);
77 err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.gpccs.data); 77 err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.gpccs.data);
78 err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_bundle_init); 78 err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_bundle_init);
79 err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_method_init); 79 err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_method_init);
80 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.sw_ctx_load); 80 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.sw_ctx_load);
81 err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_non_ctx_load); 81 err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_non_ctx_load);
82 err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_veid_bundle_init); 82 err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_veid_bundle_init);
83 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.sys); 83 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.sys);
84 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.gpc); 84 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.gpc);
85 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.tpc); 85 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.tpc);
86 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.zcull_gpc); 86 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.zcull_gpc);
87 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.ppc); 87 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.ppc);
88 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.pm_sys); 88 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_sys);
89 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.pm_gpc); 89 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_gpc);
90 err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.pm_tpc); 90 err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_tpc);
91 91
92 if (err) 92 if (err)
93 goto fail; 93 goto fail;
@@ -244,4 +244,3 @@ fail:
244 return err; 244 return err;
245 245
246} 246}
247