Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_async_flips: Fix flip timestamp checks
@ 2021-04-27 22:25 Ville Syrjala
  2021-04-27 23:12 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Ville Syrjala @ 2021-04-27 22:25 UTC (permalink / raw)
  To: igt-dev

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Check the flip timestamp from the event (not the time we got the
event) against the vblank timestamps. Also if things are going
well we should expect the flip timestamp to in fact match the
first vblank timestamp, so allow them to be equal.

Cc: Karthik B S <karthik.b.s@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 tests/kms_async_flips.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index e397a54b874f..a60eab688024 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -89,7 +89,7 @@ static void flip_handler(int fd_, unsigned int sequence, unsigned int tv_sec,
 
 	last_ms = cur_ms;
 
-	data->flip_timestamp_us = ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
+	data->flip_timestamp_us = tv_sec * 1000000l + tv_usec;
 }
 
 static void wait_flip_event(data_t *data)
@@ -282,7 +282,7 @@ static void test_timestamp(data_t *data)
 	igt_info("vbl1_timestamp = %ldus\nflip_timestamp = %ldus\nvbl2_timestamp = %ldus\n",
 		 vbl_time, data->flip_timestamp_us, vbl_time1);
 
-	igt_assert_f(vbl_time < data->flip_timestamp_us && vbl_time1 > data->flip_timestamp_us,
+	igt_assert_f(vbl_time <= data->flip_timestamp_us && vbl_time1 > data->flip_timestamp_us,
 		     "Async flip time stamp is expected to be in between 2 vblank time stamps\n");
 }
 
-- 
2.26.3

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2021-05-04 11:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-27 22:25 [igt-dev] [PATCH i-g-t] tests/kms_async_flips: Fix flip timestamp checks Ville Syrjala
2021-04-27 23:12 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2021-04-28  2:37 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_async_flips: Fix flip timestamp checks (rev2) Patchwork
2021-04-28  5:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2021-04-28 14:38 ` [igt-dev] [PATCH i-g-t] tests/kms_async_flips: Fix flip timestamp checks Juha-Pekka Heikkila
2021-04-29  5:37 ` Karthik B S
2021-04-29 15:32   ` Ville Syrjälä
2021-05-04 11:12     ` Karthik B S

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox