[PATCH i-g-t v2 1/2] tests/kms_flip: Adjust pass rate threshold based on frame rate
Naladala Ramanaidu
ramanaidu.naladala at intel.com
Wed Jul 2 05:34:14 UTC 2025
For high frame rates (>120 fps), the pass rate threshold is reduced
from 85% to 75% to account for increased timing sensitivity. This
change improves test reliability on high refresh rate displays,
where occasional frame drops are more likely due to tighter frame
intervals.
Signed-off-by: Naladala Ramanaidu <ramanaidu.naladala at intel.com>
Reviewed-by: Karthik B S <karthik.b.s at intel.com>
---
tests/kms_flip.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 98bdc169d..4dfa1c483 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1228,6 +1228,7 @@ static bool check_final_state(const struct test_output *o,
const struct event_state *es,
unsigned int elapsed)
{
+ int threshold = 85;
igt_assert_f(es->count > 0,
"no %s event received\n", es->name);
@@ -1239,16 +1240,19 @@ static bool check_final_state(const struct test_output *o,
int expected = elapsed / actual_frame_time(o);
float pass_rate = ((float)(count - error_count) / count) * 100;
+ if ((1000000.0/actual_frame_time(o)) > 120)
+ threshold = 75;
+
igt_info("Event %s: expected %d, counted %d, passrate = %.2f%%, encoder type %d\n",
es->name, expected, count, pass_rate, o->kencoder[0]->encoder_type);
/*
- * TODO: Review the use of the hardcoded threshold (85). This value is
+ * TODO: Review the use of the hardcoded threshold (85/75). This value is
* currently a placeholder for the acceptable pass rate. In the future,
* we should either justify this value or refine the logic to skip
* frames near the evasion time.
*/
- if (pass_rate < 85) {
+ if (pass_rate < threshold) {
igt_debug("dropped frames, expected %d, counted %d, passrate = %.2f%%, encoder type %d\n",
expected, count, pass_rate, o->kencoder[0]->encoder_type);
return false;
--
2.43.0
More information about the igt-dev
mailing list