diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 3a166e063..8d65f90af 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c @@ -5304,10 +5304,18 @@ int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch, nvgpu_err(g, "fecs watchdog triggered for channel %u, " "cannot ctxsw anymore !!", isr_data->chid); gk20a_fecs_dump_falcon_stats(g); + } else if ((gr_fecs_intr & + gr_fecs_host_int_status_ctxsw_intr_f(CTXSW_INTR0)) != 0U) { + u32 mailbox_value = gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)); + + nvgpu_err(g, "ctxsw intr0 set by ucode, error_code: 0x%08x", + mailbox_value); + ret = -1; } else { nvgpu_err(g, - "fecs error interrupt 0x%08x for channel %u", - gr_fecs_intr, isr_data->chid); + "unhandled fecs error interrupt 0x%08x for channel %u", + gr_fecs_intr, ch->chid); + gk20a_fecs_dump_falcon_stats(g); } gk20a_writel(g, gr_fecs_host_int_clear_r(), gr_fecs_intr); diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index c4ce49af4..258501044 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h @@ -66,6 +66,9 @@ #define NVGPU_PREEMPTION_MODE_COMPUTE_CTA (1 << 1) #define NVGPU_PREEMPTION_MODE_COMPUTE_CILP (1 << 2) +#define CTXSW_INTR0 BIT32(0) +#define CTXSW_INTR1 BIT32(1) + struct tsg_gk20a; struct channel_gk20a; struct nvgpu_warpstate; diff --git a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c index 913434abc..be1e20385 100644 --- a/drivers/gpu/nvgpu/gp10b/gr_gp10b.c +++ b/drivers/gpu/nvgpu/gp10b/gr_gp10b.c @@ -1996,7 +1996,9 @@ int gr_gp10b_handle_fecs_error(struct gk20a *g, * INTR1 (bit 1 of the HOST_INT_STATUS_CTXSW_INTR) * indicates that a CILP ctxsw save has finished */ - if (gr_fecs_intr & gr_fecs_host_int_status_ctxsw_intr_f(2)) { + + if ((gr_fecs_intr & + gr_fecs_host_int_status_ctxsw_intr_f(CTXSW_INTR1)) != 0U) { nvgpu_log(g, gpu_dbg_fn | gpu_dbg_gpu_dbg | gpu_dbg_intr, "CILP: ctxsw save completed!\n");