[igt-dev] [PATCH i-g-t] tests/kms_async_flips: Fix flip timestamp checks
Juha-Pekka Heikkila
juhapekka.heikkila at gmail.com
Wed Apr 28 14:38:32 UTC 2021
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
On 28.4.2021 1.25, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala at linux.intel.com>
>
> Check the flip timestamp from the event (not the time we got the
> event) against the vblank timestamps. Also if things are going
> well we should expect the flip timestamp to in fact match the
> first vblank timestamp, so allow them to be equal.
>
> Cc: Karthik B S <karthik.b.s at intel.com>
> Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
> ---
> tests/kms_async_flips.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
> index e397a54b874f..a60eab688024 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -89,7 +89,7 @@ static void flip_handler(int fd_, unsigned int sequence, unsigned int tv_sec,
>
> last_ms = cur_ms;
>
> - data->flip_timestamp_us = ts.tv_sec * 1000000 + ts.tv_nsec / 1000;
> + data->flip_timestamp_us = tv_sec * 1000000l + tv_usec;
> }
>
> static void wait_flip_event(data_t *data)
> @@ -282,7 +282,7 @@ static void test_timestamp(data_t *data)
> igt_info("vbl1_timestamp = %ldus\nflip_timestamp = %ldus\nvbl2_timestamp = %ldus\n",
> vbl_time, data->flip_timestamp_us, vbl_time1);
>
> - igt_assert_f(vbl_time < data->flip_timestamp_us && vbl_time1 > data->flip_timestamp_us,
> + igt_assert_f(vbl_time <= data->flip_timestamp_us && vbl_time1 > data->flip_timestamp_us,
> "Async flip time stamp is expected to be in between 2 vblank time stamps\n");
> }
>
>
More information about the igt-dev
mailing list