From 476447ec554637a623169b5447e7b303ccd8ab98 Mon Sep 17 00:00:00 2001 From: Richard Zhao Date: Wed, 2 Dec 2015 11:35:08 -0800 Subject: gpu: nvgpu: vgpu: add SM exception support When TEGRA_VGPU_GR_INTR_SM_EXCEPTION comes, post debugger event. Bug 1594604 JIRA VFND-1120 Change-Id: I7229c3994220a7c6f117d38a1af2e766187a47c6 Signed-off-by: Richard Zhao Reviewed-on: http://git-master/r/923234 (cherry picked from commit bdd414d9366133380a202d88b1a50038b70c068d) Reviewed-on: http://git-master/r/840646 Reviewed-by: Aingara Paramakuru Reviewed-by: Terje Bergstrom GVS: Gerrit_Virtual_Submit Reviewed-by: Vladislav Buzov --- drivers/gpu/nvgpu/vgpu/gr_vgpu.c | 4 ++++ include/linux/tegra_vgpu.h | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c index 835351c4..373dfd56 100644 --- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c @@ -15,6 +15,7 @@ #include "vgpu/vgpu.h" #include "gk20a/hw_gr_gk20a.h" +#include "gk20a/dbg_gpu_gk20a.h" static int vgpu_gr_commit_inst(struct channel_gk20a *c, u64 gpu_va) { @@ -900,6 +901,9 @@ int vgpu_gr_isr(struct gk20a *g, struct tegra_vgpu_gr_intr_info *info) gk20a_set_error_notifier(ch, NVGPU_CHANNEL_GR_ERROR_SW_NOTIFY); break; + case TEGRA_VGPU_GR_INTR_SM_EXCEPTION: + gk20a_dbg_gpu_post_events(ch); + break; default: WARN_ON(1); break; diff --git a/include/linux/tegra_vgpu.h b/include/linux/tegra_vgpu.h index dbfa06d5..4db3a16f 100644 --- a/include/linux/tegra_vgpu.h +++ b/include/linux/tegra_vgpu.h @@ -317,7 +317,8 @@ enum { TEGRA_VGPU_FIFO_INTR_MMU_FAULT, TEGRA_VGPU_GR_NONSTALL_INTR_SEMAPHORE, TEGRA_VGPU_FIFO_NONSTALL_INTR_CHANNEL, - TEGRA_VGPU_CE2_NONSTALL_INTR_NONBLOCKPIPE + TEGRA_VGPU_CE2_NONSTALL_INTR_NONBLOCKPIPE, + TEGRA_VGPU_GR_INTR_SM_EXCEPTION }; struct tegra_vgpu_gr_intr_info { -- cgit v1.2.2