From 37a15ce818244ec11dbe002350d013cb636e0a9d Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Mon, 26 Feb 2018 17:01:41 +0530 Subject: gpu: nvgpu: skip channel abort for deferred reset In case deferred_reset_pending is set in gk20a_fifo_handle_mmu_fault() and in gv11b_fifo_teardown_ch_tsg(), we skip resetting the engines and skip setting the error notifier Then we call gk20a_channel_abort()/gk20a_fifo_abort_tsg() which aborts the channels, and resets the syncpoint values to release all the waiters But since we don't set error notifier this could lead User to assume a successful submission without any error To fix this disable channel/TSG in case deferred_reset_pending is set and skip calls to gk20a_channel_abort()/gk20a_fifo_abort_tsg() Note that we finally abort the channel when channel is being closed Bug 200363077 Change-Id: Ia48ca369701c14d1913d8f7b66ed466b7b840224 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/1664319 (cherry picked from commit ac40d082e85397f100c3d8377b1f28811485def4) Reviewed-on: https://git-master.nvidia.com/r/1666445 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: Seema Khowala Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gv11b/fifo_gv11b.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'drivers/gpu/nvgpu/gv11b') diff --git a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c index 97ab7aab..feed2002 100644 --- a/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c +++ b/drivers/gpu/nvgpu/gv11b/fifo_gv11b.c @@ -1049,19 +1049,25 @@ void gv11b_fifo_teardown_ch_tsg(struct gk20a *g, u32 act_eng_bitmask, #endif if (tsg) { - if (!g->fifo.deferred_reset_pending && - rc_type == RC_TYPE_MMU_FAULT) - gk20a_fifo_set_ctx_mmu_error_tsg(g, tsg); + if (g->fifo.deferred_reset_pending) { + gk20a_disable_tsg(tsg); + } else { + if (rc_type == RC_TYPE_MMU_FAULT) + gk20a_fifo_set_ctx_mmu_error_tsg(g, tsg); - gk20a_fifo_abort_tsg(g, tsg->tsgid, false); + gk20a_fifo_abort_tsg(g, tsg->tsgid, false); + } if (refch) gk20a_channel_put(refch); } else if (refch) { - if (!g->fifo.deferred_reset_pending && - rc_type == RC_TYPE_MMU_FAULT) + if (g->fifo.deferred_reset_pending) { + g->ops.fifo.disable_channel(refch); + } else { + if (rc_type == RC_TYPE_MMU_FAULT) gk20a_fifo_set_ctx_mmu_error_ch(g, refch); - gk20a_channel_abort(refch, false); + gk20a_channel_abort(refch, false); + } gk20a_channel_put(refch); } else { nvgpu_err(g, "id unknown, abort runlist"); -- cgit v1.2.2