]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915/selftest: Disable IRQ for timestamp calculation
authorAnshuman Gupta <anshuman.gupta@intel.com>
Tue, 30 Nov 2021 13:20:05 +0000 (18:50 +0530)
committerAnshuman Gupta <anshuman.gupta@intel.com>
Fri, 3 Dec 2021 08:14:13 +0000 (13:44 +0530)
commit20a33df0bdc00cb8935fb2c5b3078f7d3a89ee9f
treee7730e910dce23a400ae215b530554f2ad33324c
parent3e5a827b73c85b48a798231eedfaf07b0bf04dc6
drm/i915/selftest: Disable IRQ for timestamp calculation

gt_pm selftest calculates engine ticks cycles and wall time
cycles by delta of respective engine elapsed TIMESTAMP and ktime
for period of 1000us.
It compares the engine ticks cycles with wall time cycles.

Disable local cpu interrupt so that interrupt handler does not
switch out the thread during measure_clocks() and prevent
miscalculation of engine tick cycles.

v2:
- nuke preempt_{disable,enable}, as disable_local_irq()
  disable the preemption. (Chris)

Cc: Chris P Wilson <chris.p.wilson@intel.com>
Cc: Badal Nilawar <badal.nilawar@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Signed-off-by: Anshuman Gupta <anshuman.gupta@intel.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211130132005.6305-1-anshuman.gupta@intel.com
drivers/gpu/drm/i915/gt/selftest_gt_pm.c