public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests
@ 2026-04-16 15:54 Juha-Pekka Heikkila
  2026-04-16 15:54 ` [PATCH i-g-t v2 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init Juha-Pekka Heikkila
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Juha-Pekka Heikkila @ 2026-04-16 15:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Juha-Pekka Heikkila

Some refactor for test and then last patch is fix for test to find mode
with lowest bandwidth requirement for tests.

v2: small refinements

/Juha-Pekka

Juha-Pekka Heikkila (4):
  tests/intel/kms_sharpness_filter: sanitize subtest init
  tests/intel/kms_sharpness_filter: refactor test_sharpness_filter
    function
  tests/intel/kms_sharpness_filter: restructure igt_main
  tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement
    for test

 tests/intel/kms_sharpness_filter.c | 632 ++++++++++++++++-------------
 1 file changed, 347 insertions(+), 285 deletions(-)

-- 
2.43.0


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH i-g-t v2 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
@ 2026-04-16 15:54 ` Juha-Pekka Heikkila
  2026-04-16 15:54 ` [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function Juha-Pekka Heikkila
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 12+ messages in thread
From: Juha-Pekka Heikkila @ 2026-04-16 15:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Juha-Pekka Heikkila, Swati Sharma

reset flags to defaults in one place as well as table test names.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
---
 tests/intel/kms_sharpness_filter.c | 204 ++++++++++++-----------------
 1 file changed, 87 insertions(+), 117 deletions(-)

diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index bdfdf1d08..baf9bc141 100644
--- a/tests/intel/kms_sharpness_filter.c
+++ b/tests/intel/kms_sharpness_filter.c
@@ -423,6 +423,56 @@ static bool has_sharpness_filter(igt_crtc_t *crtc)
 	return igt_crtc_has_prop(crtc, IGT_CRTC_SHARPNESS_STRENGTH);
 }
 
+static const char * const test_type_names[] = {
+	[TEST_FILTER_BASIC]                     = "basic",
+	[TEST_FILTER_MODIFIERS]                 = NULL,
+	[TEST_FILTER_ROTATION]                  = NULL,
+	[TEST_FILTER_FORMATS]                   = NULL,
+	[TEST_FILTER_STRENGTH]                  = NULL,
+	[TEST_FILTER_TOGGLE]                    = "toggle",
+	[TEST_FILTER_TAP]                       = NULL,
+	[TEST_FILTER_DPMS]                      = "dpms",
+	[TEST_FILTER_SUSPEND]                   = "suspend",
+	[TEST_FILTER_UPSCALE]                   = "upscale",
+	[TEST_FILTER_DOWNSCALE]                 = "downscale",
+	[TEST_INVALID_FILTER_WITH_SCALER]       = "invalid-filter-with-scaler",
+	[TEST_INVALID_FILTER_WITH_PLANE]        = "invalid-filter-with-plane",
+	[TEST_INVALID_PLANE_WITH_FILTER]        = "invalid-plane-with-filter",
+	[TEST_INVALID_FILTER_WITH_SCALING_MODE] = NULL,
+};
+
+static void build_test_suffix(data_t *data, enum test_type type,
+			      char *name, size_t len)
+{
+	if (test_type_names[type]) {
+		snprintf(name, len, "-%s", test_type_names[type]);
+		return;
+	}
+
+	/* suffix depends on the current test parameters */
+	switch (type) {
+	case TEST_FILTER_MODIFIERS:
+		snprintf(name, len, "-%s", data->modifier_name);
+		break;
+	case TEST_FILTER_ROTATION:
+		snprintf(name, len, "-%srot",
+			 igt_plane_rotation_name(data->rotation));
+		break;
+	case TEST_FILTER_FORMATS:
+		snprintf(name, len, "-%s", igt_format_str(data->format));
+		break;
+	case TEST_FILTER_STRENGTH:
+		snprintf(name, len, "-strength-%d", data->filter_strength);
+		break;
+	case TEST_INVALID_FILTER_WITH_SCALING_MODE:
+		snprintf(name, len, "-invalid-filter-with-scaling-mode-%s",
+			 kmstest_scaling_mode_str(data->scaling_mode));
+		break;
+	default:
+		igt_assert_f(false, "Unhandled test type %d\n", type);
+	}
+}
+
 static void
 run_sharpness_filter_test(data_t *data, enum test_type type)
 {
@@ -446,7 +496,8 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
 			 * Until then, run on non-joiner mode in joiner configuration.
 			 */
 			if (is_joiner_mode(data->drm_fd, data->output)) {
-				data->mode = igt_get_non_joiner_mode(data->drm_fd, data->output);
+				data->mode = igt_get_non_joiner_mode(data->drm_fd,
+								     data->output);
 				if (!data->mode) {
 					igt_info("No non-joiner mode found on output %s\n",
 						 igt_output_name(data->output));
@@ -476,9 +527,6 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
 
 			if (type == TEST_FILTER_TAP) {
 				drmModeModeInfo *modes[3] = { NULL, NULL, NULL };
-				int num_taps = ARRAY_SIZE(filter_tap_list);
-
-				igt_assert(num_taps == 3);
 
 				get_modes_for_filter_taps(output, modes);
 				for (int i = 0; i < 3; i++) {
@@ -486,11 +534,16 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
 					if (!modes[i])
 						continue;
 					data->mode = modes[i];
-				        igt_info("Mode %dx%d@%d on output %s\n", data->mode->hdisplay, data->mode->vdisplay,
-						  data->mode->vrefresh, igt_output_name(data->output));
-					igt_output_override_mode(data->output, data->mode);
+					igt_info("Mode %dx%d@%d on output %s\n",
+						 data->mode->hdisplay,
+						 data->mode->vdisplay,
+						 data->mode->vrefresh,
+						 igt_output_name(data->output));
+					igt_output_override_mode(data->output,
+								 data->mode);
 
-					snprintf(name, sizeof(name), "-tap-%d", data->filter_tap);
+					snprintf(name, sizeof(name), "-tap-%d",
+						 data->filter_tap);
 					igt_dynamic_f("pipe-%s-%s%s",
 						       igt_crtc_name(data->crtc),
 						       data->output->name, name)
@@ -499,59 +552,13 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
 
 				if (data->limited)
 					break;
-
 				continue;
 			}
 
-			switch (type) {
-			case TEST_FILTER_BASIC:
-				snprintf(name, sizeof(name), "-basic");
-				break;
-			case TEST_FILTER_MODIFIERS:
-				snprintf(name, sizeof(name), "-%s", data->modifier_name);
-				break;
-			case TEST_FILTER_ROTATION:
-				snprintf(name, sizeof(name), "-%srot", igt_plane_rotation_name(data->rotation));
-				break;
-			case TEST_FILTER_FORMATS:
-				snprintf(name, sizeof(name), "-%s", igt_format_str(data->format));
-				break;
-			case TEST_FILTER_STRENGTH:
-				snprintf(name, sizeof(name), "-strength-%d", data->filter_strength);
-				break;
-			case TEST_FILTER_TOGGLE:
-				snprintf(name, sizeof(name), "-toggle");
-				break;
-			case TEST_FILTER_DPMS:
-				snprintf(name, sizeof(name), "-dpms");
-				break;
-			case TEST_FILTER_SUSPEND:
-				snprintf(name, sizeof(name), "-suspend");
-				break;
-			case TEST_FILTER_UPSCALE:
-				snprintf(name, sizeof(name), "-upscale");
-				break;
-			case TEST_FILTER_DOWNSCALE:
-				snprintf(name, sizeof(name), "-downscale");
-				break;
-			case TEST_INVALID_FILTER_WITH_SCALER:
-				snprintf(name, sizeof(name), "-invalid-filter-with-scaler");
-				break;
-			case TEST_INVALID_FILTER_WITH_PLANE:
-				snprintf(name, sizeof(name), "-invalid-filter-with-plane");
-				break;
-			case TEST_INVALID_PLANE_WITH_FILTER:
-				snprintf(name, sizeof(name), "-invalid-plane-with-filter");
-				break;
-			case TEST_INVALID_FILTER_WITH_SCALING_MODE:
-				snprintf(name, sizeof(name), "-invalid-filter-with-scaling-mode-%s", kmstest_scaling_mode_str(data->scaling_mode));
-				break;
-			default:
-				igt_assert(0);
-			}
+			build_test_suffix(data, type, name, sizeof(name));
 
 			igt_dynamic_f("pipe-%s-%s%s",
-				        igt_crtc_name(data->crtc),
+				      igt_crtc_name(data->crtc),
 				      data->output->name, name)
 				test_sharpness_filter(data, type);
 
@@ -561,6 +568,15 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
 	}
 }
 
+static void set_data_defaults(data_t *data)
+{
+	data->modifier        = DRM_FORMAT_MOD_LINEAR;
+	data->modifier_name   = modifiers[0].name;
+	data->rotation        = IGT_ROTATION_0;
+	data->format          = DRM_FORMAT_XRGB8888;
+	data->filter_strength = MID_FILTER_STRENGTH;
+}
+
 static int opt_handler(int opt, int opt_index, void *_data)
 {
 	data_t *data = _data;
@@ -595,20 +611,14 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 
 	igt_describe("Verify basic content adaptive sharpness filter.");
 	igt_subtest_with_dynamic("filter-basic") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_FILTER_BASIC);
 	}
 
 	igt_describe("Verify that varying strength(0-255), affects "
 		     "the degree of sharpeness applied.");
 	igt_subtest_with_dynamic("filter-strength") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
+		set_data_defaults(&data);
 
 		for (int i = 0; i < ARRAY_SIZE(filter_strength_list); i++) {
 			data.filter_strength = filter_strength_list[i];
@@ -620,9 +630,7 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 	igt_describe("Verify content adaptive sharpness filter with "
 		     "varying modifiers.");
 	igt_subtest_with_dynamic("filter-modifiers") {
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
+		set_data_defaults(&data);
 
 		for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
 			data.modifier = modifiers[i].modifier;
@@ -635,9 +643,7 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 	igt_describe("Verify content adaptive sharpness filter with "
 		     "varying rotations.");
 	igt_subtest_with_dynamic("filter-rotations") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
+		set_data_defaults(&data);
 
 		for (int i = 0; i < ARRAY_SIZE(rotations); i++) {
 			data.rotation = rotations[i];
@@ -649,9 +655,7 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 	igt_describe("Verify content adaptive sharpness filter with "
 		     "varying formats.");
 	igt_subtest_with_dynamic("filter-formats") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.filter_strength = MID_FILTER_STRENGTH;
+		set_data_defaults(&data);
 
 		for (int i = 0; i < ARRAY_SIZE(formats); i++) {
 			data.format = formats[i];
@@ -663,10 +667,7 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 	igt_describe("Verify toggling between enabling and disabling "
 		     "content adaptive sharpness filter.");
 	igt_subtest_with_dynamic("filter-toggle") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-
+		set_data_defaults(&data);
 		data.filter_strength = MAX_FILTER_STRENGTH;
 		run_sharpness_filter_test(&data, TEST_FILTER_TOGGLE);
 	}
@@ -674,55 +675,35 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 	igt_describe("Verify that following a resolution change, "
 		     "distict taps are selected.");
 	igt_subtest_with_dynamic("filter-tap") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_FILTER_TAP);
 	}
 
 	igt_describe("Verify content adaptive sharpness filter "
 		     "with DPMS.");
 	igt_subtest_with_dynamic("filter-dpms") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_FILTER_DPMS);
 	}
 
 	igt_describe("Verify content adaptive sharpness filter "
 		     "with suspend.");
 	igt_subtest_with_dynamic("filter-suspend") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_FILTER_SUSPEND);
 	}
 
 	igt_describe("Verify content adaptive sharpness filter "
 		     "with 1 plane scaler enabled.");
 	igt_subtest_with_dynamic("filter-scaler-upscale") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_FILTER_UPSCALE);
 	}
 
 	igt_describe("Verify content adaptive sharpness filter "
 		     "with 1 plane scaler enabled.");
 	igt_subtest_with_dynamic("filter-scaler-downscale") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_FILTER_DOWNSCALE);
 	}
 
@@ -730,11 +711,7 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 		     "when 2 plane scalers have already been enabled and "
 		     "attempt is made to enable sharpness filter.");
 	igt_subtest_with_dynamic("invalid-filter-with-scaler") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
-
+		set_data_defaults(&data);
 		run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_SCALER);
 	}
 
@@ -742,10 +719,8 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 		     "when 2 NV12 planes have already been enabled and attempt is "
 		     "made to enable the sharpness filter.");
 	igt_subtest_with_dynamic("invalid-filter-with-plane") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
+		set_data_defaults(&data);
 		data.format = DRM_FORMAT_NV12;
-		data.filter_strength = MID_FILTER_STRENGTH;
 
 		run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_PLANE);
 	}
@@ -754,10 +729,8 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 		     "when 1 NV12 plane and sharpness filter have already been enabled "
 		     "and attempt is made to enable the second NV12 plane.");
 	igt_subtest_with_dynamic("invalid-plane-with-filter") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
+		set_data_defaults(&data);
 		data.format = DRM_FORMAT_NV12;
-		data.filter_strength = MID_FILTER_STRENGTH;
 
 		run_sharpness_filter_test(&data, TEST_INVALID_PLANE_WITH_FILTER);
 	}
@@ -766,10 +739,7 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 		     "when scaling mode is already enabled and attempt is made "
 		     "to enable sharpness filter.");
 	igt_subtest_with_dynamic("invalid-filter-with-scaling-mode") {
-		data.modifier = DRM_FORMAT_MOD_LINEAR;
-		data.rotation = IGT_ROTATION_0;
-		data.format = DRM_FORMAT_XRGB8888;
-		data.filter_strength = MID_FILTER_STRENGTH;
+		set_data_defaults(&data);
 
 		for (int k = 0; k < ARRAY_SIZE(scaling_modes); k++) {
 			data.scaling_mode = scaling_modes[k];
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
  2026-04-16 15:54 ` [PATCH i-g-t v2 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init Juha-Pekka Heikkila
@ 2026-04-16 15:54 ` Juha-Pekka Heikkila
  2026-04-16 19:53   ` Sharma, Swati2
  2026-04-16 15:54 ` [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main Juha-Pekka Heikkila
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Juha-Pekka Heikkila @ 2026-04-16 15:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Juha-Pekka Heikkila

refactor to make it look more nice

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/intel/kms_sharpness_filter.c | 108 ++++++++++++++++-------------
 1 file changed, 59 insertions(+), 49 deletions(-)

diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index baf9bc141..b1c80eecd 100644
--- a/tests/intel/kms_sharpness_filter.c
+++ b/tests/intel/kms_sharpness_filter.c
@@ -88,15 +88,6 @@ IGT_TEST_DESCRIPTION("Test to validate content adaptive sharpness filter");
 #define MAX_PIXELS_FOR_3_TAP_FILTER	(1920 * 1080)
 #define MAX_PIXELS_FOR_5_TAP_FILTER	(3840 * 2160)
 #define NROUNDS				10
-#define INVALID_TEST ((type == TEST_INVALID_FILTER_WITH_SCALER) \
-		   || (type == TEST_INVALID_FILTER_WITH_PLANE) \
-		   || (type == TEST_INVALID_PLANE_WITH_FILTER) \
-		   || (type == TEST_INVALID_FILTER_WITH_SCALING_MODE))
-#define SET_PLANES ((type == TEST_FILTER_UPSCALE) \
-		||  (type == TEST_FILTER_DOWNSCALE) \
-		||  (type == TEST_INVALID_FILTER_WITH_SCALER) \
-		||  (type == TEST_INVALID_FILTER_WITH_PLANE) \
-		||  (type == TEST_INVALID_FILTER_WITH_SCALING_MODE))
 
 enum test_type {
 	TEST_FILTER_BASIC,
@@ -326,12 +317,37 @@ static int test_filter_toggle(data_t *data)
 	return ret;
 }
 
-static void test_sharpness_filter(data_t *data,  enum test_type type)
+static bool is_invalid_test(enum test_type type)
+{
+	switch (type) {
+	case TEST_INVALID_FILTER_WITH_SCALER:
+	case TEST_INVALID_FILTER_WITH_PLANE:
+	case TEST_INVALID_PLANE_WITH_FILTER:
+	case TEST_INVALID_FILTER_WITH_SCALING_MODE:
+		return true;
+	default:
+		return false;
+	}
+}
+
+static bool needs_extra_planes(enum test_type type)
+{
+	switch (type) {
+	case TEST_FILTER_UPSCALE:
+	case TEST_FILTER_DOWNSCALE:
+	case TEST_INVALID_FILTER_WITH_SCALER:
+	case TEST_INVALID_FILTER_WITH_PLANE:
+	case TEST_INVALID_FILTER_WITH_SCALING_MODE:
+		return true;
+	default:
+		return false;
+	}
+}
+
+static void test_sharpness_filter(data_t *data, enum test_type type)
 {
 	igt_output_t *output = data->output;
 	drmModeModeInfo *mode = data->mode;
-	int height = mode->hdisplay;
-	int width =  mode->vdisplay;
 	igt_crc_t ref_crc, crc;
 	igt_pipe_crc_t *pipe_crc = NULL;
 	int ret;
@@ -342,57 +358,31 @@ static void test_sharpness_filter(data_t *data,  enum test_type type)
 		      "No requested format/modifier on pipe %s\n",
 		      igt_crtc_name(data->crtc));
 
-	setup_fb(data->drm_fd, height, width, data->format, data->modifier, &data->fb[0]);
+	setup_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
+		 data->format, data->modifier, &data->fb[0]);
 	igt_plane_set_fb(data->plane[0], &data->fb[0]);
 
 	if (type == TEST_FILTER_ROTATION) {
-		if (igt_plane_has_rotation(data->plane[0], data->rotation))
-			igt_plane_set_rotation(data->plane[0], data->rotation);
-		else
-			igt_skip("No requested rotation on pipe %s\n",
-				 igt_crtc_name(data->crtc));
+		igt_skip_on_f(!igt_plane_has_rotation(data->plane[0],
+						      data->rotation),
+			      "No requested rotation on pipe %s\n",
+			      igt_crtc_name(data->crtc));
+		igt_plane_set_rotation(data->plane[0], data->rotation);
 	}
 
 	if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
 		igt_require_f(has_scaling_mode(output), "No connecter scaling mode found on %s\n", output->name);
 
-	if (SET_PLANES)
+	if (needs_extra_planes(type))
 		set_planes(data, type);
 
 	set_filter_strength_on_pipe(data);
 
-	if (!INVALID_TEST && data->filter_strength != 0)
-		igt_debug("Sharpened image should be observed for filter strength > 0\n");
-
 	if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
 		ret = igt_display_try_commit_atomic(&data->display, 0, NULL);
 	else
 		ret = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
 
-	if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
-		pipe_crc = igt_crtc_crc_new(data->crtc,
-					    IGT_PIPE_CRC_SOURCE_AUTO);
-		igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
-	}
-
-	if (type == TEST_FILTER_DPMS) {
-		kmstest_set_connector_dpms(data->drm_fd,
-					   output->config.connector,
-					   DRM_MODE_DPMS_OFF);
-		kmstest_set_connector_dpms(data->drm_fd,
-					   output->config.connector,
-					   DRM_MODE_DPMS_ON);
-	}
-
-	if (type == TEST_FILTER_SUSPEND)
-		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
-					      SUSPEND_TEST_NONE);
-
-	if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
-		igt_pipe_crc_collect_crc(pipe_crc, &crc);
-		igt_assert_crc_equal(&crc, &ref_crc);
-	}
-
 	if (type == TEST_FILTER_TOGGLE)
 		ret |= test_filter_toggle(data);
 
@@ -408,13 +398,33 @@ static void test_sharpness_filter(data_t *data,  enum test_type type)
 		ret = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
 	}
 
-	if (INVALID_TEST)
+	if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
+		pipe_crc = igt_crtc_crc_new(data->crtc,
+					    IGT_PIPE_CRC_SOURCE_AUTO);
+		igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
+
+		if (type == TEST_FILTER_DPMS) {
+			kmstest_set_connector_dpms(data->drm_fd,
+						   output->config.connector,
+						   DRM_MODE_DPMS_OFF);
+			kmstest_set_connector_dpms(data->drm_fd,
+						   output->config.connector,
+						   DRM_MODE_DPMS_ON);
+		} else {
+			igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
+						      SUSPEND_TEST_NONE);
+		}
+
+		igt_pipe_crc_collect_crc(pipe_crc, &crc);
+		igt_assert_crc_equal(&crc, &ref_crc);
+		igt_pipe_crc_free(pipe_crc);
+	}
+
+	if (is_invalid_test(type))
 		igt_assert_eq(ret, -EINVAL);
 	else
 		igt_assert_eq(ret, 0);
 
-	/* clean-up */
-	igt_pipe_crc_free(pipe_crc);
 	cleanup(data);
 }
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
  2026-04-16 15:54 ` [PATCH i-g-t v2 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init Juha-Pekka Heikkila
  2026-04-16 15:54 ` [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function Juha-Pekka Heikkila
@ 2026-04-16 15:54 ` Juha-Pekka Heikkila
  2026-04-16 19:53   ` Sharma, Swati2
  2026-04-16 15:54 ` [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 12+ messages in thread
From: Juha-Pekka Heikkila @ 2026-04-16 15:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Juha-Pekka Heikkila

collect tests into list and call them through there

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/intel/kms_sharpness_filter.c | 315 +++++++++++++++++------------
 1 file changed, 182 insertions(+), 133 deletions(-)

diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index b1c80eecd..98eb671d1 100644
--- a/tests/intel/kms_sharpness_filter.c
+++ b/tests/intel/kms_sharpness_filter.c
@@ -19,7 +19,7 @@
  * Description: Verify basic content adaptive sharpness filter.
  *
  * SUBTEST: filter-strength
- * Description: Verify that varying strength (0-255), affects the degree of sharpeness applied.
+ * Description: Verify that varying strength (0-255), affects the degree of sharpness applied.
  *
  * SUBTEST: filter-modifiers
  * Description: Verify content adaptive sharpness filter with varying modifiers.
@@ -88,6 +88,7 @@ IGT_TEST_DESCRIPTION("Test to validate content adaptive sharpness filter");
 #define MAX_PIXELS_FOR_3_TAP_FILTER	(1920 * 1080)
 #define MAX_PIXELS_FOR_5_TAP_FILTER	(3840 * 2160)
 #define NROUNDS				10
+#define DEFAULT_FILTER_STRENGTH		-1
 
 enum test_type {
 	TEST_FILTER_BASIC,
@@ -142,6 +143,131 @@ static const uint32_t scaling_modes[] = {
 	DRM_MODE_SCALE_ASPECT,
 };
 
+enum subtest_iter {
+	ITER_NONE,
+	ITER_STRENGTH,
+	ITER_MODIFIER,
+	ITER_ROTATION,
+	ITER_FORMAT,
+	ITER_SCALING_MODE,
+};
+
+static const struct subtest_entry {
+	const char *name;
+	const char *describe;
+	enum test_type type;
+	int filter_strength;
+	uint32_t format;
+	enum subtest_iter iter;
+} subtests[] = {
+	{
+		.name     = "filter-basic",
+		.describe = "Verify basic content adaptive sharpness filter.",
+		.type     = TEST_FILTER_BASIC,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "filter-strength",
+		.describe = "Verify that varying strength (0-255) affects the degree of sharpness applied.",
+		.type     = TEST_FILTER_STRENGTH,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.iter     = ITER_STRENGTH,
+	},
+	{
+		.name     = "filter-modifiers",
+		.describe = "Verify content adaptive sharpness filter with varying modifiers.",
+		.type     = TEST_FILTER_MODIFIERS,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.iter     = ITER_MODIFIER,
+	},
+	{
+		.name     = "filter-rotations",
+		.describe = "Verify content adaptive sharpness filter with varying rotations.",
+		.type     = TEST_FILTER_ROTATION,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.iter     = ITER_ROTATION,
+	},
+	{
+		.name     = "filter-formats",
+		.describe = "Verify content adaptive sharpness filter with varying formats.",
+		.type     = TEST_FILTER_FORMATS,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.iter     = ITER_FORMAT,
+	},
+	{
+		.name     = "filter-toggle",
+		.describe = "Verify toggling between enabling and disabling content adaptive sharpness filter.",
+		.type     = TEST_FILTER_TOGGLE,
+		.filter_strength = MAX_FILTER_STRENGTH,
+	},
+	{
+		.name     = "filter-tap",
+		.describe = "Verify content adaptive sharpness filter with resolution change; "
+			    "resolution change will lead to selection of distinct taps.",
+		.type     = TEST_FILTER_TAP,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "filter-dpms",
+		.describe = "Verify content adaptive sharpness filter with DPMS.",
+		.type     = TEST_FILTER_DPMS,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "filter-suspend",
+		.describe = "Verify content adaptive sharpness filter with suspend.",
+		.type     = TEST_FILTER_SUSPEND,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "filter-scaler-upscale",
+		.describe = "Verify content adaptive sharpness filter with 1 plane scaler enabled during upscaling.",
+		.type     = TEST_FILTER_UPSCALE,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "filter-scaler-downscale",
+		.describe = "Verify content adaptive sharpness filter with 1 plane scaler enabled during downscaling.",
+		.type     = TEST_FILTER_DOWNSCALE,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "invalid-filter-with-scaler",
+		.describe = "Negative check for content adaptive sharpness filter "
+			    "when 2 plane scalers have already been enabled and "
+			    "attempt is made to enable sharpness filter.",
+		.type     = TEST_INVALID_FILTER_WITH_SCALER,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+	},
+	{
+		.name     = "invalid-filter-with-plane",
+		.describe = "Negative check for content adaptive sharpness filter "
+			    "when 2 NV12 planes have already been enabled and "
+			    "attempt is made to enable the sharpness filter.",
+		.type     = TEST_INVALID_FILTER_WITH_PLANE,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.format   = DRM_FORMAT_NV12,
+	},
+	{
+		.name     = "invalid-plane-with-filter",
+		.describe = "Negative check for content adaptive sharpness filter "
+			    "when 1 NV12 plane and sharpness filter have already been enabled "
+			    "and attempt is made to enable the second NV12 plane.",
+		.type     = TEST_INVALID_PLANE_WITH_FILTER,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.format   = DRM_FORMAT_NV12,
+	},
+	{
+		.name     = "invalid-filter-with-scaling-mode",
+		.describe = "Negative check for content adaptive sharpness filter "
+			    "when scaling mode is already enabled and attempt is made "
+			    "to enable sharpness filter.",
+		.type     = TEST_INVALID_FILTER_WITH_SCALING_MODE,
+		.filter_strength = DEFAULT_FILTER_STRENGTH,
+		.iter     = ITER_SCALING_MODE,
+	},
+};
+
 typedef struct {
 	int drm_fd;
 	bool limited;
@@ -587,6 +713,48 @@ static void set_data_defaults(data_t *data)
 	data->filter_strength = MID_FILTER_STRENGTH;
 }
 
+static int iter_count(enum subtest_iter iter)
+{
+	switch (iter) {
+	case ITER_STRENGTH:
+		return ARRAY_SIZE(filter_strength_list);
+	case ITER_MODIFIER:
+		return ARRAY_SIZE(modifiers);
+	case ITER_ROTATION:
+		return ARRAY_SIZE(rotations);
+	case ITER_FORMAT:
+		return ARRAY_SIZE(formats);
+	case ITER_SCALING_MODE:
+		return ARRAY_SIZE(scaling_modes);
+	default:
+		return 1;
+	}
+}
+
+static void apply_iter_param(data_t *data, const struct subtest_entry *st, int idx)
+{
+	switch (st->iter) {
+	case ITER_STRENGTH:
+		data->filter_strength = filter_strength_list[idx];
+		break;
+	case ITER_MODIFIER:
+		data->modifier = modifiers[idx].modifier;
+		data->modifier_name = modifiers[idx].name;
+		break;
+	case ITER_ROTATION:
+		data->rotation = rotations[idx];
+		break;
+	case ITER_FORMAT:
+		data->format = formats[idx];
+		break;
+	case ITER_SCALING_MODE:
+		data->scaling_mode = scaling_modes[idx];
+		break;
+	default:
+		break;
+	}
+}
+
 static int opt_handler(int opt, int opt_index, void *_data)
 {
 	data_t *data = _data;
@@ -619,142 +787,23 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
 		igt_display_require_output(&data.display);
 	}
 
-	igt_describe("Verify basic content adaptive sharpness filter.");
-	igt_subtest_with_dynamic("filter-basic") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_FILTER_BASIC);
-	}
-
-	igt_describe("Verify that varying strength(0-255), affects "
-		     "the degree of sharpeness applied.");
-	igt_subtest_with_dynamic("filter-strength") {
-		set_data_defaults(&data);
-
-		for (int i = 0; i < ARRAY_SIZE(filter_strength_list); i++) {
-			data.filter_strength = filter_strength_list[i];
-
-			run_sharpness_filter_test(&data, TEST_FILTER_STRENGTH);
-		}
-	}
-
-	igt_describe("Verify content adaptive sharpness filter with "
-		     "varying modifiers.");
-	igt_subtest_with_dynamic("filter-modifiers") {
-		set_data_defaults(&data);
-
-		for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
-			data.modifier = modifiers[i].modifier;
-			data.modifier_name = modifiers[i].name;
-
-			run_sharpness_filter_test(&data, TEST_FILTER_MODIFIERS);
-		}
-	}
-
-	igt_describe("Verify content adaptive sharpness filter with "
-		     "varying rotations.");
-	igt_subtest_with_dynamic("filter-rotations") {
-		set_data_defaults(&data);
-
-		for (int i = 0; i < ARRAY_SIZE(rotations); i++) {
-			data.rotation = rotations[i];
-
-			run_sharpness_filter_test(&data, TEST_FILTER_ROTATION);
-		}
-	}
-
-	igt_describe("Verify content adaptive sharpness filter with "
-		     "varying formats.");
-	igt_subtest_with_dynamic("filter-formats") {
-		set_data_defaults(&data);
-
-		for (int i = 0; i < ARRAY_SIZE(formats); i++) {
-			data.format = formats[i];
-
-			run_sharpness_filter_test(&data, TEST_FILTER_FORMATS);
-		}
-	}
-
-	igt_describe("Verify toggling between enabling and disabling "
-		     "content adaptive sharpness filter.");
-	igt_subtest_with_dynamic("filter-toggle") {
-		set_data_defaults(&data);
-		data.filter_strength = MAX_FILTER_STRENGTH;
-		run_sharpness_filter_test(&data, TEST_FILTER_TOGGLE);
-	}
-
-	igt_describe("Verify that following a resolution change, "
-		     "distict taps are selected.");
-	igt_subtest_with_dynamic("filter-tap") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_FILTER_TAP);
-	}
-
-	igt_describe("Verify content adaptive sharpness filter "
-		     "with DPMS.");
-	igt_subtest_with_dynamic("filter-dpms") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_FILTER_DPMS);
-	}
-
-	igt_describe("Verify content adaptive sharpness filter "
-		     "with suspend.");
-	igt_subtest_with_dynamic("filter-suspend") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_FILTER_SUSPEND);
-	}
-
-	igt_describe("Verify content adaptive sharpness filter "
-		     "with 1 plane scaler enabled.");
-	igt_subtest_with_dynamic("filter-scaler-upscale") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_FILTER_UPSCALE);
-	}
-
-	igt_describe("Verify content adaptive sharpness filter "
-		     "with 1 plane scaler enabled.");
-	igt_subtest_with_dynamic("filter-scaler-downscale") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_FILTER_DOWNSCALE);
-	}
-
-	igt_describe("Negative check for content adaptive sharpness filter "
-		     "when 2 plane scalers have already been enabled and "
-		     "attempt is made to enable sharpness filter.");
-	igt_subtest_with_dynamic("invalid-filter-with-scaler") {
-		set_data_defaults(&data);
-		run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_SCALER);
-	}
-
-	igt_describe("Negative check for content adaptive sharpness filter "
-		     "when 2 NV12 planes have already been enabled and attempt is "
-		     "made to enable the sharpness filter.");
-	igt_subtest_with_dynamic("invalid-filter-with-plane") {
-		set_data_defaults(&data);
-		data.format = DRM_FORMAT_NV12;
-
-		run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_PLANE);
-	}
-
-	igt_describe("Negative check for content adaptive sharpness filter "
-		     "when 1 NV12 plane and sharpness filter have already been enabled "
-		     "and attempt is made to enable the second NV12 plane.");
-	igt_subtest_with_dynamic("invalid-plane-with-filter") {
-		set_data_defaults(&data);
-		data.format = DRM_FORMAT_NV12;
+	for (int s = 0; s < ARRAY_SIZE(subtests); s++) {
+		const struct subtest_entry *p = &subtests[s];
 
-		run_sharpness_filter_test(&data, TEST_INVALID_PLANE_WITH_FILTER);
-	}
+		igt_describe(p->describe);
+		igt_subtest_with_dynamic(p->name) {
+			set_data_defaults(&data);
 
-	igt_describe("Negative check for content adaptive sharpness filter "
-		     "when scaling mode is already enabled and attempt is made "
-		     "to enable sharpness filter.");
-	igt_subtest_with_dynamic("invalid-filter-with-scaling-mode") {
-		set_data_defaults(&data);
+			if (p->filter_strength != DEFAULT_FILTER_STRENGTH)
+				data.filter_strength = p->filter_strength;
 
-		for (int k = 0; k < ARRAY_SIZE(scaling_modes); k++) {
-			data.scaling_mode = scaling_modes[k];
+			if (p->format != 0)
+				data.format = p->format;
 
-			run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_SCALING_MODE);
+			for (int i = 0; i < iter_count(p->iter); i++) {
+				apply_iter_param(&data, p, i);
+				run_sharpness_filter_test(&data, p->type);
+			}
 		}
 	}
 
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
                   ` (2 preceding siblings ...)
  2026-04-16 15:54 ` [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main Juha-Pekka Heikkila
@ 2026-04-16 15:54 ` Juha-Pekka Heikkila
  2026-04-16 19:54   ` Sharma, Swati2
  2026-04-17  7:28   ` Jani Nikula
  2026-04-17  0:39 ` ✓ Xe.CI.BAT: success for Refactor kms_sharpness_filter tests (rev2) Patchwork
                   ` (2 subsequent siblings)
  6 siblings, 2 replies; 12+ messages in thread
From: Juha-Pekka Heikkila @ 2026-04-16 15:54 UTC (permalink / raw)
  To: igt-dev; +Cc: Juha-Pekka Heikkila

choose mode from connector with lowest bandwidth requirement
for tests to try to fit tests into bandwidth limitations

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
---
 tests/intel/kms_sharpness_filter.c | 35 +++++++++++++++++++++++++++++-
 1 file changed, 34 insertions(+), 1 deletion(-)

diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
index 98eb671d1..cf5b0d2c7 100644
--- a/tests/intel/kms_sharpness_filter.c
+++ b/tests/intel/kms_sharpness_filter.c
@@ -609,6 +609,24 @@ static void build_test_suffix(data_t *data, enum test_type type,
 	}
 }
 
+static drmModeModeInfo *find_lowest_mode(igt_output_t *output)
+{
+	drmModeConnector *connector = output->config.connector;
+	drmModeModeInfo *low = NULL;
+
+	for (int i = 0; i < connector->count_modes; i++) {
+		drmModeModeInfo *mode = &connector->modes[i];
+		int pixels = mode->hdisplay * mode->vdisplay;
+		int low_pixels = low ? low->hdisplay * low->vdisplay : INT_MAX;
+
+		if (pixels < low_pixels ||
+		    (pixels == low_pixels && mode->vrefresh < low->vrefresh))
+			low = mode;
+	}
+
+	return low;
+}
+
 static void
 run_sharpness_filter_test(data_t *data, enum test_type type)
 {
@@ -647,7 +665,22 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
 					 data->mode->vdisplay,
 					 data->mode->vrefresh);
 			} else {
-				data->mode = igt_output_get_mode(data->output);
+				if (is_invalid_test(type)) {
+					data->mode = igt_output_get_mode(data->output);
+				} else {
+					data->mode = find_lowest_mode(data->output);
+					if (!data->mode) {
+						igt_info("No mode found on output %s\n",
+							 igt_output_name(data->output));
+						continue;
+					}
+
+					igt_info("Executing on lowest mode %dx%d@%d@%s\n",
+						 data->mode->hdisplay,
+						 data->mode->vdisplay,
+						 data->mode->vrefresh,
+						 data->output->name);
+				}
 			}
 
 			if (!has_sharpness_filter(data->crtc)) {
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function
  2026-04-16 15:54 ` [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function Juha-Pekka Heikkila
@ 2026-04-16 19:53   ` Sharma, Swati2
  0 siblings, 0 replies; 12+ messages in thread
From: Sharma, Swati2 @ 2026-04-16 19:53 UTC (permalink / raw)
  To: igt-dev


On 16-04-2026 09:24 pm, Juha-Pekka Heikkila wrote:
> refactor to make it look more nice
Patch LGTM

Reviewed-by: Swati Sharma <swati2.sharma@intel.com>

>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>   tests/intel/kms_sharpness_filter.c | 108 ++++++++++++++++-------------
>   1 file changed, 59 insertions(+), 49 deletions(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index baf9bc141..b1c80eecd 100644
> --- a/tests/intel/kms_sharpness_filter.c
> +++ b/tests/intel/kms_sharpness_filter.c
> @@ -88,15 +88,6 @@ IGT_TEST_DESCRIPTION("Test to validate content adaptive sharpness filter");
>   #define MAX_PIXELS_FOR_3_TAP_FILTER	(1920 * 1080)
>   #define MAX_PIXELS_FOR_5_TAP_FILTER	(3840 * 2160)
>   #define NROUNDS				10
> -#define INVALID_TEST ((type == TEST_INVALID_FILTER_WITH_SCALER) \
> -		   || (type == TEST_INVALID_FILTER_WITH_PLANE) \
> -		   || (type == TEST_INVALID_PLANE_WITH_FILTER) \
> -		   || (type == TEST_INVALID_FILTER_WITH_SCALING_MODE))
> -#define SET_PLANES ((type == TEST_FILTER_UPSCALE) \
> -		||  (type == TEST_FILTER_DOWNSCALE) \
> -		||  (type == TEST_INVALID_FILTER_WITH_SCALER) \
> -		||  (type == TEST_INVALID_FILTER_WITH_PLANE) \
> -		||  (type == TEST_INVALID_FILTER_WITH_SCALING_MODE))
>   
>   enum test_type {
>   	TEST_FILTER_BASIC,
> @@ -326,12 +317,37 @@ static int test_filter_toggle(data_t *data)
>   	return ret;
>   }
>   
> -static void test_sharpness_filter(data_t *data,  enum test_type type)
> +static bool is_invalid_test(enum test_type type)
> +{
> +	switch (type) {
> +	case TEST_INVALID_FILTER_WITH_SCALER:
> +	case TEST_INVALID_FILTER_WITH_PLANE:
> +	case TEST_INVALID_PLANE_WITH_FILTER:
> +	case TEST_INVALID_FILTER_WITH_SCALING_MODE:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +
> +static bool needs_extra_planes(enum test_type type)
> +{
> +	switch (type) {
> +	case TEST_FILTER_UPSCALE:
> +	case TEST_FILTER_DOWNSCALE:
> +	case TEST_INVALID_FILTER_WITH_SCALER:
> +	case TEST_INVALID_FILTER_WITH_PLANE:
> +	case TEST_INVALID_FILTER_WITH_SCALING_MODE:
> +		return true;
> +	default:
> +		return false;
> +	}
> +}
> +
> +static void test_sharpness_filter(data_t *data, enum test_type type)
>   {
>   	igt_output_t *output = data->output;
>   	drmModeModeInfo *mode = data->mode;
> -	int height = mode->hdisplay;
> -	int width =  mode->vdisplay;
>   	igt_crc_t ref_crc, crc;
>   	igt_pipe_crc_t *pipe_crc = NULL;
>   	int ret;
> @@ -342,57 +358,31 @@ static void test_sharpness_filter(data_t *data,  enum test_type type)
>   		      "No requested format/modifier on pipe %s\n",
>   		      igt_crtc_name(data->crtc));
>   
> -	setup_fb(data->drm_fd, height, width, data->format, data->modifier, &data->fb[0]);
> +	setup_fb(data->drm_fd, mode->hdisplay, mode->vdisplay,
> +		 data->format, data->modifier, &data->fb[0]);
>   	igt_plane_set_fb(data->plane[0], &data->fb[0]);
>   
>   	if (type == TEST_FILTER_ROTATION) {
> -		if (igt_plane_has_rotation(data->plane[0], data->rotation))
> -			igt_plane_set_rotation(data->plane[0], data->rotation);
> -		else
> -			igt_skip("No requested rotation on pipe %s\n",
> -				 igt_crtc_name(data->crtc));
> +		igt_skip_on_f(!igt_plane_has_rotation(data->plane[0],
> +						      data->rotation),
> +			      "No requested rotation on pipe %s\n",
> +			      igt_crtc_name(data->crtc));
> +		igt_plane_set_rotation(data->plane[0], data->rotation);
>   	}
>   
>   	if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
>   		igt_require_f(has_scaling_mode(output), "No connecter scaling mode found on %s\n", output->name);
>   
> -	if (SET_PLANES)
> +	if (needs_extra_planes(type))
>   		set_planes(data, type);
>   
>   	set_filter_strength_on_pipe(data);
>   
> -	if (!INVALID_TEST && data->filter_strength != 0)
> -		igt_debug("Sharpened image should be observed for filter strength > 0\n");
> -
>   	if (type == TEST_INVALID_FILTER_WITH_SCALING_MODE)
>   		ret = igt_display_try_commit_atomic(&data->display, 0, NULL);
>   	else
>   		ret = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
>   
> -	if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
> -		pipe_crc = igt_crtc_crc_new(data->crtc,
> -					    IGT_PIPE_CRC_SOURCE_AUTO);
> -		igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
> -	}
> -
> -	if (type == TEST_FILTER_DPMS) {
> -		kmstest_set_connector_dpms(data->drm_fd,
> -					   output->config.connector,
> -					   DRM_MODE_DPMS_OFF);
> -		kmstest_set_connector_dpms(data->drm_fd,
> -					   output->config.connector,
> -					   DRM_MODE_DPMS_ON);
> -	}
> -
> -	if (type == TEST_FILTER_SUSPEND)
> -		igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> -					      SUSPEND_TEST_NONE);
> -
> -	if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
> -		igt_pipe_crc_collect_crc(pipe_crc, &crc);
> -		igt_assert_crc_equal(&crc, &ref_crc);
> -	}
> -
>   	if (type == TEST_FILTER_TOGGLE)
>   		ret |= test_filter_toggle(data);
>   
> @@ -408,13 +398,33 @@ static void test_sharpness_filter(data_t *data,  enum test_type type)
>   		ret = igt_display_try_commit2(&data->display, COMMIT_ATOMIC);
>   	}
>   
> -	if (INVALID_TEST)
> +	if (type == TEST_FILTER_DPMS || type == TEST_FILTER_SUSPEND) {
> +		pipe_crc = igt_crtc_crc_new(data->crtc,
> +					    IGT_PIPE_CRC_SOURCE_AUTO);
> +		igt_pipe_crc_collect_crc(pipe_crc, &ref_crc);
> +
> +		if (type == TEST_FILTER_DPMS) {
> +			kmstest_set_connector_dpms(data->drm_fd,
> +						   output->config.connector,
> +						   DRM_MODE_DPMS_OFF);
> +			kmstest_set_connector_dpms(data->drm_fd,
> +						   output->config.connector,
> +						   DRM_MODE_DPMS_ON);
> +		} else {
> +			igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> +						      SUSPEND_TEST_NONE);
> +		}
> +
> +		igt_pipe_crc_collect_crc(pipe_crc, &crc);
> +		igt_assert_crc_equal(&crc, &ref_crc);
> +		igt_pipe_crc_free(pipe_crc);
> +	}
> +
> +	if (is_invalid_test(type))
>   		igt_assert_eq(ret, -EINVAL);
>   	else
>   		igt_assert_eq(ret, 0);
>   
> -	/* clean-up */
> -	igt_pipe_crc_free(pipe_crc);
>   	cleanup(data);
>   }
>   

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main
  2026-04-16 15:54 ` [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main Juha-Pekka Heikkila
@ 2026-04-16 19:53   ` Sharma, Swati2
  0 siblings, 0 replies; 12+ messages in thread
From: Sharma, Swati2 @ 2026-04-16 19:53 UTC (permalink / raw)
  To: Juha-Pekka Heikkila, igt-dev


On 16-04-2026 09:24 pm, Juha-Pekka Heikkila wrote:
> collect tests into list and call them through there
Patch LGTM

Reviewed-by: Swati Sharma <swati2.sharma@intel.com>
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>   tests/intel/kms_sharpness_filter.c | 315 +++++++++++++++++------------
>   1 file changed, 182 insertions(+), 133 deletions(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index b1c80eecd..98eb671d1 100644
> --- a/tests/intel/kms_sharpness_filter.c
> +++ b/tests/intel/kms_sharpness_filter.c
> @@ -19,7 +19,7 @@
>    * Description: Verify basic content adaptive sharpness filter.
>    *
>    * SUBTEST: filter-strength
> - * Description: Verify that varying strength (0-255), affects the degree of sharpeness applied.
> + * Description: Verify that varying strength (0-255), affects the degree of sharpness applied.
>    *
>    * SUBTEST: filter-modifiers
>    * Description: Verify content adaptive sharpness filter with varying modifiers.
> @@ -88,6 +88,7 @@ IGT_TEST_DESCRIPTION("Test to validate content adaptive sharpness filter");
>   #define MAX_PIXELS_FOR_3_TAP_FILTER	(1920 * 1080)
>   #define MAX_PIXELS_FOR_5_TAP_FILTER	(3840 * 2160)
>   #define NROUNDS				10
> +#define DEFAULT_FILTER_STRENGTH		-1
>   
>   enum test_type {
>   	TEST_FILTER_BASIC,
> @@ -142,6 +143,131 @@ static const uint32_t scaling_modes[] = {
>   	DRM_MODE_SCALE_ASPECT,
>   };
>   
> +enum subtest_iter {
> +	ITER_NONE,
> +	ITER_STRENGTH,
> +	ITER_MODIFIER,
> +	ITER_ROTATION,
> +	ITER_FORMAT,
> +	ITER_SCALING_MODE,
> +};
> +
> +static const struct subtest_entry {
> +	const char *name;
> +	const char *describe;
> +	enum test_type type;
> +	int filter_strength;
> +	uint32_t format;
> +	enum subtest_iter iter;
> +} subtests[] = {
> +	{
> +		.name     = "filter-basic",
> +		.describe = "Verify basic content adaptive sharpness filter.",
> +		.type     = TEST_FILTER_BASIC,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-strength",
> +		.describe = "Verify that varying strength (0-255) affects the degree of sharpness applied.",
> +		.type     = TEST_FILTER_STRENGTH,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.iter     = ITER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-modifiers",
> +		.describe = "Verify content adaptive sharpness filter with varying modifiers.",
> +		.type     = TEST_FILTER_MODIFIERS,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.iter     = ITER_MODIFIER,
> +	},
> +	{
> +		.name     = "filter-rotations",
> +		.describe = "Verify content adaptive sharpness filter with varying rotations.",
> +		.type     = TEST_FILTER_ROTATION,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.iter     = ITER_ROTATION,
> +	},
> +	{
> +		.name     = "filter-formats",
> +		.describe = "Verify content adaptive sharpness filter with varying formats.",
> +		.type     = TEST_FILTER_FORMATS,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.iter     = ITER_FORMAT,
> +	},
> +	{
> +		.name     = "filter-toggle",
> +		.describe = "Verify toggling between enabling and disabling content adaptive sharpness filter.",
> +		.type     = TEST_FILTER_TOGGLE,
> +		.filter_strength = MAX_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-tap",
> +		.describe = "Verify content adaptive sharpness filter with resolution change; "
> +			    "resolution change will lead to selection of distinct taps.",
> +		.type     = TEST_FILTER_TAP,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-dpms",
> +		.describe = "Verify content adaptive sharpness filter with DPMS.",
> +		.type     = TEST_FILTER_DPMS,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-suspend",
> +		.describe = "Verify content adaptive sharpness filter with suspend.",
> +		.type     = TEST_FILTER_SUSPEND,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-scaler-upscale",
> +		.describe = "Verify content adaptive sharpness filter with 1 plane scaler enabled during upscaling.",
> +		.type     = TEST_FILTER_UPSCALE,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "filter-scaler-downscale",
> +		.describe = "Verify content adaptive sharpness filter with 1 plane scaler enabled during downscaling.",
> +		.type     = TEST_FILTER_DOWNSCALE,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "invalid-filter-with-scaler",
> +		.describe = "Negative check for content adaptive sharpness filter "
> +			    "when 2 plane scalers have already been enabled and "
> +			    "attempt is made to enable sharpness filter.",
> +		.type     = TEST_INVALID_FILTER_WITH_SCALER,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +	},
> +	{
> +		.name     = "invalid-filter-with-plane",
> +		.describe = "Negative check for content adaptive sharpness filter "
> +			    "when 2 NV12 planes have already been enabled and "
> +			    "attempt is made to enable the sharpness filter.",
> +		.type     = TEST_INVALID_FILTER_WITH_PLANE,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.format   = DRM_FORMAT_NV12,
> +	},
> +	{
> +		.name     = "invalid-plane-with-filter",
> +		.describe = "Negative check for content adaptive sharpness filter "
> +			    "when 1 NV12 plane and sharpness filter have already been enabled "
> +			    "and attempt is made to enable the second NV12 plane.",
> +		.type     = TEST_INVALID_PLANE_WITH_FILTER,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.format   = DRM_FORMAT_NV12,
> +	},
> +	{
> +		.name     = "invalid-filter-with-scaling-mode",
> +		.describe = "Negative check for content adaptive sharpness filter "
> +			    "when scaling mode is already enabled and attempt is made "
> +			    "to enable sharpness filter.",
> +		.type     = TEST_INVALID_FILTER_WITH_SCALING_MODE,
> +		.filter_strength = DEFAULT_FILTER_STRENGTH,
> +		.iter     = ITER_SCALING_MODE,
> +	},
> +};
> +
>   typedef struct {
>   	int drm_fd;
>   	bool limited;
> @@ -587,6 +713,48 @@ static void set_data_defaults(data_t *data)
>   	data->filter_strength = MID_FILTER_STRENGTH;
>   }
>   
> +static int iter_count(enum subtest_iter iter)
> +{
> +	switch (iter) {
> +	case ITER_STRENGTH:
> +		return ARRAY_SIZE(filter_strength_list);
> +	case ITER_MODIFIER:
> +		return ARRAY_SIZE(modifiers);
> +	case ITER_ROTATION:
> +		return ARRAY_SIZE(rotations);
> +	case ITER_FORMAT:
> +		return ARRAY_SIZE(formats);
> +	case ITER_SCALING_MODE:
> +		return ARRAY_SIZE(scaling_modes);
> +	default:
> +		return 1;
> +	}
> +}
> +
> +static void apply_iter_param(data_t *data, const struct subtest_entry *st, int idx)
> +{
> +	switch (st->iter) {
> +	case ITER_STRENGTH:
> +		data->filter_strength = filter_strength_list[idx];
> +		break;
> +	case ITER_MODIFIER:
> +		data->modifier = modifiers[idx].modifier;
> +		data->modifier_name = modifiers[idx].name;
> +		break;
> +	case ITER_ROTATION:
> +		data->rotation = rotations[idx];
> +		break;
> +	case ITER_FORMAT:
> +		data->format = formats[idx];
> +		break;
> +	case ITER_SCALING_MODE:
> +		data->scaling_mode = scaling_modes[idx];
> +		break;
> +	default:
> +		break;
> +	}
> +}
> +
>   static int opt_handler(int opt, int opt_index, void *_data)
>   {
>   	data_t *data = _data;
> @@ -619,142 +787,23 @@ int igt_main_args("l", NULL, help_str, opt_handler, &data)
>   		igt_display_require_output(&data.display);
>   	}
>   
> -	igt_describe("Verify basic content adaptive sharpness filter.");
> -	igt_subtest_with_dynamic("filter-basic") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_FILTER_BASIC);
> -	}
> -
> -	igt_describe("Verify that varying strength(0-255), affects "
> -		     "the degree of sharpeness applied.");
> -	igt_subtest_with_dynamic("filter-strength") {
> -		set_data_defaults(&data);
> -
> -		for (int i = 0; i < ARRAY_SIZE(filter_strength_list); i++) {
> -			data.filter_strength = filter_strength_list[i];
> -
> -			run_sharpness_filter_test(&data, TEST_FILTER_STRENGTH);
> -		}
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter with "
> -		     "varying modifiers.");
> -	igt_subtest_with_dynamic("filter-modifiers") {
> -		set_data_defaults(&data);
> -
> -		for (int i = 0; i < ARRAY_SIZE(modifiers); i++) {
> -			data.modifier = modifiers[i].modifier;
> -			data.modifier_name = modifiers[i].name;
> -
> -			run_sharpness_filter_test(&data, TEST_FILTER_MODIFIERS);
> -		}
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter with "
> -		     "varying rotations.");
> -	igt_subtest_with_dynamic("filter-rotations") {
> -		set_data_defaults(&data);
> -
> -		for (int i = 0; i < ARRAY_SIZE(rotations); i++) {
> -			data.rotation = rotations[i];
> -
> -			run_sharpness_filter_test(&data, TEST_FILTER_ROTATION);
> -		}
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter with "
> -		     "varying formats.");
> -	igt_subtest_with_dynamic("filter-formats") {
> -		set_data_defaults(&data);
> -
> -		for (int i = 0; i < ARRAY_SIZE(formats); i++) {
> -			data.format = formats[i];
> -
> -			run_sharpness_filter_test(&data, TEST_FILTER_FORMATS);
> -		}
> -	}
> -
> -	igt_describe("Verify toggling between enabling and disabling "
> -		     "content adaptive sharpness filter.");
> -	igt_subtest_with_dynamic("filter-toggle") {
> -		set_data_defaults(&data);
> -		data.filter_strength = MAX_FILTER_STRENGTH;
> -		run_sharpness_filter_test(&data, TEST_FILTER_TOGGLE);
> -	}
> -
> -	igt_describe("Verify that following a resolution change, "
> -		     "distict taps are selected.");
> -	igt_subtest_with_dynamic("filter-tap") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_FILTER_TAP);
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter "
> -		     "with DPMS.");
> -	igt_subtest_with_dynamic("filter-dpms") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_FILTER_DPMS);
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter "
> -		     "with suspend.");
> -	igt_subtest_with_dynamic("filter-suspend") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_FILTER_SUSPEND);
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter "
> -		     "with 1 plane scaler enabled.");
> -	igt_subtest_with_dynamic("filter-scaler-upscale") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_FILTER_UPSCALE);
> -	}
> -
> -	igt_describe("Verify content adaptive sharpness filter "
> -		     "with 1 plane scaler enabled.");
> -	igt_subtest_with_dynamic("filter-scaler-downscale") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_FILTER_DOWNSCALE);
> -	}
> -
> -	igt_describe("Negative check for content adaptive sharpness filter "
> -		     "when 2 plane scalers have already been enabled and "
> -		     "attempt is made to enable sharpness filter.");
> -	igt_subtest_with_dynamic("invalid-filter-with-scaler") {
> -		set_data_defaults(&data);
> -		run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_SCALER);
> -	}
> -
> -	igt_describe("Negative check for content adaptive sharpness filter "
> -		     "when 2 NV12 planes have already been enabled and attempt is "
> -		     "made to enable the sharpness filter.");
> -	igt_subtest_with_dynamic("invalid-filter-with-plane") {
> -		set_data_defaults(&data);
> -		data.format = DRM_FORMAT_NV12;
> -
> -		run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_PLANE);
> -	}
> -
> -	igt_describe("Negative check for content adaptive sharpness filter "
> -		     "when 1 NV12 plane and sharpness filter have already been enabled "
> -		     "and attempt is made to enable the second NV12 plane.");
> -	igt_subtest_with_dynamic("invalid-plane-with-filter") {
> -		set_data_defaults(&data);
> -		data.format = DRM_FORMAT_NV12;
> +	for (int s = 0; s < ARRAY_SIZE(subtests); s++) {
> +		const struct subtest_entry *p = &subtests[s];
>   
> -		run_sharpness_filter_test(&data, TEST_INVALID_PLANE_WITH_FILTER);
> -	}
> +		igt_describe(p->describe);
> +		igt_subtest_with_dynamic(p->name) {
> +			set_data_defaults(&data);
>   
> -	igt_describe("Negative check for content adaptive sharpness filter "
> -		     "when scaling mode is already enabled and attempt is made "
> -		     "to enable sharpness filter.");
> -	igt_subtest_with_dynamic("invalid-filter-with-scaling-mode") {
> -		set_data_defaults(&data);
> +			if (p->filter_strength != DEFAULT_FILTER_STRENGTH)
> +				data.filter_strength = p->filter_strength;
>   
> -		for (int k = 0; k < ARRAY_SIZE(scaling_modes); k++) {
> -			data.scaling_mode = scaling_modes[k];
> +			if (p->format != 0)
> +				data.format = p->format;
>   
> -			run_sharpness_filter_test(&data, TEST_INVALID_FILTER_WITH_SCALING_MODE);
> +			for (int i = 0; i < iter_count(p->iter); i++) {
> +				apply_iter_param(&data, p, i);
> +				run_sharpness_filter_test(&data, p->type);
> +			}
>   		}
>   	}
>   

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test
  2026-04-16 15:54 ` [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
@ 2026-04-16 19:54   ` Sharma, Swati2
  2026-04-17  7:28   ` Jani Nikula
  1 sibling, 0 replies; 12+ messages in thread
From: Sharma, Swati2 @ 2026-04-16 19:54 UTC (permalink / raw)
  To: Juha-Pekka Heikkila, igt-dev


On 16-04-2026 09:24 pm, Juha-Pekka Heikkila wrote:
> choose mode from connector with lowest bandwidth requirement
> for tests to try to fit tests into bandwidth limitations
Patch LGTM

Reviewed-by: Swati Sharma <swati2.sharma@intel.com>

>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>   tests/intel/kms_sharpness_filter.c | 35 +++++++++++++++++++++++++++++-
>   1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index 98eb671d1..cf5b0d2c7 100644
> --- a/tests/intel/kms_sharpness_filter.c
> +++ b/tests/intel/kms_sharpness_filter.c
> @@ -609,6 +609,24 @@ static void build_test_suffix(data_t *data, enum test_type type,
>   	}
>   }
>   
> +static drmModeModeInfo *find_lowest_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +	drmModeModeInfo *low = NULL;
> +
> +	for (int i = 0; i < connector->count_modes; i++) {
> +		drmModeModeInfo *mode = &connector->modes[i];
> +		int pixels = mode->hdisplay * mode->vdisplay;
> +		int low_pixels = low ? low->hdisplay * low->vdisplay : INT_MAX;
> +
> +		if (pixels < low_pixels ||
> +		    (pixels == low_pixels && mode->vrefresh < low->vrefresh))
> +			low = mode;
> +	}
> +
> +	return low;
> +}
> +
>   static void
>   run_sharpness_filter_test(data_t *data, enum test_type type)
>   {
> @@ -647,7 +665,22 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>   					 data->mode->vdisplay,
>   					 data->mode->vrefresh);
>   			} else {
> -				data->mode = igt_output_get_mode(data->output);
> +				if (is_invalid_test(type)) {
> +					data->mode = igt_output_get_mode(data->output);
> +				} else {
> +					data->mode = find_lowest_mode(data->output);
> +					if (!data->mode) {
> +						igt_info("No mode found on output %s\n",
> +							 igt_output_name(data->output));
> +						continue;
> +					}
> +
> +					igt_info("Executing on lowest mode %dx%d@%d@%s\n",
> +						 data->mode->hdisplay,
> +						 data->mode->vdisplay,
> +						 data->mode->vrefresh,
> +						 data->output->name);
> +				}
>   			}
>   
>   			if (!has_sharpness_filter(data->crtc)) {

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ Xe.CI.BAT: success for Refactor kms_sharpness_filter tests (rev2)
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
                   ` (3 preceding siblings ...)
  2026-04-16 15:54 ` [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
@ 2026-04-17  0:39 ` Patchwork
  2026-04-17  0:53 ` ✓ i915.CI.BAT: " Patchwork
  2026-04-17  3:10 ` ✗ Xe.CI.FULL: failure " Patchwork
  6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-04-17  0:39 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 1158 bytes --]

== Series Details ==

Series: Refactor kms_sharpness_filter tests (rev2)
URL   : https://patchwork.freedesktop.org/series/164197/
State : success

== Summary ==

CI Bug Log - changes from XEIGT_8863_BAT -> XEIGTPW_15002_BAT
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  

Participating hosts (13 -> 13)
------------------------------

  No changes in participating hosts


Changes
-------

  No changes found


Build changes
-------------

  * IGT: IGT_8863 -> IGTPW_15002
  * Linux: xe-4917-ff84b38d86b994ebb03d940be1c73a63e231f454 -> xe-4918-2a1c604bebed8cbbe6aea00f761777eed424dc55

  IGTPW_15002: 874a24e935f57c60527a517395e71a728038f2f7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  IGT_8863: 5b279a8b71dc1672099205a1a9e8135c7c7fadb5 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-4917-ff84b38d86b994ebb03d940be1c73a63e231f454: ff84b38d86b994ebb03d940be1c73a63e231f454
  xe-4918-2a1c604bebed8cbbe6aea00f761777eed424dc55: 2a1c604bebed8cbbe6aea00f761777eed424dc55

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/index.html

[-- Attachment #2: Type: text/html, Size: 1717 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✓ i915.CI.BAT: success for Refactor kms_sharpness_filter tests (rev2)
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
                   ` (4 preceding siblings ...)
  2026-04-17  0:39 ` ✓ Xe.CI.BAT: success for Refactor kms_sharpness_filter tests (rev2) Patchwork
@ 2026-04-17  0:53 ` Patchwork
  2026-04-17  3:10 ` ✗ Xe.CI.FULL: failure " Patchwork
  6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-04-17  0:53 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 3908 bytes --]

== Series Details ==

Series: Refactor kms_sharpness_filter tests (rev2)
URL   : https://patchwork.freedesktop.org/series/164197/
State : success

== Summary ==

CI Bug Log - changes from IGT_8863 -> IGTPW_15002
====================================================

Summary
-------

  **SUCCESS**

  No regressions found.

  External URL: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/index.html

Participating hosts (42 -> 39)
------------------------------

  Missing    (3): bat-dg2-13 bat-kbl-2 fi-snb-2520m 

Known issues
------------

  Here are the changes found in IGTPW_15002 that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@dmabuf@all-tests:
    - fi-skl-6600u:       NOTRUN -> [SKIP][1]
   [1]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/fi-skl-6600u/igt@dmabuf@all-tests.html

  * igt@i915_selftest@live@workarounds:
    - bat-arls-5:         [PASS][2] -> [DMESG-FAIL][3] ([i915#12061]) +1 other test dmesg-fail
   [2]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/bat-arls-5/igt@i915_selftest@live@workarounds.html
   [3]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/bat-arls-5/igt@i915_selftest@live@workarounds.html
    - bat-dg2-14:         [PASS][4] -> [DMESG-FAIL][5] ([i915#12061]) +1 other test dmesg-fail
   [4]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/bat-dg2-14/igt@i915_selftest@live@workarounds.html
   [5]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/bat-dg2-14/igt@i915_selftest@live@workarounds.html

  * igt@kms_hdmi_inject@inject-audio:
    - fi-tgl-1115g4:      [PASS][6] -> [FAIL][7] ([i915#14867])
   [6]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/fi-tgl-1115g4/igt@kms_hdmi_inject@inject-audio.html
   [7]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/fi-tgl-1115g4/igt@kms_hdmi_inject@inject-audio.html

  
#### Possible fixes ####

  * igt@i915_selftest@live:
    - fi-skl-6600u:       [INCOMPLETE][8] ([i915#15859]) -> [PASS][9]
   [8]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/fi-skl-6600u/igt@i915_selftest@live.html
   [9]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/fi-skl-6600u/igt@i915_selftest@live.html

  * igt@i915_selftest@live@gtt:
    - fi-skl-6600u:       [INCOMPLETE][10] -> [PASS][11]
   [10]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/fi-skl-6600u/igt@i915_selftest@live@gtt.html
   [11]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/fi-skl-6600u/igt@i915_selftest@live@gtt.html

  * igt@i915_selftest@live@workarounds:
    - bat-dg2-9:          [DMESG-FAIL][12] ([i915#12061]) -> [PASS][13] +1 other test pass
   [12]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/bat-dg2-9/igt@i915_selftest@live@workarounds.html
   [13]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/bat-dg2-9/igt@i915_selftest@live@workarounds.html
    - bat-arls-6:         [DMESG-FAIL][14] ([i915#12061]) -> [PASS][15] +1 other test pass
   [14]: https://intel-gfx-ci.01.org/tree/drm-tip/IGT_8863/bat-arls-6/igt@i915_selftest@live@workarounds.html
   [15]: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/bat-arls-6/igt@i915_selftest@live@workarounds.html

  
  [i915#12061]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/12061
  [i915#14867]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/14867
  [i915#15859]: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/15859


Build changes
-------------

  * CI: CI-20190529 -> None
  * IGT: IGT_8863 -> IGTPW_15002

  CI-20190529: 20190529
  CI_DRM_18347: 2a1c604bebed8cbbe6aea00f761777eed424dc55 @ git://anongit.freedesktop.org/gfx-ci/linux
  IGTPW_15002: 874a24e935f57c60527a517395e71a728038f2f7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  IGT_8863: 5b279a8b71dc1672099205a1a9e8135c7c7fadb5 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/IGTPW_15002/index.html

[-- Attachment #2: Type: text/html, Size: 4886 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* ✗ Xe.CI.FULL: failure for Refactor kms_sharpness_filter tests (rev2)
  2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
                   ` (5 preceding siblings ...)
  2026-04-17  0:53 ` ✓ i915.CI.BAT: " Patchwork
@ 2026-04-17  3:10 ` Patchwork
  6 siblings, 0 replies; 12+ messages in thread
From: Patchwork @ 2026-04-17  3:10 UTC (permalink / raw)
  To: Juha-Pekka Heikkila; +Cc: igt-dev

[-- Attachment #1: Type: text/plain, Size: 12567 bytes --]

== Series Details ==

Series: Refactor kms_sharpness_filter tests (rev2)
URL   : https://patchwork.freedesktop.org/series/164197/
State : failure

== Summary ==

CI Bug Log - changes from XEIGT_8863_FULL -> XEIGTPW_15002_FULL
====================================================

Summary
-------

  **WARNING**

  Minor unknown changes coming with XEIGTPW_15002_FULL need to be verified
  manually.
  
  If you think the reported changes have nothing to do with the changes
  introduced in XEIGTPW_15002_FULL, please notify your bug team (I915-ci-infra@lists.freedesktop.org) to allow them
  to document this new failure mode, which will reduce false positives in CI.

  

Participating hosts (2 -> 2)
------------------------------

  No changes in participating hosts

Possible new issues
-------------------

  Here are the unknown changes that may have been introduced in XEIGTPW_15002_FULL:

### IGT changes ###

#### Warnings ####

  * igt@xe_exec_system_allocator@pat-index-madvise-pat-idx-uc-multi-vma:
    - shard-lnl:          [FAIL][1] ([Intel XE#5625]) -> [FAIL][2]
   [1]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-lnl-1/igt@xe_exec_system_allocator@pat-index-madvise-pat-idx-uc-multi-vma.html
   [2]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-lnl-3/igt@xe_exec_system_allocator@pat-index-madvise-pat-idx-uc-multi-vma.html

  
New tests
---------

  New tests have been introduced between XEIGT_8863_FULL and XEIGTPW_15002_FULL:

### New IGT tests (4) ###

  * igt@kms_hdr@static-swap@pipe-a-hdmi-a-3-xrgb16161616f:
    - Statuses : 1 pass(s)
    - Exec time: [1.08] s

  * igt@kms_hdr@static-swap@pipe-a-hdmi-a-3-xrgb2101010:
    - Statuses : 1 pass(s)
    - Exec time: [1.41] s

  * igt@kms_hdr@static-toggle-dpms@pipe-a-hdmi-a-3-xrgb16161616f:
    - Statuses : 1 pass(s)
    - Exec time: [1.25] s

  * igt@kms_hdr@static-toggle-dpms@pipe-a-hdmi-a-3-xrgb2101010:
    - Statuses : 1 pass(s)
    - Exec time: [1.48] s

  

Known issues
------------

  Here are the changes found in XEIGTPW_15002_FULL that come from known issues:

### IGT changes ###

#### Issues hit ####

  * igt@kms_big_fb@x-tiled-16bpp-rotate-90:
    - shard-bmg:          NOTRUN -> [SKIP][3] ([Intel XE#2327])
   [3]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-7/igt@kms_big_fb@x-tiled-16bpp-rotate-90.html

  * igt@kms_ccs@bad-aux-stride-yf-tiled-ccs:
    - shard-bmg:          NOTRUN -> [SKIP][4] ([Intel XE#2887])
   [4]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-6/igt@kms_ccs@bad-aux-stride-yf-tiled-ccs.html

  * igt@kms_content_protection@dp-mst-lic-type-0-hdcp14:
    - shard-bmg:          NOTRUN -> [SKIP][5] ([Intel XE#6974])
   [5]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-7/igt@kms_content_protection@dp-mst-lic-type-0-hdcp14.html

  * igt@kms_flip@2x-plain-flip-fb-recreate:
    - shard-bmg:          [PASS][6] -> [ABORT][7] ([Intel XE#5545] / [Intel XE#6652]) +1 other test abort
   [6]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-9/igt@kms_flip@2x-plain-flip-fb-recreate.html
   [7]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-2/igt@kms_flip@2x-plain-flip-fb-recreate.html

  * igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling:
    - shard-bmg:          NOTRUN -> [SKIP][8] ([Intel XE#7178] / [Intel XE#7351])
   [8]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-7/igt@kms_flip_scaled_crc@flip-32bpp-ytileccs-to-64bpp-ytile-upscaling.html

  * igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-shrfb-draw-render:
    - shard-bmg:          NOTRUN -> [SKIP][9] ([Intel XE#2311]) +3 other tests skip
   [9]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-2/igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-shrfb-draw-render.html

  * igt@kms_hdr@invalid-hdr:
    - shard-bmg:          [PASS][10] -> [SKIP][11] ([Intel XE#1503])
   [10]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-3/igt@kms_hdr@invalid-hdr.html
   [11]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-4/igt@kms_hdr@invalid-hdr.html

  * igt@kms_psr@fbc-psr2-primary-blt:
    - shard-bmg:          NOTRUN -> [SKIP][12] ([Intel XE#2234] / [Intel XE#2850])
   [12]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-8/igt@kms_psr@fbc-psr2-primary-blt.html

  * igt@kms_vrr@flip-dpms:
    - shard-bmg:          NOTRUN -> [SKIP][13] ([Intel XE#1499])
   [13]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-5/igt@kms_vrr@flip-dpms.html

  * igt@xe_exec_multi_queue@two-queues-preempt-mode-dyn-priority:
    - shard-bmg:          NOTRUN -> [SKIP][14] ([Intel XE#6874])
   [14]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-5/igt@xe_exec_multi_queue@two-queues-preempt-mode-dyn-priority.html

  * igt@xe_sriov_flr@flr-vf1-clear:
    - shard-bmg:          [PASS][15] -> [FAIL][16] ([Intel XE#6569])
   [15]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-8/igt@xe_sriov_flr@flr-vf1-clear.html
   [16]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-2/igt@xe_sriov_flr@flr-vf1-clear.html

  
#### Possible fixes ####

  * igt@intel_hwmon@hwmon-write:
    - shard-bmg:          [FAIL][17] ([Intel XE#7445]) -> [PASS][18]
   [17]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-10/igt@intel_hwmon@hwmon-write.html
   [18]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-10/igt@intel_hwmon@hwmon-write.html

  * igt@kms_flip@2x-absolute-wf_vblank-interruptible@bc-dp2-hdmi-a3:
    - shard-bmg:          [FAIL][19] -> [PASS][20] +3 other tests pass
   [19]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-3/igt@kms_flip@2x-absolute-wf_vblank-interruptible@bc-dp2-hdmi-a3.html
   [20]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-5/igt@kms_flip@2x-absolute-wf_vblank-interruptible@bc-dp2-hdmi-a3.html

  * igt@kms_flip@2x-flip-vs-expired-vblank@ac-dp2-hdmi-a3:
    - shard-bmg:          [FAIL][21] ([Intel XE#3321]) -> [PASS][22] +1 other test pass
   [21]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-10/igt@kms_flip@2x-flip-vs-expired-vblank@ac-dp2-hdmi-a3.html
   [22]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-7/igt@kms_flip@2x-flip-vs-expired-vblank@ac-dp2-hdmi-a3.html

  * igt@kms_flip@flip-vs-expired-vblank-interruptible:
    - shard-lnl:          [FAIL][23] ([Intel XE#301]) -> [PASS][24] +3 other tests pass
   [23]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-lnl-8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html
   [24]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-lnl-8/igt@kms_flip@flip-vs-expired-vblank-interruptible.html

  * igt@kms_universal_plane@disable-primary-vs-flip:
    - shard-bmg:          [DMESG-WARN][25] ([Intel XE#7725]) -> [PASS][26] +1 other test pass
   [25]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-3/igt@kms_universal_plane@disable-primary-vs-flip.html
   [26]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-4/igt@kms_universal_plane@disable-primary-vs-flip.html

  * igt@kms_vrr@cmrr@pipe-a-edp-1:
    - shard-lnl:          [FAIL][27] ([Intel XE#4459]) -> [PASS][28] +1 other test pass
   [27]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-lnl-1/igt@kms_vrr@cmrr@pipe-a-edp-1.html
   [28]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-lnl-8/igt@kms_vrr@cmrr@pipe-a-edp-1.html

  * igt@kms_vrr@flipline:
    - shard-lnl:          [FAIL][29] ([Intel XE#4227] / [Intel XE#7397]) -> [PASS][30] +1 other test pass
   [29]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-lnl-2/igt@kms_vrr@flipline.html
   [30]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-lnl-1/igt@kms_vrr@flipline.html

  
#### Warnings ####

  * igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-shrfb-draw-blt:
    - shard-bmg:          [SKIP][31] ([Intel XE#2312]) -> [SKIP][32] ([Intel XE#2311])
   [31]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-3/igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-shrfb-draw-blt.html
   [32]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-10/igt@kms_frontbuffer_tracking@fbcdrrs-2p-scndscrn-pri-shrfb-draw-blt.html

  * igt@kms_hdr@brightness-with-hdr:
    - shard-bmg:          [SKIP][33] ([Intel XE#3374] / [Intel XE#3544]) -> [SKIP][34] ([Intel XE#3544])
   [33]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-1/igt@kms_hdr@brightness-with-hdr.html
   [34]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-4/igt@kms_hdr@brightness-with-hdr.html

  * igt@kms_tiled_display@basic-test-pattern:
    - shard-bmg:          [FAIL][35] ([Intel XE#1729] / [Intel XE#7424]) -> [SKIP][36] ([Intel XE#2426] / [Intel XE#5848])
   [35]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-4/igt@kms_tiled_display@basic-test-pattern.html
   [36]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-7/igt@kms_tiled_display@basic-test-pattern.html

  * igt@kms_tiled_display@basic-test-pattern-with-chamelium:
    - shard-bmg:          [SKIP][37] ([Intel XE#2509] / [Intel XE#7437]) -> [SKIP][38] ([Intel XE#2426] / [Intel XE#5848])
   [37]: https://intel-gfx-ci.01.org/tree/intel-xe/IGT_8863/shard-bmg-2/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html
   [38]: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/shard-bmg-5/igt@kms_tiled_display@basic-test-pattern-with-chamelium.html

  
  [Intel XE#1499]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1499
  [Intel XE#1503]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1503
  [Intel XE#1729]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/1729
  [Intel XE#2234]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2234
  [Intel XE#2311]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2311
  [Intel XE#2312]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2312
  [Intel XE#2327]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2327
  [Intel XE#2426]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2426
  [Intel XE#2509]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2509
  [Intel XE#2850]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2850
  [Intel XE#2887]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/2887
  [Intel XE#301]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/301
  [Intel XE#3321]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3321
  [Intel XE#3374]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3374
  [Intel XE#3544]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/3544
  [Intel XE#4227]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4227
  [Intel XE#4459]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/4459
  [Intel XE#5545]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5545
  [Intel XE#5625]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5625
  [Intel XE#5848]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/5848
  [Intel XE#6569]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6569
  [Intel XE#6652]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6652
  [Intel XE#6874]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6874
  [Intel XE#6974]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/6974
  [Intel XE#7178]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7178
  [Intel XE#7351]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7351
  [Intel XE#7397]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7397
  [Intel XE#7424]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7424
  [Intel XE#7437]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7437
  [Intel XE#7445]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7445
  [Intel XE#7725]: https://gitlab.freedesktop.org/drm/xe/kernel/issues/7725


Build changes
-------------

  * IGT: IGT_8863 -> IGTPW_15002
  * Linux: xe-4917-ff84b38d86b994ebb03d940be1c73a63e231f454 -> xe-4918-2a1c604bebed8cbbe6aea00f761777eed424dc55

  IGTPW_15002: 874a24e935f57c60527a517395e71a728038f2f7 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  IGT_8863: 5b279a8b71dc1672099205a1a9e8135c7c7fadb5 @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
  xe-4917-ff84b38d86b994ebb03d940be1c73a63e231f454: ff84b38d86b994ebb03d940be1c73a63e231f454
  xe-4918-2a1c604bebed8cbbe6aea00f761777eed424dc55: 2a1c604bebed8cbbe6aea00f761777eed424dc55

== Logs ==

For more details see: https://intel-gfx-ci.01.org/tree/intel-xe/IGTPW_15002/index.html

[-- Attachment #2: Type: text/html, Size: 14007 bytes --]

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test
  2026-04-16 15:54 ` [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
  2026-04-16 19:54   ` Sharma, Swati2
@ 2026-04-17  7:28   ` Jani Nikula
  1 sibling, 0 replies; 12+ messages in thread
From: Jani Nikula @ 2026-04-17  7:28 UTC (permalink / raw)
  To: Juha-Pekka Heikkila, igt-dev; +Cc: Juha-Pekka Heikkila

On Thu, 16 Apr 2026, Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> wrote:
> choose mode from connector with lowest bandwidth requirement
> for tests to try to fit tests into bandwidth limitations
>
> Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
> ---
>  tests/intel/kms_sharpness_filter.c | 35 +++++++++++++++++++++++++++++-
>  1 file changed, 34 insertions(+), 1 deletion(-)
>
> diff --git a/tests/intel/kms_sharpness_filter.c b/tests/intel/kms_sharpness_filter.c
> index 98eb671d1..cf5b0d2c7 100644
> --- a/tests/intel/kms_sharpness_filter.c
> +++ b/tests/intel/kms_sharpness_filter.c
> @@ -609,6 +609,24 @@ static void build_test_suffix(data_t *data, enum test_type type,
>  	}
>  }
>  
> +static drmModeModeInfo *find_lowest_mode(igt_output_t *output)
> +{
> +	drmModeConnector *connector = output->config.connector;
> +	drmModeModeInfo *low = NULL;
> +
> +	for (int i = 0; i < connector->count_modes; i++) {

for_each_connector_mode()

> +		drmModeModeInfo *mode = &connector->modes[i];
> +		int pixels = mode->hdisplay * mode->vdisplay;
> +		int low_pixels = low ? low->hdisplay * low->vdisplay : INT_MAX;
> +
> +		if (pixels < low_pixels ||
> +		    (pixels == low_pixels && mode->vrefresh < low->vrefresh))
> +			low = mode;
> +	}
> +
> +	return low;
> +}
> +
>  static void
>  run_sharpness_filter_test(data_t *data, enum test_type type)
>  {
> @@ -647,7 +665,22 @@ run_sharpness_filter_test(data_t *data, enum test_type type)
>  					 data->mode->vdisplay,
>  					 data->mode->vrefresh);
>  			} else {
> -				data->mode = igt_output_get_mode(data->output);
> +				if (is_invalid_test(type)) {
> +					data->mode = igt_output_get_mode(data->output);
> +				} else {
> +					data->mode = find_lowest_mode(data->output);
> +					if (!data->mode) {
> +						igt_info("No mode found on output %s\n",
> +							 igt_output_name(data->output));
> +						continue;
> +					}
> +
> +					igt_info("Executing on lowest mode %dx%d@%d@%s\n",
> +						 data->mode->hdisplay,
> +						 data->mode->vdisplay,
> +						 data->mode->vrefresh,
> +						 data->output->name);
> +				}
>  			}
>  
>  			if (!has_sharpness_filter(data->crtc)) {

-- 
Jani Nikula, Intel

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-04-17  7:28 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-04-16 15:54 [PATCH i-g-t v2 0/4] Refactor kms_sharpness_filter tests Juha-Pekka Heikkila
2026-04-16 15:54 ` [PATCH i-g-t v2 1/4] tests/intel/kms_sharpness_filter: sanitize subtest init Juha-Pekka Heikkila
2026-04-16 15:54 ` [PATCH i-g-t v2 2/4] tests/intel/kms_sharpness_filter: refactor test_sharpness_filter function Juha-Pekka Heikkila
2026-04-16 19:53   ` Sharma, Swati2
2026-04-16 15:54 ` [PATCH i-g-t v2 3/4] tests/intel/kms_sharpness_filter: restructure igt_main Juha-Pekka Heikkila
2026-04-16 19:53   ` Sharma, Swati2
2026-04-16 15:54 ` [PATCH i-g-t v2 4/4] tests/intel/kms_sharpness_filter: Find mode with lowest bw requirement for test Juha-Pekka Heikkila
2026-04-16 19:54   ` Sharma, Swati2
2026-04-17  7:28   ` Jani Nikula
2026-04-17  0:39 ` ✓ Xe.CI.BAT: success for Refactor kms_sharpness_filter tests (rev2) Patchwork
2026-04-17  0:53 ` ✓ i915.CI.BAT: " Patchwork
2026-04-17  3:10 ` ✗ Xe.CI.FULL: failure " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox