From 64050935e931df0650a82c9f28bc9a3a331f4152 Mon Sep 17 00:00:00 2001 From: Seema Khowala Date: Mon, 12 Jun 2017 10:45:12 -0700 Subject: gpu: nvgpu: add sked exception detection and handling Needed to detect and clear sked exception Bug 200315442 Change-Id: Ia85e8827e563addf7b9d0f95ef192379bb808638 Signed-off-by: Seema Khowala Reviewed-on: http://git-master/r/1500860 Reviewed-by: svccoveritychecker GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 8 ++++++++ drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h | 4 ++++ 2 files changed, 12 insertions(+) (limited to 'drivers') diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 462af65f..0fd27598 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -6598,6 +6598,14 @@ int gk20a_gr_isr(struct gk20a *g) need_reset |= -EFAULT; } + if (exception & gr_exception_sked_m()) { + u32 sked = gk20a_readl(g, gr_sked_hww_esr_r()); + + nvgpu_err(g, "sked exception %08x", sked); + gk20a_writel(g, gr_sked_hww_esr_r(), + gr_sked_hww_esr_reset_active_f()); + } + gk20a_writel(g, gr_intr_r(), gr_intr_exception_reset_f()); gr_intr &= ~gr_intr_exception_pending_f(); diff --git a/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h b/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h index 455eef90..983f1cfe 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h +++ b/drivers/gpu/nvgpu/include/nvgpu/hw/gk20a/hw_gr_gk20a.h @@ -186,6 +186,10 @@ static inline u32 gr_exception_ds_m(void) { return 0x1 << 4; } +static inline u32 gr_exception_sked_m(void) +{ + return 0x1 << 8; +} static inline u32 gr_exception1_r(void) { return 0x00400118; -- cgit v1.2.2