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>
This commit is contained in:
seshendra Gadagottu
2017-01-12 16:10:20 -08:00
committed by mobile promotions
parent 5d7253ea02
commit 36cc693ccb

View File

@@ -1994,7 +1994,6 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g,
u32 v, data;
int ret = 0;
struct mem_desc *mem = &ch_ctx->gr_ctx->mem;
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
struct ctx_header_desc *ctx = &c->ch_ctx.ctx_header;
struct mem_desc *ctxheader = &ctx->mem;
u32 va_lo, va_hi, va;
@@ -2136,28 +2135,6 @@ int gr_gk20a_load_golden_ctx_image(struct gk20a *g,
gk20a_mem_end(g, mem);
gk20a_mem_end(g, ctxheader);
if (platform->is_fmodel) {
u32 mdata = fecs_current_ctx_data(g, &c->inst_block);
ret = gr_gk20a_submit_fecs_method_op(g,
(struct fecs_method_op_gk20a) {
.method.data = mdata,
.method.addr =
gr_fecs_method_push_adr_restore_golden_v(),
.mailbox = {
.id = 0, .data = 0,
.clr = ~0, .ret = NULL,
.ok = gr_fecs_ctxsw_mailbox_value_pass_v(),
.fail = 0},
.cond.ok = GR_IS_UCODE_OP_EQUAL,
.cond.fail = GR_IS_UCODE_OP_SKIP}, false);
if (ret)
gk20a_err(dev_from_gk20a(g),
"restore context image failed");
}
clean_up_mem:
gk20a_mem_end(g, mem);