diff options
author | Seema Khowala <seemaj@nvidia.com> | 2017-07-13 18:40:51 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-07-19 02:41:54 -0400 |
commit | 305dfe9fc0fa9001568a7713742418e1597886fd (patch) | |
tree | dfbcfd43b5d556184e671f3ea3c99468163c225f /drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c | |
parent | 5364257c7f9792b3e85d4af89528d6bda02bfee5 (diff) |
gpu: nvgpu: add ctxsw etpc regs
Add etpc ctxsw regs for t19x
Bug 200311674
Change-Id: I2d5076cb4df8040613c20d28518325ad7c6a9145
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1520140
GVS: Gerrit_Virtual_Submit
Tested-by: Tushar Kashalikar <tkashalikar@nvidia.com>
Reviewed-by: Tushar Kashalikar <tkashalikar@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@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 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a_sim.c index 12ec9c5f..36071223 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-2016, NVIDIA CORPORATION. All rights reserved. | 6 | * Copyright (c) 2011-2017, 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, |
@@ -72,6 +72,8 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr) | |||
72 | &g->gr.ctx_vars.ctxsw_regs.pm_gpc.count); | 72 | &g->gr.ctx_vars.ctxsw_regs.pm_gpc.count); |
73 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_PM_TPC_COUNT", 0, | 73 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_PM_TPC_COUNT", 0, |
74 | &g->gr.ctx_vars.ctxsw_regs.pm_tpc.count); | 74 | &g->gr.ctx_vars.ctxsw_regs.pm_tpc.count); |
75 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_ETPC_COUNT", 0, | ||
76 | &g->gr.ctx_vars.ctxsw_regs.etpc.count); | ||
75 | 77 | ||
76 | err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.inst); | 78 | err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.inst); |
77 | err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.data); | 79 | err |= !alloc_u32_list_gk20a(g, &g->gr.ctx_vars.ucode.fecs.data); |
@@ -90,6 +92,7 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr) | |||
90 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_sys); | 92 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_sys); |
91 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_gpc); | 93 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_gpc); |
92 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_tpc); | 94 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.pm_tpc); |
95 | err |= !alloc_aiv_list_gk20a(g, &g->gr.ctx_vars.ctxsw_regs.etpc); | ||
93 | 96 | ||
94 | if (err) | 97 | if (err) |
95 | goto fail; | 98 | goto fail; |
@@ -233,6 +236,20 @@ int gr_gk20a_init_ctx_vars_sim(struct gk20a *g, struct gr_gk20a *gr) | |||
233 | i, &l[i].value); | 236 | i, &l[i].value); |
234 | } | 237 | } |
235 | 238 | ||
239 | gk20a_dbg(gpu_dbg_info | gpu_dbg_fn, "query GRCTX_REG_LIST_ETPC"); | ||
240 | for (i = 0; i < g->gr.ctx_vars.ctxsw_regs.etpc.count; i++) { | ||
241 | struct aiv_gk20a *l = g->gr.ctx_vars.ctxsw_regs.etpc.l; | ||
242 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_ETPC:ADDR", | ||
243 | i, &l[i].addr); | ||
244 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_ETPC:INDEX", | ||
245 | i, &l[i].index); | ||
246 | gk20a_sim_esc_readl(g, "GRCTX_REG_LIST_ETPC:VALUE", | ||
247 | i, &l[i].value); | ||
248 | gk20a_dbg(gpu_dbg_info | gpu_dbg_fn, | ||
249 | "addr:0x%#08x index:0x%08x value:0x%08x", | ||
250 | l[i].addr, l[i].index, l[i].value); | ||
251 | } | ||
252 | |||
236 | g->gr.ctx_vars.valid = true; | 253 | g->gr.ctx_vars.valid = true; |
237 | 254 | ||
238 | gk20a_sim_esc_readl(g, "GRCTX_GEN_CTX_REGS_BASE_INDEX", 0, | 255 | gk20a_sim_esc_readl(g, "GRCTX_GEN_CTX_REGS_BASE_INDEX", 0, |