[PATCH i-g-t v3 1/5] tests/kms_async_flips: Fix suspend-resume subtest
Karthik B S
karthik.b.s at intel.com
Wed Jul 23 05:53:49 UTC 2025
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.
Fixes: 982a8d7bbc0b ("tests/kms_async_flips: Async flips suspend resume test")
Signed-off-by: Karthik B S <karthik.b.s at intel.com>
Reviewed-by: Jeevan B <jeevan.b 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 ddac904ce..4088d8211 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -388,6 +388,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);
@@ -452,8 +453,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);
}
@@ -1161,6 +1162,7 @@ igt_main
test_init_ops(&data);
data.suspend_resume = true;
run_test(&data, test_async_flip);
+ data.suspend_resume = false;
}
igt_describe("Verify basic modeset with all supported modifier and format combinations");
--
2.43.0
More information about the igt-dev
mailing list