From 36cc693ccb857dbe783dae56933e1fa6a4812d67 Mon Sep 17 00:00:00 2001 From: seshendra Gadagottu Date: Thu, 12 Jan 2017 16:10:20 -0800 Subject: 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 Reviewed-on: http://git-master/r/1284512 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a') 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, 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); -- cgit v1.2.2