]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftests: Rearrange ktime_get to reduce latency against CS
authorChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Jan 2021 20:40:22 +0000 (20:40 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Fri, 8 Jan 2021 21:35:54 +0000 (21:35 +0000)
commit5bed556cf717d9ce117f0bc5a36c4726c736923e
tree68c48b6f07c3f7c7c873508ea3ca7e542aca9530
parent972702e38faf95d956d813d89a600458454f902a
drm/i915/selftests: Rearrange ktime_get to reduce latency against CS

In our tests where we measure the elapsed time on both the CPU and CS
using a udelay, our CS results match the udelay much more accurately
than the ktime (even when using ktime_get_fast_ns). With preemption
disabled, we can go one step lower than ktime and use local_clock.

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2919
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Andi Shyti <andi.shyti@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210108204026.20682-3-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/gt/selftest_engine_pm.c