diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-01-12 19:10:20 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-01-16 18:54:15 -0500 |
commit | 36cc693ccb857dbe783dae56933e1fa6a4812d67 (patch) | |
tree | 1d86c2e8ca98398125fc6a5a2bde39c0f8f56ff2 | |
parent | 5d7253ea02d1e2328698a15b0430530acd1c05c9 (diff) |
gpu: nvgpu: sim: avoid fecs golden context restore
When gpu host is executing a context, there should not be any calls
to fecs that can change the current context in execution. For some
reason legacy fmodels are calling fecs method to golden
context restore while loading golden context for new channel.
This call is not required and should not be called. Only first
time during golden context creation, fecs methods like bind can be
called and it is pretty safe to do.
Bug 1834201
Change-Id: Ia6178e875e3ac37fb1cf10e27976c26b9a02c56f
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: http://git-master/r/1284512
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 54c96680..f1ef8be2 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -1994,7 +1994,6 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g, | |||
1994 | u32 v, data; | 1994 | u32 v, data; |
1995 | int ret = 0; | 1995 | int ret = 0; |
1996 | struct mem_desc *mem = &ch_ctx->gr_ctx->mem; | 1996 | struct mem_desc *mem = &ch_ctx->gr_ctx->mem; |
1997 | struct gk20a_platform *platform = dev_get_drvdata(g->dev); | ||
1998 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; | 1997 | struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header; |
1999 | struct mem_desc *ctxheader = &ctx->mem; | 1998 | struct mem_desc *ctxheader = &ctx->mem; |
2000 | u32 va_lo, va_hi, va; | 1999 | u32 va_lo, va_hi, va; |
@@ -2136,28 +2135,6 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g, | |||
2136 | gk20a_mem_end(g, mem); | 2135 | gk20a_mem_end(g, mem); |
2137 | gk20a_mem_end(g, ctxheader); | 2136 | gk20a_mem_end(g, ctxheader); |
2138 | 2137 | ||
2139 | if (platform->is_fmodel) { | ||
2140 | |||
2141 | u32 mdata = fecs_current_ctx_data(g, &c->inst_block); | ||
2142 | |||
2143 | ret = gr_gk20a_submit_fecs_method_op(g, | ||
2144 | (struct fecs_method_op_gk20a) { | ||
2145 | .method.data = mdata, | ||
2146 | .method.addr = | ||
2147 | gr_fecs_method_push_adr_restore_golden_v(), | ||
2148 | .mailbox = { | ||
2149 | .id = 0, .data = 0, | ||
2150 | .clr = ~0, .ret = NULL, | ||
2151 | .ok = gr_fecs_ctxsw_mailbox_value_pass_v(), | ||
2152 | .fail = 0}, | ||
2153 | .cond.ok = GR_IS_UCODE_OP_EQUAL, | ||
2154 | .cond.fail = GR_IS_UCODE_OP_SKIP}, false); | ||
2155 | |||
2156 | if (ret) | ||
2157 | gk20a_err(dev_from_gk20a(g), | ||
2158 | "restore context image failed"); | ||
2159 | } | ||
2160 | |||
2161 | clean_up_mem: | 2138 | clean_up_mem: |
2162 | gk20a_mem_end(g, mem); | 2139 | gk20a_mem_end(g, mem); |
2163 | 2140 | ||