diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2016-10-04 17:54:16 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-14 11:11:19 -0400 |
commit | 1029136eaa1c7c1cb9a9c8413af439fd741dc232 (patch) | |
tree | f01ccf9e665f28759a8b9596ec24249b172729b6 /drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c | |
parent | 8728da1c6e76566ebc4717399d1f247200125595 (diff) |
gpu: nvgpu: program sw veid bundles
Query sw veid bundles from sim/netlist and
initialize hardware with those bundles.
JIRA GV11B-11
Change-Id: I26f174781f0b00b919afac407e2bb9e1fa7b158a
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1231597
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@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.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c index 9430ce7b..70787202 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c +++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * GK20A Graphics Context for Simulation | 4 | * GK20A Graphics Context for Simulation |
5 | * | 5 | * |
6 | * Copyright (c) 2011-2014, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2011-2016, NVIDIA CORPORATION. All rights reserved. |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify it | 8 | * This program is free software; you can redistribute it and/or modify it |
9 | * under the terms and conditions of the GNU General Public License, | 9 | * under the terms and conditions of the GNU General Public License, |
@@ -50,7 +50,8 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr) | |||
50 | &g->gr.ctx_vars.sw_method_init.count); | 50 | &g->gr.ctx_vars.sw_method_init.count); |
51 | gk20a_sim_esc_readl(g, "GRCTX_SW_CTX_LOAD_SIZE", 0, | 51 | gk20a_sim_esc_readl(g, "GRCTX_SW_CTX_LOAD_SIZE", 0, |
52 | &g->gr.ctx_vars.sw_ctx_load.count); | 52 | &g->gr.ctx_vars.sw_ctx_load.count); |
53 | 53 | gk20a_sim_esc_readl(g, "GRCTX_SW_VEID_BUNDLE_INIT_SIZE", 0, | |
54 | &g->gr.ctx_vars.sw_veid_bundle_init.count); | ||
54 | 55 | ||
55 | gk20a_sim_esc_readl(g, "GRCTX_NONCTXSW_REG_SIZE", 0, | 56 | gk20a_sim_esc_readl(g, "GRCTX_NONCTXSW_REG_SIZE", 0, |
56 | &g->gr.ctx_vars.sw_non_ctx_load.count); | 57 | &g->gr.ctx_vars.sw_non_ctx_load.count); |
@@ -77,6 +78,7 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr) | |||
77 | err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_method_init); | 78 | err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_method_init); |
78 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.sw_ctx_load); | 79 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.sw_ctx_load); |
79 | err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_non_ctx_load); | 80 | err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_non_ctx_load); |
81 | err |= !alloc_av_list_gk20a(&g->gr.ctx_vars.sw_veid_bundle_init); | ||
80 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.sys); | 82 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.sys); |
81 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.gpc); | 83 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.gpc); |
82 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.tpc); | 84 | err |= !alloc_aiv_list_gk20a(&g->gr.ctx_vars.ctxsw_regs.tpc); |
@@ -139,6 +141,15 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr) | |||
139 | i, &l[i].value); | 141 | i, &l[i].value); |
140 | } | 142 | } |
141 | 143 | ||
144 | for (i = 0; i < g->gr.ctx_vars.sw_veid_bundle_init.count; i++) { | ||
145 | struct av_gk20a *l = g->gr.ctx_vars.sw_veid_bundle_init.l; | ||
146 | |||
147 | gk20a_sim_esc_readl(g, "GRCTX_SW_VEID_BUNDLE_INIT:ADDR", | ||
148 | i, &l[i].addr); | ||
149 | gk20a_sim_esc_readl(g, "GRCTX_SW_VEID_BUNDLE_INIT:VALUE", | ||
150 | i, &l[i].value); | ||
151 | } | ||
152 | |||
142 | for (i = 0; i < g->gr.ctx_vars.ctxsw_regs.sys.count; i++) { | 153 | for (i = 0; i < g->gr.ctx_vars.ctxsw_regs.sys.count; i++) { |
143 | struct aiv_gk20a *l = g->gr.ctx_vars.ctxsw_regs.sys.l; | 154 | struct aiv_gk20a *l = g->gr.ctx_vars.ctxsw_regs.sys.l; |
144 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_SYS:ADDR", | 155 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_SYS:ADDR", |