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

Santhosh Reddy Guddati santhosh.reddy.guddati at intel.com
Tue Jun 3 09:27:58 UTC 2025


Skip the linear modifier subtest on unsupported platforms

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

V3: Fix crash

v4: Handle the case for linear modifiers on platforms where
IN_FORMATS_ASYNC is not supported. (Chaitanya)

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

diff --git a/tests/kms_async_flips.c b/tests/kms_async_flips.c
index f824f60f9..586ee5d84 100644
--- a/tests/kms_async_flips.c
+++ b/tests/kms_async_flips.c
@@ -901,6 +901,28 @@ 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_each_pipe_with_valid_output(&data->display, data->pipe, data->output) {
+		test_init(data);
+
+		/* for drivers that doesn't support IN_FORMATS_ASYNC yet,
+		 * assume linear modifier is supported.
+		 */
+		if (!igt_plane_has_prop(data->plane, IGT_PLANE_IN_FORMATS_ASYNC))
+			return true;
+
+		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 +1010,8 @@ 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_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 +1020,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