On 12/7/2017 1:32 AM, Lionel Landwerlin
wrote:
I've put together some trival IGT tests : https://github.com/djdeath/intel-gpu-tools/commits/wip/djdeath/cpu-timestampsWent through the testcase. scaled_gpu_delta calculation is same as what timecounter does in kernel for calculating system_time corresponding to gpu timestamp hence we don't see much of delta between these two times/time deltas. Ideally we should be testing the system time delta by sampling system time and gpu timestamp atomically (which isn't feasible unless we do some precise adjustments) I have attempted to check these two times/delta by sampling them in debugfs and reading over variable periods manually and checking the delta. https://github.com/sakamble/i915-timestamp-support/commit/03be3056752d7b05a02cd01f5c20b3fcfcf18395 It is showing that delta is less than 10us in most cases for 30min and occasionally around 20-30us. Again this delta might be because of initial time setting as well. timecounter initializing system time and gpu clocks as pair should be highly accurate for which I have currently taken 350us start offset. I think gpu timestamp clock is highly stable as seen in my testing on SKL. I think this clock is used for calculations in GuC too so will be good to get confirmation about the stability of this clock from them and HW team. systemd-udevd-169 [001] .... 3.035812: i915_driver_load: sys start time: 1512308011156099790 systemd-udevd-169 [001] d... 3.036012: i915_cyclecounter_read: 52025098974 cat-1654 [001] .... 52.407957: i915_cyclecounter_read: 52617562292 cat-1654 [001] .... 52.407958: i915_timestamp_info: sys time: 1512308060527894638 cat-1654 [001] .... 52.407958: i915_timestamp_info: ts: 52617562292 device time: 1512308060528043050 cat-1684 [001] .... 177.239733: i915_cyclecounter_read: 54115543581 cat-1684 [001] .... 177.239736: i915_timestamp_info: sys time: 1512308185359666602 cat-1684 [001] .... 177.239737: i915_timestamp_info: ts: 54115543581 device time: 1512308185359817372 cat-1693 [001] .... 329.820374: i915_cyclecounter_read: 55946511277 cat-1693 [001] .... 329.820377: i915_timestamp_info: sys time: 1512308337940301732 cat-1693 [001] .... 329.820378: i915_timestamp_info: ts: 55946511277 device time: 1512308337940458996 <delta between system time delta and gpu time delta for above two samples (177, 329) = 6494ns> cat-1702 [001] .... 506.980313: i915_cyclecounter_read: 58072430542 cat-1702 [001] .... 506.980315: i915_timestamp_info: sys time: 1512308515100233102 cat-1702 [001] .... 506.980317: i915_timestamp_info: ts: 58072430542 device time: 1512308515100398084 <delta between system time delta and gpu time delta for above two samples (329, 506) = 6494ns>
|
_______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx