summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/nvgpu/gk20a/channel_gk20a.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/fifo_gk20a.c7
-rw-r--r--drivers/gpu/nvgpu/vgpu/fifo_vgpu.c4
-rw-r--r--include/trace/events/gk20a.h19
4 files changed, 31 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
index da73d95d..58175141 100644
--- a/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/channel_gk20a.c
@@ -853,6 +853,7 @@ static void gk20a_free_channel(struct channel_gk20a *ch)
853 unsigned long timeout = gk20a_get_gr_idle_timeout(g); 853 unsigned long timeout = gk20a_get_gr_idle_timeout(g);
854 struct dbg_session_gk20a *dbg_s; 854 struct dbg_session_gk20a *dbg_s;
855 bool was_reset; 855 bool was_reset;
856
856 gk20a_dbg_fn(""); 857 gk20a_dbg_fn("");
857 858
858 WARN_ON(ch->g == NULL); 859 WARN_ON(ch->g == NULL);
@@ -901,6 +902,7 @@ static void gk20a_free_channel(struct channel_gk20a *ch)
901 /* if lock is already taken, a reset is taking place 902 /* if lock is already taken, a reset is taking place
902 so no need to repeat */ 903 so no need to repeat */
903 if (!was_reset) { 904 if (!was_reset) {
905 trace_gk20a_channel_reset(ch->hw_chid, ch->tsgid);
904 gk20a_fifo_reset_engine(g, 906 gk20a_fifo_reset_engine(g,
905 g->fifo.deferred_fault_engines); 907 g->fifo.deferred_fault_engines);
906 } 908 }
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
index 9421c017..27a3992d 100644
--- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c
@@ -1053,8 +1053,13 @@ static bool gk20a_fifo_handle_mmu_fault(
1053 mutex_lock(&g->fifo.gr_reset_mutex); 1053 mutex_lock(&g->fifo.gr_reset_mutex);
1054 /* if lock is already taken, a reset is taking place 1054 /* if lock is already taken, a reset is taking place
1055 so no need to repeat */ 1055 so no need to repeat */
1056 if (!was_reset) 1056 if (!was_reset) {
1057 trace_gk20a_channel_reset(
1058 ch ? ch->hw_chid : ~0,
1059 tsg ? tsg->tsgid :
1060 NVGPU_INVALID_TSG_ID);
1057 gk20a_fifo_reset_engine(g, engine_id); 1061 gk20a_fifo_reset_engine(g, engine_id);
1062 }
1058 mutex_unlock(&g->fifo.gr_reset_mutex); 1063 mutex_unlock(&g->fifo.gr_reset_mutex);
1059 } 1064 }
1060 /* disable the channel/TSG from hw and increment 1065 /* disable the channel/TSG from hw and increment
diff --git a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
index afe3c24b..ac506a34 100644
--- a/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/fifo_vgpu.c
@@ -14,6 +14,8 @@
14 */ 14 */
15 15
16#include <linux/dma-mapping.h> 16#include <linux/dma-mapping.h>
17#include <trace/events/gk20a.h>
18
17#include "vgpu/vgpu.h" 19#include "vgpu/vgpu.h"
18#include "gk20a/hw_fifo_gk20a.h" 20#include "gk20a/hw_fifo_gk20a.h"
19#include "gk20a/hw_ram_gk20a.h" 21#include "gk20a/hw_ram_gk20a.h"
@@ -625,6 +627,8 @@ int vgpu_fifo_isr(struct gk20a *g, struct tegra_vgpu_fifo_intr_info *info)
625 gk20a_err(dev_from_gk20a(g), "fifo intr (%d) on ch %u", 627 gk20a_err(dev_from_gk20a(g), "fifo intr (%d) on ch %u",
626 info->type, info->chid); 628 info->type, info->chid);
627 629
630 trace_gk20a_channel_reset(ch->hw_chid, ch->tsgid);
631
628 switch (info->type) { 632 switch (info->type) {
629 case TEGRA_VGPU_FIFO_INTR_PBDMA: 633 case TEGRA_VGPU_FIFO_INTR_PBDMA:
630 gk20a_set_error_notifier(ch, NVGPU_CHANNEL_PBDMA_ERROR); 634 gk20a_set_error_notifier(ch, NVGPU_CHANNEL_PBDMA_ERROR);
diff --git a/include/trace/events/gk20a.h b/include/trace/events/gk20a.h
index 23b5b642..c382099a 100644
--- a/include/trace/events/gk20a.h
+++ b/include/trace/events/gk20a.h
@@ -285,6 +285,25 @@ TRACE_EVENT(gk20a_channel_submitted_gpfifo,
285 __entry->flags, __entry->incr_id, __entry->incr_value) 285 __entry->flags, __entry->incr_id, __entry->incr_value)
286); 286);
287 287
288TRACE_EVENT(gk20a_channel_reset,
289 TP_PROTO(u32 hw_chid, u32 tsgid),
290
291 TP_ARGS(hw_chid, tsgid),
292
293 TP_STRUCT__entry(
294 __field(u32, hw_chid)
295 __field(u32, tsgid)
296 ),
297
298 TP_fast_assign(
299 __entry->hw_chid = hw_chid;
300 __entry->tsgid = tsgid;
301 ),
302
303 TP_printk("hw_chid=%d, tsgid=%d",
304 __entry->hw_chid, __entry->tsgid)
305);
306
288 307
289TRACE_EVENT(gk20a_as_dev_open, 308TRACE_EVENT(gk20a_as_dev_open,
290 TP_PROTO(const char *name), 309 TP_PROTO(const char *name),