From ceaab0595c0af8dfe4b71ca4014a9b44a862a0ef Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Thu, 12 Oct 2017 09:54:04 -0700 Subject: gpu: nvgpu: ctxsw_trace_tsg/channel_reset call order For non fake mmu fault, both tsg and ch pointers could be valid. If tsg pointer is non null, issue ctxsw_trace for tsg instead of channel only. Change-Id: I161c40e8d43c7ae4d953ef4768ad75d4e993c87e Signed-off-by: Seema Khowala Reviewed-on: https://git-master.nvidia.com/r/1577915 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 32915ee1..6312e74a 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -1603,11 +1603,14 @@ static bool gk20a_fifo_handle_mmu_fault( } } } - - if (ch) - gk20a_ctxsw_trace_channel_reset(g, ch); - else if (tsg) + /* + * For non fake mmu fault, both tsg and ch pointers + * could be valid. Check tsg first. + */ + if (tsg) gk20a_ctxsw_trace_tsg_reset(g, tsg); + else if (ch) + gk20a_ctxsw_trace_channel_reset(g, ch); /* disable the channel/TSG from hw and increment * syncpoints */ -- cgit v1.2.2