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/vgpu/fifo_vgpu.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'drivers/gpu/nvgpu/vgpu/fifo_vgpu.c') diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c index 9a8c319b..90e44e8c 100644 --- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c @@ -634,7 +634,8 @@ static int vgpu_channel_set_timeslice(struct channel_gk20a *ch, u32 timeslice) return err ? err : msg.ret; } -static int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, bool verbose) +static int vgpu_fifo_force_reset_ch(struct channel_gk20a *ch, + u32 err_code, bool verbose) { struct tsg_gk20a *tsg = NULL; struct channel_gk20a *ch_tsg = NULL; @@ -653,16 +654,14 @@ static int vgpu_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); } } mutex_unlock(&tsg->ch_list_lock); } else { - gk20a_set_error_notifier(ch, - NVGPU_CHANNEL_RESETCHANNEL_VERIF_ERROR); + gk20a_set_error_notifier(ch, err_code); } msg.cmd = TEGRA_VGPU_CMD_CHANNEL_FORCE_RESET; -- cgit v1.2.2