[PATCH v1] tests/kms_flip: Assert with twice of frame time while waiting fro vblank
Ville Syrjälä
ville.syrjala at linux.intel.com
Fri Oct 11 09:56:06 UTC 2024
On Fri, Oct 11, 2024 at 11:51:46AM +0530, Mitul Golani wrote:
> Instead of hardcoding to 500us, wait for twice of mode frame time while
> waiting for vblank. Motivation of this change is to remove hard coding
> of 500us, which comes out to be more stringent and ambiguous vs changing
> modeline.
>
> Signed-off-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
> ---
> tests/kms_flip.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/kms_flip.c b/tests/kms_flip.c
> index cbabbe74f..decffa961 100755
> --- a/tests/kms_flip.c
> +++ b/tests/kms_flip.c
> @@ -921,7 +921,7 @@ static bool run_test_step(struct test_output *o, unsigned int *events)
> 0, &reply));
> end = gettime_us();
> igt_debug("Vblank took %luus\n", end - start);
> - igt_assert(end - start < 500);
> + igt_assert(end - start < 2 * mode_frame_time(o));
The test is literally called TEST_VBLANK_EXPIRED_SEQ, which tells us
that it's expecting the target vblank seq to have expired already,
and thus the response should be "immediate". It doesn't matter at all
what kind of mode is in use.
> if (reply.sequence != exp_seq) {
> igt_debug("unexpected vblank seq %u, should be %u\n",
> reply.sequence, exp_seq);
> --
> 2.46.0
--
Ville Syrjälä
Intel
More information about the igt-dev
mailing list