[PATCH i-g-t] tests/kms_setmode: Ignore first timestamp when computing vblank statistics

Mika Kahola mika.kahola at intel.com
Tue May 12 10:48:42 UTC 2020


kms_setmode is flip flopping due to wondering vblank timestamps. For vblank
statistics the first timestamp is taken long before we enter to actual loop
to test vblank accurary. Let's ignore the first timestamp in order to ensure
that it does not distort the statistics.

Jira: VLK-6507

Signed-off-by: Mika Kahola <mika.kahola at intel.com>
---
 tests/kms_setmode.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/kms_setmode.c b/tests/kms_setmode.c
index 802a9c3d..1fd4f687 100644
--- a/tests/kms_setmode.c
+++ b/tests/kms_setmode.c
@@ -475,7 +475,8 @@ static void check_timings(int crtc_idx, const drmModeModeInfo *kmode)
 		now *= 1000000;
 		now += ev.tv_usec;
 
-		igt_stats_push(&stats, now - last_timestamp);
+		if (n > 0)
+			igt_stats_push(&stats, now - last_timestamp);
 
 		last_timestamp = now;
 		last_seq = ev.sequence;
-- 
2.20.1



More information about the Intel-gfx-trybot mailing list