From 5d260a24a526c35e42ed9f0bd90ba30b8dd19a60 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Fri, 22 Sep 2017 09:19:05 -0700 Subject: gpu: nvgpu: halt gr pipe & gr_reset do not work on fmodel Do not halt gr pipe as it will hang simulator. Also during ch/tsg teardown, gr_reset without halting gr pipe crashes simulator. Bug 1958308 Change-Id: I4036b4a4999932f05a0f292d4fc51de21d3a030a Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1566575 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 17ae626b..5d04aa0c 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -1237,16 +1237,21 @@ void gk20a_fifo_reset_engine(struct gk20a *g, u32 engine_id) if (g->ops.fecs_trace.reset) g->ops.fecs_trace.reset(g); #endif - - /* HALT_PIPELINE method, halt GR engine. */ - if (gr_gk20a_halt_pipe(g)) - nvgpu_err(g, "failed to HALT gr pipe"); - - /* - * Resetting engine using mc_enable_r() is not enough; we must - * do full init sequence. - */ - gk20a_gr_reset(g); + if (!nvgpu_platform_is_simulation(g)) { + /*HALT_PIPELINE method, halt GR engine*/ + if (gr_gk20a_halt_pipe(g)) + nvgpu_err(g, "failed to HALT gr pipe"); + /* + * resetting engine using mc_enable_r() is not + * enough, we do full init sequence + */ + nvgpu_log(g, gpu_dbg_info, "resetting gr engine"); + gk20a_gr_reset(g); + } else { + nvgpu_log(g, gpu_dbg_info, + "HALT gr pipe not supported and " + "gr cannot be reset without halting gr pipe"); + } if (g->support_pmu && g->can_elpg) nvgpu_pmu_enable_elpg(g); } -- cgit v1.2.2