Revert "gpu: nvgpu: Improve accuracy of dGPU clk measurement"

The newly added nvgpu_current_time_ms API results in inaccurate time 
measurements sometime which causes nvgpu_dgpu_freq_test.sh to fail.

Bug 2637525
Bug 200530176

This reverts commit 318d6451e9.

Change-Id: I96279c556b3c044f590882b3bff358cfcb545ab1
Signed-off-by: Abdul Salam <absalam@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2147571
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Abdul Salam
2019-07-03 19:09:15 +05:30
committed by mobile promotions
parent 1c2968e27f
commit ffda24df36
7 changed files with 9 additions and 52 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2017-2018, NVIDIA CORPORATION. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
@@ -127,8 +127,3 @@ int nvgpu_init_soc_vars(struct gk20a *g)
#endif
return 0;
}
u64 nvgpu_us_counter(void)
{
return (u64)nvgpu_current_time_us();
}

View File

@@ -242,18 +242,6 @@ s64 nvgpu_current_time_ms(void)
return ktime_to_ms(ktime_get());
}
/**
* nvgpu_current_time_us - Time in microseconds from a monotonic clock.
*
* Return a clock in microsecond units. The start time of the clock is
* unspecified; the time returned can be compared with older ones to measure
* durations. The source clock does not jump when the system clock is adjusted.
*/
s64 nvgpu_current_time_us(void)
{
return ktime_to_us(ktime_get());
}
/**
* nvgpu_current_time_ns - Time in nanoseconds from a monotonic clock.
*
@@ -266,18 +254,6 @@ s64 nvgpu_current_time_ns(void)
return ktime_to_ns(ktime_get());
}
/**
* nvgpu_hr_timestamp_us - Time in microseconds from a monotonic clock.
*
* Return a clock in microsecond units. The start time of the clock is
* unspecified; the time returned can be compared with older ones to measure
* durations. The source clock does not jump when the system clock is adjusted.
*/
u64 nvgpu_hr_timestamp_us(void)
{
return nvgpu_us_counter();
}
/**
* nvgpu_hr_timestamp - Opaque 'high resolution' time stamp.
*