From acd6d02069b499bbaa83b7c5ba6a952e6a6fd476 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Tue, 29 Apr 2014 15:38:24 +0530 Subject: gpu: nvgpu: gk20a: add fecs error intr handler Add handler gk20a_gr_handle_fecs_error() in case we have pending fecs error interrupt And clear this interrupt after handling. Also, in gk20a_gr_handle_fecs_error(), for now just print the contents of NV_PGRAPH_FECS_INTR and clear it Bug 1495957 Change-Id: Ie7f70c84ec76ab698141646cd683584c4501e3e0 Signed-off-by: Deepak Nibade Reviewed-on: http://git-master/r/402874 (cherry picked from commit a29f219c57d65a06f6dae8086f19fa1af94d95bd) Reviewed-on: http://git-master/r/403587 (cherry picked from commit e65ebebd0d4d5c3dbb6fa454dd51c383ea13d715) Reviewed-on: http://git-master/r/411160 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Reviewed-by: Sachin Nikam --- drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 08309f0f..0cb6c933 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -4854,6 +4854,22 @@ static int gk20a_gr_handle_illegal_class(struct gk20a *g, return -EINVAL; } +static int gk20a_gr_handle_fecs_error(struct gk20a *g, + struct gr_isr_data *isr_data) +{ + struct fifo_gk20a *f = &g->fifo; + struct channel_gk20a *ch = &f->channel[isr_data->chid]; + u32 gr_fecs_intr = gk20a_readl(g, gr_fecs_intr_r()); + gk20a_dbg_fn(""); + + gk20a_err(dev_from_gk20a(g), + "unhandled fecs error interrupt 0x%08x for channel %u", + gr_fecs_intr, ch->hw_chid); + + gk20a_writel(g, gr_fecs_intr_r(), gr_fecs_intr); + return -EINVAL; +} + static int gk20a_gr_handle_class_error(struct gk20a *g, struct gr_isr_data *isr_data) { @@ -5341,6 +5357,13 @@ int gk20a_gr_isr(struct gk20a *g) gr_intr &= ~gr_intr_illegal_class_pending_f(); } + if (gr_intr & gr_intr_fecs_error_pending_f()) { + need_reset |= gk20a_gr_handle_fecs_error(g, &isr_data); + gk20a_writel(g, gr_intr_r(), + gr_intr_fecs_error_reset_f()); + gr_intr &= ~gr_intr_fecs_error_pending_f(); + } + if (gr_intr & gr_intr_class_error_pending_f()) { need_reset |= gk20a_gr_handle_class_error(g, &isr_data); gk20a_writel(g, gr_intr_r(), -- cgit v1.2.2