From 0725ff9372edc7e096a9d5e82b1fa8d28abcba60 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Fri, 16 Feb 2018 14:08:04 -0800 Subject: gpu: nvgpu: Abstract get_cycles() get_cycles is a linux specific API used in common code. This API is being used, it seems, as a method to generate time stamps. So add an API to generate 'high resolution' time stamps. This API returns an opaque time stamp: that is not something one may use directly as a time since in the Linux implementation we just use this cycle counter. Other implementations will, of course, be free to implement as a real time stamp. JIRA NVGPU-525 Change-Id: I237aac9bd6c795d000459025bdb4fce92e8aaa3d Signed-off-by: Alex Waterman Reviewed-on: https://git-master.nvidia.com/r/1673811 Reviewed-by: svc-mobile-coverity GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/bus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu/common/bus.c') diff --git a/drivers/gpu/nvgpu/common/bus.c b/drivers/gpu/nvgpu/common/bus.c index a84348cd..3889512a 100644 --- a/drivers/gpu/nvgpu/common/bus.c +++ b/drivers/gpu/nvgpu/common/bus.c @@ -42,7 +42,7 @@ int nvgpu_get_timestamps_zipper(struct gk20a *g, if (err) return err; - samples[i].cpu_timestamp = (u64)get_cycles(); + samples[i].cpu_timestamp = nvgpu_hr_timestamp(); } end: -- cgit v1.2.2