[PATCH i-g-t v11 5/5] tests/kms_async_flips: Skip Async Flips with Linear Modifier

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Mon May 26 05:42:17 UTC 2025


Skip the linear modifier subtest on unsupported platforms

V2: Remove platform check and use in_formats_async (Chaitanya)
    Update the commit message

Signed-off-by: Santhosh Reddy Guddati <santhosh.reddy.guddati at intel.com>
---
 tests/kms_async_flips.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index f824f60f9..c144c8390 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -901,6 +901,18 @@ static void run_test_with_async_format_modifiers(data_t *data, void (*test)(data
 	igt_vec_fini(&tested_formats);
 }
 
+static bool is_linear_supported(data_t *data)
+{
+	int i;
+
+	for (i = 0; i < data->plane->async_format_mod_count; i++) {
+		if (data->plane->async_modifiers[i] == DRM_FORMAT_MOD_LINEAR)
+				return true;
+	}
+
+	return false;
+}
+
 static void run_test_with_modifiers(data_t *data, void (*test)(data_t *))
 {
 	if (data->atomic_path)
@@ -988,6 +1000,9 @@ igt_main
 		igt_describe("Wait for page flip events in between successive asynchronous "
 			     "flips with linear modifiers");
 		igt_subtest_with_dynamic("async-flip-with-page-flip-events-linear") {
+			igt_require(data.plane->async_format_mod_count > 0);
+			igt_skip_on_f(!is_linear_supported(&data),
+						  "Async Flips with linear modifier are not supported");
 			test_init_ops(&data);
 			data.linear_modifier = true;
 			run_test(&data, test_async_flip);
@@ -996,6 +1011,8 @@ igt_main
 		igt_describe("Wait for page flip events in between successive asynchronous "
 			     "flips using atomic path with linear modifiers");
 		igt_subtest_with_dynamic("async-flip-with-page-flip-events-linear-atomic") {
+			igt_skip_on_f(!is_linear_supported(&data),
+						  "Async Flips with linear modifier are not supported");
 			test_init_ops(&data);
 			data.linear_modifier = true;
 			run_test(&data, test_async_flip);
-- 
2.34.1



More information about the igt-dev mailing list