[PATCH i-g-t 1/3] tests/kms_async_flips: Fix suspend-resume subtest
B, Jeevan
jeevan.b at intel.com
Tue Jun 24 05:05:33 UTC 2025
> -----Original Message-----
> From: igt-dev <igt-dev-bounces at lists.freedesktop.org> On Behalf Of Karthik B
> S
> Sent: Thursday, June 19, 2025 4:54 PM
> To: igt-dev at lists.freedesktop.org
> Cc: Reddy Guddati, Santhosh <santhosh.reddy.guddati at intel.com>; Murthy,
> Arun R <arun.r.murthy at intel.com>; B S, Karthik <karthik.b.s at intel.com>
> Subject: [PATCH i-g-t 1/3] tests/kms_async_flips: Fix suspend-resume subtest
>
> Currently suspend-resume subtest is only running on the first pipe as the
> variable is set to false in the first iteration.
>
> Add a temp variable to avoid this and actually run the test on all the pipes as
> intended.
Can we add Fixes tag. If there is any issue around this ??
With this change looks good to me.
Reviewed-by: Jeevan B <jeevan.b at intel.com>
>
> Signed-off-by: Karthik B S <karthik.b.s at intel.com>
> ---
> tests/kms_async_flips.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c index
> 065ac9c49..0f2d932e4 100644
> --- a/tests/kms_async_flips.c
> +++ b/tests/kms_async_flips.c
> @@ -377,6 +377,7 @@ static void test_async_flip(data_t *data)
> long long int fps;
> struct timeval start, end, diff;
> int suspend_time = RUN_TIME / 2;
> + bool temp = data->suspend_resume;
>
> igt_display_commit2(&data->display, data->display.is_atomic ?
> COMMIT_ATOMIC : COMMIT_LEGACY);
>
> @@ -432,8 +433,8 @@ static void test_async_flip(data_t *data)
> data->flip_interval, data->refresh_rate,
> MIN_FLIPS_PER_FRAME);
> }
>
> - if (data->suspend_resume && diff.tv_sec == suspend_time) {
> - data->suspend_resume = false;
> + if (data->suspend_resume && diff.tv_sec == suspend_time &&
> temp) {
> + temp = false;
>
> igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> SUSPEND_TEST_NONE);
> }
> frame++;
> @@ -1028,6 +1029,7 @@ igt_main
> test_init_ops(&data);
> data.suspend_resume = true;
> run_test(&data, test_async_flip);
> + data.suspend_resume = false;
> }
>
> igt_fixture {
> --
> 2.43.0
More information about the igt-dev
mailing list