Skip to content

Commit 264bc5d

Browse files
unerligerodrigovivi
authored andcommitted
drm/i915/selftest: Bump up sample period for busy stats selftest
Engine busyness samples around a 10ms period is failing with busyness ranging approx. from 87% to 115% as shown below. The expected range is +/- 5% of the sample period. Fail 10% of the time. rcs0: reported 11716042ns [91%] busyness while spinning [for 12805719ns] When determining busyness of active engine, the GuC based engine busyness implementation relies on a 64 bit timestamp register read. The latency incurred by this register read causes the failure. On DG1, when the test fails, the observed latencies range from 900us - 1.5ms. Optimizing the 2x32 read by acquiring the lock and forcewake prior to all reg reads reduces the rate of failure to around 2%, but does not eliminate it. In order to make the selftest more robust and always account for such latencies, increase the sample period to 100 ms. This eliminates the issue as seen in a 1000 runs. v2: (Ashutosh) - Add error to commit msg - Include gitlab bug - Update commit for inclusion of 2x32 optimized read Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/4418 Signed-off-by: Umesh Nerlige Ramappa <[email protected]> Acked-by: Tvrtko Ursulin <[email protected]> Reviewed-by: Ashutosh Dixit <[email protected]> Signed-off-by: John Harrison <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected] (cherry picked from commit 529d95a) Signed-off-by: Rodrigo Vivi <[email protected]>
1 parent 71b6b25 commit 264bc5d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/gpu/drm/i915/gt/selftest_engine_pm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ static int live_engine_busy_stats(void *arg)
317317
ENGINE_TRACE(engine, "measuring busy time\n");
318318
preempt_disable();
319319
de = intel_engine_get_busy_time(engine, &t[0]);
320-
mdelay(10);
320+
mdelay(100);
321321
de = ktime_sub(intel_engine_get_busy_time(engine, &t[1]), de);
322322
preempt_enable();
323323
dt = ktime_sub(t[1], t[0]);

0 commit comments

Comments
 (0)