Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_async_flips: Modify assert to fix failure seen on few platforms
@ 2020-10-12  9:40 Karthik B S
  2020-10-12 11:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Karthik B S @ 2020-10-12  9:40 UTC (permalink / raw)
  To: igt-dev; +Cc: sowmyax.kaparthi

Failure is seen on CI on few platforms as one of the flips in between is
taking longer time. To fix this, added a check to assert for individual
flips only for the alternate-sync-async-flip subtest. In the
async-flip-with-page-flip-events subtest we anyway check the overall FPS
at the end, so we do not need a check for individual flips and this should
take care of some random flip taking more time in between.

Also, reduced the MIN_FLIPS_PER_FRAME from 8 to 5 based on the failure
seen in CI.

Bug: https://gitlab.freedesktop.org/drm/intel/-/issues/2521

Signed-off-by: Karthik B S <karthik.b.s@intel.com>
---
 tests/kms_async_flips.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index 40aaef2c..dea23cf9 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -39,7 +39,7 @@
  */
 
 #define RUN_TIME 2
-#define MIN_FLIPS_PER_FRAME 8
+#define MIN_FLIPS_PER_FRAME 5
 
 IGT_TEST_DESCRIPTION("Test asynchronous page flips.");
 
@@ -205,10 +205,12 @@ static void test_async_flip(data_t *data, bool alternate_sync_async)
 		gettimeofday(&end, NULL);
 		timersub(&end, &start, &diff);
 
-		igt_assert_f(data->flip_interval < 1000.0 / (data->refresh_rate * MIN_FLIPS_PER_FRAME),
-			     "Flip interval not significantly smaller than vblank interval\n"
-			     "Flip interval: %lfms, Refresh Rate = %dHz, Threshold = %d\n",
-			     data->flip_interval, data->refresh_rate, MIN_FLIPS_PER_FRAME);
+		if (alternate_sync_async) {
+			igt_assert_f(data->flip_interval < 1000.0 / (data->refresh_rate * MIN_FLIPS_PER_FRAME),
+				     "Flip interval not significantly smaller than vblank interval\n"
+				     "Flip interval: %lfms, Refresh Rate = %dHz, Threshold = %d\n",
+				     data->flip_interval, data->refresh_rate, MIN_FLIPS_PER_FRAME);
+		}
 
 		frame++;
 	} while (diff.tv_sec < RUN_TIME);
-- 
2.22.0

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

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

end of thread, other threads:[~2020-11-20  4:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-10-12  9:40 [igt-dev] [PATCH i-g-t] tests/kms_async_flips: Modify assert to fix failure seen on few platforms Karthik B S
2020-10-12 11:13 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-10-12 16:56 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
     [not found]   ` <26a7a2dc43824cbb88294534d80645e1@intel.com>
     [not found]     ` <1377dfe2e86c489abc16bcebeced7b33@intel.com>
2020-11-20  4:33       ` Kunal Joshi
     [not found] ` <2c25c93b7a4048e9a82eee9fccd88c9b@intel.com>
2020-11-18  4:21   ` [igt-dev] FW: [PATCH i-g-t] " Kunal Joshi

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