summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/channel.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/channel.c b/drivers/gpu/nvgpu/common/linux/channel.c
index 727b5067..7810bc21 100644
--- a/drivers/gpu/nvgpu/common/linux/channel.c
+++ b/drivers/gpu/nvgpu/common/linux/channel.c
@@ -19,7 +19,6 @@
19#include <nvgpu/ltc.h> 19#include <nvgpu/ltc.h>
20#include <nvgpu/error_notifier.h> 20#include <nvgpu/error_notifier.h>
21#include <nvgpu/os_sched.h> 21#include <nvgpu/os_sched.h>
22#include <nvgpu/timers.h>
23 22
24/* 23/*
25 * This is required for nvgpu_vm_find_buf() which is used in the tracing 24 * This is required for nvgpu_vm_find_buf() which is used in the tracing
@@ -812,8 +811,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
812 return -EINVAL; 811 return -EINVAL;
813 } 812 }
814 813
815 if (profile) 814 gk20a_fifo_profile_snapshot(profile, PROFILE_ENTRY);
816 profile->timestamp[PROFILE_ENTRY] = nvgpu_current_time_ns();
817 815
818 /* update debug settings */ 816 /* update debug settings */
819 nvgpu_ltc_sync_enabled(g); 817 nvgpu_ltc_sync_enabled(g);
@@ -961,8 +959,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
961 goto clean_up_job; 959 goto clean_up_job;
962 } 960 }
963 961
964 if (profile) 962 gk20a_fifo_profile_snapshot(profile, PROFILE_JOB_TRACKING);
965 profile->timestamp[PROFILE_JOB_TRACKING] = nvgpu_current_time_ns();
966 963
967 if (wait_cmd) 964 if (wait_cmd)
968 gk20a_submit_append_priv_cmdbuf(c, wait_cmd); 965 gk20a_submit_append_priv_cmdbuf(c, wait_cmd);
@@ -986,8 +983,7 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
986 if (need_job_tracking) 983 if (need_job_tracking)
987 /* TODO! Check for errors... */ 984 /* TODO! Check for errors... */
988 gk20a_channel_add_job(c, job, skip_buffer_refcounting); 985 gk20a_channel_add_job(c, job, skip_buffer_refcounting);
989 if (profile) 986 gk20a_fifo_profile_snapshot(profile, PROFILE_APPEND);
990 profile->timestamp[PROFILE_APPEND] = nvgpu_current_time_ns();
991 987
992 g->ops.fifo.userd_gp_put(g, c); 988 g->ops.fifo.userd_gp_put(g, c);
993 989
@@ -1005,8 +1001,8 @@ int gk20a_submit_channel_gpfifo(struct channel_gk20a *c,
1005 nvgpu_log_info(g, "post-submit put %d, get %d, size %d", 1001 nvgpu_log_info(g, "post-submit put %d, get %d, size %d",
1006 c->gpfifo.put, c->gpfifo.get, c->gpfifo.entry_num); 1002 c->gpfifo.put, c->gpfifo.get, c->gpfifo.entry_num);
1007 1003
1008 if (profile) 1004 gk20a_fifo_profile_snapshot(profile, PROFILE_END);
1009 profile->timestamp[PROFILE_END] = nvgpu_current_time_ns(); 1005
1010 nvgpu_log_fn(g, "done"); 1006 nvgpu_log_fn(g, "done");
1011 return err; 1007 return err;
1012 1008