All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org,
	Vandita Kulkarni <vandita.kulkarni@intel.com>
Subject: Re: [PATCH i-g-t] tests/kms_async_flips: Re-calculate min flips per frame
Date: Fri, 15 Mar 2024 10:42:52 +0200	[thread overview]
Message-ID: <ZfQKDNg8PUgAlahN@intel.com> (raw)
In-Reply-To: <20240314055437.3942648-1-bhanuprakash.modem@intel.com>

On Thu, Mar 14, 2024 at 11:24:37AM +0530, Bhanuprakash Modem wrote:
> As XE driver taking longer time for pinning, re-calculate to
> reduce the expected min flips per frame (by assuming the min
> pinning time as 1.2 ms). Otherwise test will fail, since we
> can't achieve those many flips per frame.

MIN_FLIPS_PER_FRAME==5. If xe can't even achieve that low number
then it's very broken.

> 
> Cc: Vandita Kulkarni <vandita.kulkarni@intel.com>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>  tests/kms_async_flips.c | 19 ++++++++++++++++---
>  1 file changed, 16 insertions(+), 3 deletions(-)
> 
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index 2895168f7..ec2d86f4e 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -238,6 +238,19 @@ static void test_async_flip(data_t *data)
>  	int ret, frame;
>  	long long int fps;
>  	struct timeval start, end, diff;
> +	int min_flips_per_frame;
> +
> +	/*
> +	 * FIXME: As pinning is taking moretime in XE, recalculate min frames
> +	 * per frame (by considering the pinning time as 1.2 ms)
> +	 */
> +	min_flips_per_frame = 1000 / (data->refresh_rate * 1.2);
> +	igt_require(min_flips_per_frame);
> +
> +	if (min_flips_per_frame > MIN_FLIPS_PER_FRAME)
> +		min_flips_per_frame = MIN_FLIPS_PER_FRAME;
> +
> +	igt_info("Expected min flips per frame: %d\n", min_flips_per_frame);
>  
>  	igt_display_commit2(&data->display, data->display.is_atomic ? COMMIT_ATOMIC : COMMIT_LEGACY);
>  
> @@ -296,10 +309,10 @@ static void test_async_flip(data_t *data)
>  		timersub(&end, &start, &diff);
>  
>  		if (data->alternate_sync_async) {
> -			igt_assert_f(data->flip_interval < 1000.0 / (data->refresh_rate * MIN_FLIPS_PER_FRAME),
> +			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);
> +				     data->flip_interval, data->refresh_rate, min_flips_per_frame);
>  		}
>  
>  		frame++;
> @@ -307,7 +320,7 @@ static void test_async_flip(data_t *data)
>  
>  	if (!data->alternate_sync_async) {
>  		fps = frame * 1000 / RUN_TIME;
> -		igt_assert_f((fps / 1000) > (data->refresh_rate * MIN_FLIPS_PER_FRAME),
> +		igt_assert_f((fps / 1000) > (data->refresh_rate * min_flips_per_frame),
>  			     "FPS should be significantly higher than the refresh rate\n");
>  	}
>  }
> -- 
> 2.43.2

-- 
Ville Syrjälä
Intel

      parent reply	other threads:[~2024-03-15  8:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-14  5:54 [PATCH i-g-t] tests/kms_async_flips: Re-calculate min flips per frame Bhanuprakash Modem
2024-03-14  6:34 ` [i-g-t V2] " Bhanuprakash Modem
2024-03-14  7:05 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-03-14  7:08 ` ✓ CI.xeBAT: " Patchwork
2024-03-14  7:26 ` ✓ CI.xeBAT: success for tests/kms_async_flips: Re-calculate min flips per frame (rev2) Patchwork
2024-03-14  7:44 ` ✓ Fi.CI.BAT: " Patchwork
2024-03-14 20:50 ` ✗ Fi.CI.IGT: failure for tests/kms_async_flips: Re-calculate min flips per frame Patchwork
2024-03-14 22:00 ` ✗ Fi.CI.IGT: failure for tests/kms_async_flips: Re-calculate min flips per frame (rev2) Patchwork
2024-03-15  8:42 ` Ville Syrjälä [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZfQKDNg8PUgAlahN@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=vandita.kulkarni@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.