summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
diff options
context:
space:
mode:
authorKonsta Holtta <kholtta@nvidia.com>2018-05-17 08:33:29 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2018-05-24 07:37:34 -0400
commitd914e662aef07cc2c3c58971ad21a9cc5fa0ce4d (patch)
tree278da21d3c562b837a6d01a8c85f90ee2b8e72a9 /drivers/gpu/nvgpu/common/linux/ioctl_channel.c
parenta4d1a4830e13caecf5f39f15a716f3bd63f37c34 (diff)
gpu: nvgpu: use nvgpu_current_time_ns in submit profiling
Replace Linux-specific and dubious sched_clock() with common nvgpu_current_time_ns(). sched_clock() used also nanoseconds. Jira NVGPU-708 Change-Id: I70f992fe42cc9c3ffed374fdebd582867475e84f Signed-off-by: Konsta Holtta <kholtta@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1723202 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/ioctl_channel.c')
-rw-r--r--drivers/gpu/nvgpu/common/linux/ioctl_channel.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
index 057c81e2..f93412c3 100644
--- a/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
+++ b/drivers/gpu/nvgpu/common/linux/ioctl_channel.c
@@ -784,7 +784,7 @@ static int gk20a_ioctl_channel_submit_gpfifo(
784 profile = gk20a_fifo_profile_acquire(ch->g); 784 profile = gk20a_fifo_profile_acquire(ch->g);
785 785
786 if (profile) 786 if (profile)
787 profile->timestamp[PROFILE_IOCTL_ENTRY] = sched_clock(); 787 profile->timestamp[PROFILE_IOCTL_ENTRY] = nvgpu_current_time_ns();
788#endif 788#endif
789 if (ch->has_timedout) 789 if (ch->has_timedout)
790 return -ETIMEDOUT; 790 return -ETIMEDOUT;
@@ -827,7 +827,7 @@ static int gk20a_ioctl_channel_submit_gpfifo(
827 gk20a_fence_put(fence_out); 827 gk20a_fence_put(fence_out);
828#ifdef CONFIG_DEBUG_FS 828#ifdef CONFIG_DEBUG_FS
829 if (profile) { 829 if (profile) {
830 profile->timestamp[PROFILE_IOCTL_EXIT] = sched_clock(); 830 profile->timestamp[PROFILE_IOCTL_EXIT] = nvgpu_current_time_ns();
831 gk20a_fifo_profile_release(ch->g, profile); 831 gk20a_fifo_profile_release(ch->g, profile);
832 } 832 }
833#endif 833#endif