From bc92e2fb972e039ee33c1f1477204a4d145a8b96 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Wed, 8 Mar 2017 17:08:32 -0800 Subject: 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 Reviewed-on: http://git-master/r/1318322 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c | 35 +++++++++++++++--------------- 1 file changed, 17 insertions(+), 18 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c') 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) gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_PM_TPC_COUNT", 0, &g->gr.ctx_vars.ctxsw_regs.pm_tpc.count); - err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.fecs.inst); - err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.fecs.data); - err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.gpccs.inst); - err |= !alloc_u32_list_gk20a(&g->gr.ctx_vars.ucode.gpccs.data); - err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_bundle_init); - err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_method_init); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.sw_ctx_load); - err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_non_ctx_load); - err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_veid_bundle_init); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.sys); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.gpc); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.tpc); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.zcull_gpc); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.ppc); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.pm_sys); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.pm_gpc); - err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.pm_tpc); + err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.inst); + err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.data); + err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.gpccs.inst); + err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.gpccs.data); + err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_bundle_init); + err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_method_init); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.sw_ctx_load); + err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_non_ctx_load); + err |= !alloc_av_list_gk20a(g, &g->gr.ctx_vars.sw_veid_bundle_init); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.sys); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.gpc); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.tpc); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.zcull_gpc); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.ppc); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_sys); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_gpc); + err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_tpc); if (err) goto fail; @@ -244,4 +244,3 @@ fail: return err; } - -- cgit v1.2.2