From 198b895a881ca067a2411b7367579cb1d594ab5a Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Fri, 12 Aug 2016 17:10:28 -0700 Subject: gpu: nvgpu: use force_reset_ch in ch wdt handler - let force_reset_ch pass down err code - force_reset_ch callback can cover vgpu too. Bug 1776876 JIRA VFND-2151 Change-Id: I48f7890294c6455247198e0cab5f21f83f61f0e1 Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/1202255 GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 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 b025f4d6..bd31656f 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -1746,7 +1746,8 @@ void gk20a_fifo_recover(struct gk20a *g, u32 __engine_ids, } /* force reset channel and tsg (if it's part of one) */ -int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, bool verbose) +int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, + u32 err_code, bool verbose) { struct tsg_gk20a *tsg = NULL; struct channel_gk20a *ch_tsg = NULL; @@ -1759,8 +1760,7 @@ int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, bool verbose) list_for_each_entry(ch_tsg, &tsg->ch_list, ch_entry) { if (gk20a_channel_get(ch_tsg)) { - gk20a_set_error_notifier(ch_tsg, - NVGPU_CHANNEL_RESETCHANNEL_VERIF_ERROR); + gk20a_set_error_notifier(ch_tsg, err_code); gk20a_channel_put(ch_tsg); } } @@ -1768,8 +1768,7 @@ int gk20a_fifo_force_reset_ch(struct channel_gk20a *ch, bool verbose) mutex_unlock(&tsg->ch_list_lock); gk20a_fifo_recover_tsg(g, ch->tsgid, verbose); } else { - gk20a_set_error_notifier(ch, - NVGPU_CHANNEL_RESETCHANNEL_VERIF_ERROR); + gk20a_set_error_notifier(ch, err_code); gk20a_fifo_recover_ch(g, ch->hw_chid, verbose); } -- cgit v1.2.2