public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run
@ 2026-02-12 11:10 Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 1/4] tests/kms_flip: test suspend on one pair of pipes Michał Grzelak
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Michał Grzelak @ 2026-02-12 11:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Mohammed Thasleem, Michał Grzelak

Next version of [1]. This series addresses both 2x-* and single output
tests. This series has been tested on config with 4 outputs connected.

[1] https://lore.kernel.org/igt-dev/20260210225546.153728-1-michal.grzelak@intel.com

BR,
Michał

---
Changelog:
v3->v4
- change \gt into \ge sign

v2->v3
- ease counting of pairs of outputs
- limit number of tested outputs
- narrow pair & output limiting to suspend subtests
- add separate param for pair and connector limiting

v1->v2
- split pipe limiting into 2x- and single subtests
- add output pair limiting



Michał Grzelak (4):
  tests/kms_flip: test suspend on one pair of pipes
  tests/kms_flip: run suspend tests on one pipe per output
  tests/kms_flip: limit output pairs when testing suspend
  tests/kms_flip: limit number of outputs wrt suspend

 tests/kms_flip.c | 74 +++++++++++++++++++++++++++++++++++++++---------
 1 file changed, 61 insertions(+), 13 deletions(-)

-- 
2.45.2


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

* [PATCH i-g-t v4 1/4] tests/kms_flip: test suspend on one pair of pipes
  2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
@ 2026-02-12 11:10 ` Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 2/4] tests/kms_flip: run suspend tests on one pipe per output Michał Grzelak
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Michał Grzelak @ 2026-02-12 11:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Mohammed Thasleem, Michał Grzelak

Currently, every pair of ({pipe1, pipe2}, {output1, output2}) is being
tested in 2x-* subtests. Since suspend shouldn't be tested per pipe, it
causes unnecessary overhead: with 4 pipes & 4 displays it runs up to 36
tests. Given that each suspend's dynamic subtest can take up to tens of
seconds, total duration of the test easily exceeds timeout.

When testing suspend, for each pair of outputs test only first and last
pipe unless it is said to run on all pipes.

Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
 tests/kms_flip.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index a74e69c6f..82d000fe5 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1920,6 +1920,12 @@ static void run_pair(int duration, int flags)
 		for (n = 0; n < resources->count_crtcs; n++) {
 			for (j = i + 1; j < resources->count_connectors; j++) {
 				for (m = n + 1; m < resources->count_crtcs; m++) {
+					/* Limit the execution to 2 CRTCs (first & last) for hang and suspend tests */
+					if (((flags & TEST_HANG) || (flags & TEST_SUSPEND)) && !all_pipes &&
+					    ((n != 0 && n != resources->count_crtcs) ||
+					    m != resources->count_crtcs - 1))
+						continue;
+
 					memset(&o, 0, sizeof(o));
 					o.count = 2;
 					o._connector[0] = resources->connectors[i];
@@ -1965,8 +1971,8 @@ static void run_pair(int duration, int flags)
 					crtc_idxs[0] = n;
 					crtc_idxs[1] = m;
 
-					/* Limit the execution to 2 CRTCs (first & last) for hang tests */
-					if ((flags & TEST_HANG) && !all_pipes &&
+					/* Limit the execution to 2 CRTCs (first & last) for hang and suspend tests */
+					if (((flags & TEST_HANG) || (flags & TEST_SUSPEND)) && !all_pipes &&
 					    ((n != 0 && n != resources->count_crtcs) ||
 					    m != resources->count_crtcs - 1))
 						continue;
-- 
2.45.2


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

* [PATCH i-g-t v4 2/4] tests/kms_flip: run suspend tests on one pipe per output
  2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 1/4] tests/kms_flip: test suspend on one pair of pipes Michał Grzelak
@ 2026-02-12 11:10 ` Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 3/4] tests/kms_flip: limit output pairs when testing suspend Michał Grzelak
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Michał Grzelak @ 2026-02-12 11:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Mohammed Thasleem, Michał Grzelak

It is not necessary to test suspend on same output but different pipe.
In case of suspend tests, limit number of dynamic subtests run per
output when any pipe has already been tested.

Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
 tests/kms_flip.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 82d000fe5..c32d8c60b 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1846,6 +1846,10 @@ static void run_test(int duration, int flags)
 			    n != 0 && n != (resources->count_crtcs - 1))
 				continue;
 
+			/* Limit the execution to 1 CRTC (first) for suspend tests */
+			if ((flags & TEST_SUSPEND) && !all_pipes && n != 0)
+				continue;
+
 			memset(&o, 0, sizeof(o));
 			o.count = 1;
 			o._connector[0] = resources->connectors[i];
@@ -1878,6 +1882,10 @@ static void run_test(int duration, int flags)
 			    n != 0 && n != (resources->count_crtcs - 1))
 				continue;
 
+			/* Limit the execution to 1 CRTC (first) for suspend tests */
+			if ((flags & TEST_SUSPEND) && !all_pipes && n != 0)
+				continue;
+
 			memset(&o, 0, sizeof(o));
 			o.count = 1;
 			o._connector[0] = resources->connectors[i];
-- 
2.45.2


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

* [PATCH i-g-t v4 3/4] tests/kms_flip: limit output pairs when testing suspend
  2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 1/4] tests/kms_flip: test suspend on one pair of pipes Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 2/4] tests/kms_flip: run suspend tests on one pipe per output Michał Grzelak
@ 2026-02-12 11:10 ` Michał Grzelak
  2026-02-12 11:10 ` [PATCH i-g-t v4 4/4] tests/kms_flip: limit number of outputs wrt suspend Michał Grzelak
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 8+ messages in thread
From: Michał Grzelak @ 2026-02-12 11:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Mohammed Thasleem, Michał Grzelak

Currently 2x- subtests can still exceed timeout, even with limited
number of pipes pair. It can be seen when number of outputs is greater
than 3.

Default to testing at max 3 pairs of outputs. Add a commandline
parameter enabling suspend testing on all possible output pairs. Add a
LIMIT_PAIR macro which controls maximum number of output pairs to test.

Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
 tests/kms_flip.c | 41 ++++++++++++++++++++++++++++++-----------
 1 file changed, 30 insertions(+), 11 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index c32d8c60b..232b6fbbe 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -263,11 +263,14 @@
 #define RUN_TEST		1
 #define RUN_PAIR		2
 
+#define PAIR_LIMIT 		3
+
 #ifndef DRM_CAP_TIMESTAMP_MONOTONIC
 #define DRM_CAP_TIMESTAMP_MONOTONIC 6
 #endif
 
 static bool all_pipes = false;
+static bool all_pairs = false;
 
 drmModeRes *resources;
 int drm_fd;
@@ -1906,6 +1909,7 @@ static void run_pair(int duration, int flags)
 {
 	struct test_output o;
 	int i, j, m, n, modes = 0;
+	int pair_count = 0;
 
 	/* No tiling support in XE. */
 	if (is_xe_device(drm_fd) && flags & TEST_FENCE_STRESS)
@@ -1968,6 +1972,16 @@ static void run_pair(int duration, int flags)
 				for (m = n + 1; m < resources->count_crtcs; m++) {
 					int crtc_idxs[2];
 
+					/* Limit the execution to 2 CRTCs (first & last) for hang and suspend tests */
+					if (((flags & TEST_HANG) || (flags & TEST_SUSPEND)) && !all_pipes &&
+					    ((n != 0 && n != resources->count_crtcs) ||
+					    m != resources->count_crtcs - 1))
+						continue;
+
+					/* Limit number of suspend tests */
+					if ((flags & TEST_SUSPEND) && !all_pairs && pair_count >= PAIR_LIMIT)
+						continue;
+
 					memset(&o, 0, sizeof(o));
 					o.count = 2;
 					o._connector[0] = resources->connectors[i];
@@ -1979,16 +1993,17 @@ static void run_pair(int duration, int flags)
 					crtc_idxs[0] = n;
 					crtc_idxs[1] = m;
 
-					/* Limit the execution to 2 CRTCs (first & last) for hang and suspend tests */
-					if (((flags & TEST_HANG) || (flags & TEST_SUSPEND)) && !all_pipes &&
-					    ((n != 0 && n != resources->count_crtcs) ||
-					    m != resources->count_crtcs - 1))
-						continue;
+					connector_find_compatible_mode(n, m, &o);
 
-					run_test_on_crtc_set(&o, crtc_idxs,
-							     RUN_PAIR,
-							     resources->count_crtcs,
-							     duration);
+					if (o.mode_valid) {
+						run_test_on_crtc_set(&o, crtc_idxs,
+								     RUN_PAIR,
+								     resources->count_crtcs,
+								     duration);
+						pair_count++;
+					} else {
+						free_test_output(&o);
+					}
 				}
 			}
 		}
@@ -2046,6 +2061,9 @@ static int opt_handler(int opt, int opt_index, void *data)
 		case 'e':
 			all_pipes = true;
 			break;
+		case 'p':
+			all_pairs = true;
+			break;
 		default:
 			return IGT_OPT_HANDLER_ERROR;
 	}
@@ -2054,9 +2072,10 @@ static int opt_handler(int opt, int opt_index, void *data)
 }
 
 const char *help_str =
-	"  -e \tRun on all pipes. (By default subtests will run on two pipes)\n";
+	"  -e \tRun on all pipes. (By default subtests will run on two pipes)\n"
+	"  -p \tRun on all output pairs. (By default 2x-* suspend subtests will run on 3 pairs)\n";
 
-int igt_main_args("e", NULL, help_str, opt_handler, NULL)
+int igt_main_args("ep", NULL, help_str, opt_handler, NULL)
 {
 	struct {
 		int duration;
-- 
2.45.2


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

* [PATCH i-g-t v4 4/4] tests/kms_flip: limit number of outputs wrt suspend
  2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
                   ` (2 preceding siblings ...)
  2026-02-12 11:10 ` [PATCH i-g-t v4 3/4] tests/kms_flip: limit output pairs when testing suspend Michał Grzelak
@ 2026-02-12 11:10 ` Michał Grzelak
  2026-02-12 15:47 ` ✗ Fi.CI.BUILD: failure for kms_flip: limit number of subtests run (rev3) Patchwork
  2026-02-12 19:53 ` [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Sharma, Swati2
  5 siblings, 0 replies; 8+ messages in thread
From: Michał Grzelak @ 2026-02-12 11:10 UTC (permalink / raw)
  To: igt-dev; +Cc: Mohammed Thasleem, Michał Grzelak

When running suspend subtests on single output, we can still hit the
timeout by testing too much outputs. Default to testing 3 outputs. Add
commandline parameter to run on all outputs.

Signed-off-by: Michał Grzelak <michal.grzelak@intel.com>
---
 tests/kms_flip.c | 21 ++++++++++++++++++---
 1 file changed, 18 insertions(+), 3 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 232b6fbbe..97be899da 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -264,12 +264,14 @@
 #define RUN_PAIR		2
 
 #define PAIR_LIMIT 		3
+#define CONN_LIMIT 		3
 
 #ifndef DRM_CAP_TIMESTAMP_MONOTONIC
 #define DRM_CAP_TIMESTAMP_MONOTONIC 6
 #endif
 
 static bool all_pipes = false;
+static bool all_conns = false;
 static bool all_pairs = false;
 
 drmModeRes *resources;
@@ -1824,6 +1826,7 @@ static void run_test(int duration, int flags)
 {
 	struct test_output o;
 	int i, n, modes = 0;
+	int conn_count = 0;
 
 	/* No tiling support in XE. */
 	if (is_xe_device(drm_fd) && flags & TEST_FENCE_STRESS)
@@ -1889,6 +1892,10 @@ static void run_test(int duration, int flags)
 			if ((flags & TEST_SUSPEND) && !all_pipes && n != 0)
 				continue;
 
+			/* Limit number of displays run */
+			if ((flags & TEST_SUSPEND) && !all_conns && conn_count >= CONN_LIMIT)
+				continue;
+
 			memset(&o, 0, sizeof(o));
 			o.count = 1;
 			o._connector[0] = resources->connectors[i];
@@ -1897,8 +1904,15 @@ static void run_test(int duration, int flags)
 			o.depth = 24;
 
 			crtc_idx = n;
-			run_test_on_crtc_set(&o, &crtc_idx, RUN_TEST,
-					     resources->count_crtcs, duration);
+
+			connector_find_preferred_mode(o._connector[0], n, &o);
+			if (o.mode_valid) {
+				run_test_on_crtc_set(&o, &crtc_idx, RUN_TEST,
+						     resources->count_crtcs, duration);
+				conn_count++;
+			} else {
+				free_test_output(&o);
+			}
 		}
 	}
 
@@ -2072,10 +2086,11 @@ static int opt_handler(int opt, int opt_index, void *data)
 }
 
 const char *help_str =
+	"  -c \tRun on all connectors. (By default suspend subtests will run on 3 connectors)\n"
 	"  -e \tRun on all pipes. (By default subtests will run on two pipes)\n"
 	"  -p \tRun on all output pairs. (By default 2x-* suspend subtests will run on 3 pairs)\n";
 
-int igt_main_args("ep", NULL, help_str, opt_handler, NULL)
+int igt_main_args("cep", NULL, help_str, opt_handler, NULL)
 {
 	struct {
 		int duration;
-- 
2.45.2


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

* ✗ Fi.CI.BUILD: failure for kms_flip: limit number of subtests run (rev3)
  2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
                   ` (3 preceding siblings ...)
  2026-02-12 11:10 ` [PATCH i-g-t v4 4/4] tests/kms_flip: limit number of outputs wrt suspend Michał Grzelak
@ 2026-02-12 15:47 ` Patchwork
  2026-02-12 19:53 ` [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Sharma, Swati2
  5 siblings, 0 replies; 8+ messages in thread
From: Patchwork @ 2026-02-12 15:47 UTC (permalink / raw)
  To: Michał Grzelak; +Cc: igt-dev

== Series Details ==

Series: kms_flip: limit number of subtests run (rev3)
URL   : https://patchwork.freedesktop.org/series/161389/
State : failure

== Summary ==

Applying: tests/kms_flip: test suspend on one pair of pipes
Using index info to reconstruct a base tree...
M	tests/kms_flip.c
Falling back to patching base and 3-way merge...
Auto-merging tests/kms_flip.c
CONFLICT (content): Merge conflict in tests/kms_flip.c
Patch failed at 0001 tests/kms_flip: test suspend on one pair of pipes
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".



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

* Re: [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run
  2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
                   ` (4 preceding siblings ...)
  2026-02-12 15:47 ` ✗ Fi.CI.BUILD: failure for kms_flip: limit number of subtests run (rev3) Patchwork
@ 2026-02-12 19:53 ` Sharma, Swati2
  2026-02-13  9:12   ` Michał Grzelak
  5 siblings, 1 reply; 8+ messages in thread
From: Sharma, Swati2 @ 2026-02-12 19:53 UTC (permalink / raw)
  To: Michał Grzelak, igt-dev; +Cc: Mohammed Thasleem

Hi Michal,

There seems to be build failure with your patches, can you please float 
new rev?

On 12-02-2026 04:40 pm, Michał Grzelak wrote:
> Next version of [1]. This series addresses both 2x-* and single output
> tests. This series has been tested on config with 4 outputs connected.
>
> [1] https://lore.kernel.org/igt-dev/20260210225546.153728-1-michal.grzelak@intel.com
>
> BR,
> Michał
>
> ---
> Changelog:
> v3->v4
> - change \gt into \ge sign
>
> v2->v3
> - ease counting of pairs of outputs
> - limit number of tested outputs
> - narrow pair & output limiting to suspend subtests
> - add separate param for pair and connector limiting
>
> v1->v2
> - split pipe limiting into 2x- and single subtests
> - add output pair limiting
>
>
>
> Michał Grzelak (4):
>    tests/kms_flip: test suspend on one pair of pipes
>    tests/kms_flip: run suspend tests on one pipe per output
>    tests/kms_flip: limit output pairs when testing suspend
>    tests/kms_flip: limit number of outputs wrt suspend
>
>   tests/kms_flip.c | 74 +++++++++++++++++++++++++++++++++++++++---------
>   1 file changed, 61 insertions(+), 13 deletions(-)
>

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

* Re: [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run
  2026-02-12 19:53 ` [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Sharma, Swati2
@ 2026-02-13  9:12   ` Michał Grzelak
  0 siblings, 0 replies; 8+ messages in thread
From: Michał Grzelak @ 2026-02-13  9:12 UTC (permalink / raw)
  To: Sharma, Swati2; +Cc: Michał Grzelak, igt-dev, Mohammed Thasleem

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

On Thu, 12 Feb 2026, Sharma, Swati2 wrote:

> Hi Michal,
>
> There seems to be build failure with your patches, can you please float new 
> rev?

Huh, interesting because I git fetch'ed && git rebase'ed straight
before sending patches. Apparently some conflicting changes must have
been merged after I sent patches, but before they have been applied by
Patchwork, which resulted in build failure:

Patchwork, timestamp of sending to ML:
 	Subject: [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run
 	Date: Thu, 12 Feb 2026 12:10:18 +0100

Conflicting change, git log --oneline --pretty=fuller -- tests/kms_flip.c:
 	commit 2978b9a78
 	[...]
 	CommitDate: Thu Feb 12 13:20:19 2026 +0200

Patchwork, timestamp of patch application:
 	Subject: ✗ Fi.CI.BUILD: failure for kms_flip: limit number of subtests run (rev3)
 	Date: Thu, 12 Feb 2026 15:47:28 -0000

Almost impossible to happen, yet still non-zero chances. Let's hope it
won't happen for second time in a row. :)

BR,
Michał

>
> On 12-02-2026 04:40 pm, Michał Grzelak wrote:
>> Next version of [1]. This series addresses both 2x-* and single output
>> tests. This series has been tested on config with 4 outputs connected.
>> 
>> [1] 
>> https://lore.kernel.org/igt-dev/20260210225546.153728-1-michal.grzelak@intel.com
>> 
>> BR,
>> Michał
>> 
>> ---
>> Changelog:
>> v3->v4
>> - change \gt into \ge sign
>> 
>> v2->v3
>> - ease counting of pairs of outputs
>> - limit number of tested outputs
>> - narrow pair & output limiting to suspend subtests
>> - add separate param for pair and connector limiting
>> 
>> v1->v2
>> - split pipe limiting into 2x- and single subtests
>> - add output pair limiting
>> 
>> 
>> 
>> Michał Grzelak (4):
>>    tests/kms_flip: test suspend on one pair of pipes
>>    tests/kms_flip: run suspend tests on one pipe per output
>>    tests/kms_flip: limit output pairs when testing suspend
>>    tests/kms_flip: limit number of outputs wrt suspend
>>
>>   tests/kms_flip.c | 74 +++++++++++++++++++++++++++++++++++++++---------
>>   1 file changed, 61 insertions(+), 13 deletions(-)
>> 
>

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

end of thread, other threads:[~2026-02-13  9:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-12 11:10 [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Michał Grzelak
2026-02-12 11:10 ` [PATCH i-g-t v4 1/4] tests/kms_flip: test suspend on one pair of pipes Michał Grzelak
2026-02-12 11:10 ` [PATCH i-g-t v4 2/4] tests/kms_flip: run suspend tests on one pipe per output Michał Grzelak
2026-02-12 11:10 ` [PATCH i-g-t v4 3/4] tests/kms_flip: limit output pairs when testing suspend Michał Grzelak
2026-02-12 11:10 ` [PATCH i-g-t v4 4/4] tests/kms_flip: limit number of outputs wrt suspend Michał Grzelak
2026-02-12 15:47 ` ✗ Fi.CI.BUILD: failure for kms_flip: limit number of subtests run (rev3) Patchwork
2026-02-12 19:53 ` [PATCH i-g-t v4 0/4] kms_flip: limit number of subtests run Sharma, Swati2
2026-02-13  9:12   ` Michał Grzelak

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