[Intel-gfx] [RFC 0/4] GPU/CPU timestamps correlation for relating OA samples with system events
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Wed Dec 6 20:02:52 UTC 2017
I've put together some trival IGT tests :
https://github.com/djdeath/intel-gpu-tools/commits/wip/djdeath/cpu-timestamps
With a few changes which I pointed in the review :
https://github.com/djdeath/linux/commit/d0e4cf4d3f464491b4ffe97d112284d1ce73656d
Put together it seems to work relatively well.
There is still a small drift happening between the 2 timestamps. I've
noticed over a 160ms of OA reports, there is a accumulated difference of
~35us between the GPU timestamp and cpu timestamps.
I may be doing something wrong with the scaling in the tests, or maybe
there is an issue in the kernel, or both.
I'll build the GPUTop parts and see if the results make sense.
Thanks!,
-
Lionel
On 15/11/17 12:13, Sagar Arun Kamble wrote:
> We can compute system time corresponding to GPU timestamp by taking a
> reference point (CPU monotonic time, GPU timestamp) and then adding
> delta time computed using timecounter/cyclecounter support in kernel.
> We have to configure cyclecounter with the GPU timestamp frequency.
> Earlier approach that was based on cross-timestamp is not needed. It
> was being used to approximate the frequency based on invalid assumptions
> (possibly drift was being seen in the time due to precision issue).
> The precision of time from GPU clocks is already in ns and timecounter
> takes care of it as verified over variable durations.
>
> This series adds base timecounter/cyclecounter changes and changes to
> get GPU and CPU timestamps in OA samples.
>
> Sagar Arun Kamble (1):
> drm/i915/perf: Add support to correlate GPU timestamp with system time
>
> Sourab Gupta (3):
> drm/i915/perf: Add support for collecting 64 bit timestamps with OA
> reports
> drm/i915/perf: Extract raw GPU timestamps from OA reports
> drm/i915/perf: Send system clock monotonic time in perf samples
>
> drivers/gpu/drm/i915/i915_drv.h | 11 ++++
> drivers/gpu/drm/i915/i915_perf.c | 124 ++++++++++++++++++++++++++++++++++++++-
> drivers/gpu/drm/i915/i915_reg.h | 6 ++
> include/uapi/drm/i915_drm.h | 14 +++++
> 4 files changed, 154 insertions(+), 1 deletion(-)
>
More information about the Intel-gfx
mailing list