diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 15 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.h | 2 |
4 files changed, 24 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index b30d1743..cac3ce27 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |||
@@ -634,4 +634,12 @@ bool gk20a_fecs_trace_is_enabled(struct gk20a *g) | |||
634 | 634 | ||
635 | return (trace && nvgpu_thread_is_running(&trace->poll_task)); | 635 | return (trace && nvgpu_thread_is_running(&trace->poll_task)); |
636 | } | 636 | } |
637 | |||
638 | void gk20a_fecs_trace_reset_buffer(struct gk20a *g) | ||
639 | { | ||
640 | nvgpu_log(g, gpu_dbg_fn|gpu_dbg_ctxsw, " "); | ||
641 | |||
642 | gk20a_fecs_trace_set_read_index(g, | ||
643 | gk20a_fecs_trace_get_write_index(g)); | ||
644 | } | ||
637 | #endif /* CONFIG_GK20A_CTXSW_TRACE */ | 645 | #endif /* CONFIG_GK20A_CTXSW_TRACE */ |
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h index cbde2fe7..d33e619b 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.h | |||
@@ -40,5 +40,6 @@ int gk20a_fecs_trace_enable(struct gk20a *g); | |||
40 | int gk20a_fecs_trace_disable(struct gk20a *g); | 40 | int gk20a_fecs_trace_disable(struct gk20a *g); |
41 | bool gk20a_fecs_trace_is_enabled(struct gk20a *g); | 41 | bool gk20a_fecs_trace_is_enabled(struct gk20a *g); |
42 | size_t gk20a_fecs_trace_buffer_size(struct gk20a *g); | 42 | size_t gk20a_fecs_trace_buffer_size(struct gk20a *g); |
43 | void gk20a_fecs_trace_reset_buffer(struct gk20a *g); | ||
43 | 44 | ||
44 | #endif /* NVGPU_GK20A_FECS_TRACE_GK20A_H */ | 45 | #endif /* NVGPU_GK20A_FECS_TRACE_GK20A_H */ |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index 8d65f90a..4541134f 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -5308,9 +5308,20 @@ int gk20a_gr_handle_fecs_error(struct gk20a *g, struct channel_gk20a *ch, | |||
5308 | gr_fecs_host_int_status_ctxsw_intr_f(CTXSW_INTR0)) != 0U) { | 5308 | gr_fecs_host_int_status_ctxsw_intr_f(CTXSW_INTR0)) != 0U) { |
5309 | u32 mailbox_value = gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)); | 5309 | u32 mailbox_value = gk20a_readl(g, gr_fecs_ctxsw_mailbox_r(6)); |
5310 | 5310 | ||
5311 | nvgpu_err(g, "ctxsw intr0 set by ucode, error_code: 0x%08x", | 5311 | if (mailbox_value == MAILBOX_VALUE_TIMESTAMP_BUFFER_FULL) { |
5312 | nvgpu_info(g, "ctxsw intr0 set by ucode, " | ||
5313 | "timestamp buffer full"); | ||
5314 | #ifdef CONFIG_GK20A_CTXSW_TRACE | ||
5315 | gk20a_fecs_trace_reset_buffer(g); | ||
5316 | #else | ||
5317 | ret = -1; | ||
5318 | #endif | ||
5319 | } else { | ||
5320 | nvgpu_err(g, | ||
5321 | "ctxsw intr0 set by ucode, error_code: 0x%08x", | ||
5312 | mailbox_value); | 5322 | mailbox_value); |
5313 | ret = -1; | 5323 | ret = -1; |
5324 | } | ||
5314 | } else { | 5325 | } else { |
5315 | nvgpu_err(g, | 5326 | nvgpu_err(g, |
5316 | "unhandled fecs error interrupt 0x%08x for channel %u", | 5327 | "unhandled fecs error interrupt 0x%08x for channel %u", |
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h index 25850104..9ccd555a 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.h | |||
@@ -69,6 +69,8 @@ | |||
69 | #define CTXSW_INTR0 BIT32(0) | 69 | #define CTXSW_INTR0 BIT32(0) |
70 | #define CTXSW_INTR1 BIT32(1) | 70 | #define CTXSW_INTR1 BIT32(1) |
71 | 71 | ||
72 | #define MAILBOX_VALUE_TIMESTAMP_BUFFER_FULL 0x26 | ||
73 | |||
72 | struct tsg_gk20a; | 74 | struct tsg_gk20a; |
73 | struct channel_gk20a; | 75 | struct channel_gk20a; |
74 | struct nvgpu_warpstate; | 76 | struct nvgpu_warpstate; |