mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
Revert "Revert "gpu: nvgpu: Improve accuracy of dGPU clk measurement""
This reverts commit ffda24df36.
Bug 2637525
Bug 200530176
Change-Id: I542e51ea340f344768f9a3a090164964372fb5d2
Signed-off-by: Vaibhav Kachore <vkachore@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2148174
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
93ebeac3bd
commit
e8c53b4e81
@@ -242,6 +242,18 @@ 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.
|
||||
*
|
||||
@@ -254,6 +266,18 @@ 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.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user