lkml.org 
[lkml]   [2014]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 36/83] hsa/radeon: fixing clock counters bug
Date
From: Evgeny Pinchuk <evgeny.pinchuk@amd.com>

Fixed wrong reporting of timestamps in kfd_ioctl_get_clock_counters.

Signed-off-by: Evgeny Pinchuk <evgeny.pinchuk@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
drivers/gpu/hsa/radeon/kfd_chardev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/hsa/radeon/kfd_chardev.c b/drivers/gpu/hsa/radeon/kfd_chardev.c
index dba6084..75fe11f 100644
--- a/drivers/gpu/hsa/radeon/kfd_chardev.c
+++ b/drivers/gpu/hsa/radeon/kfd_chardev.c
@@ -304,10 +304,10 @@ kfd_ioctl_get_clock_counters(struct file *filep, struct kfd_process *p, void __u

/* No access to rdtsc. Using raw monotonic time */
getrawmonotonic(&time);
- args.cpu_clock_counter = time.tv_nsec;
+ args.cpu_clock_counter = (uint64_t)timespec_to_ns(&time);

get_monotonic_boottime(&time);
- args.system_clock_counter = time.tv_nsec;
+ args.system_clock_counter = (uint64_t)timespec_to_ns(&time);

/* Since the counter is in nano-seconds we use 1GHz frequency */
args.system_clock_freq = 1000000000;
--
1.9.1


\
 
 \ /
  Last update: 2014-07-11 03:41    [W:0.301 / U:2.228 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site