[PATCH i-g-t v1 1/2] tests/kms_flip: Adjust pass rate threshold based on frame rate

Karthik B S karthik.b.s at intel.com
Tue Jul 1 14:46:48 UTC 2025


On 7/1/2025 4:31 PM, Naladala Ramanaidu wrote:
> 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;


More information about the igt-dev mailing list