All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Move bandwidth calculation to igt_fixture
@ 2020-03-27 14:08 Mika Kahola
  2020-03-27 14:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Mika Kahola @ 2020-03-27 14:08 UTC (permalink / raw)
  To: igt-dev; +Cc: petri.latvala

The commit 153b34b5353df8c18a87d ("tests/kms_concurrent:
Test maximum number of planes supported by the platform")
caused regression on pipe B testing such as.

IGT-Version: 1.25-gfd8248084 (x86_64) (Linux: 5.6.0-rc7-CI-CI_DRM_8194+ x86_64)
Starting subtest: pipe-B
Testing resolution with connector VGA-1 using pipe B with seed 1585245074
child 0 died with signal 11, Segmentation fault
Subtest pipe-B: FAIL (0.330s)

To fix this, we need move bandwidth calculation routines into part of
igt_fixture instead of calculating it just before actual testing. The patch
takes the minimum of those maximum number of planes for given output.

Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 tests/kms_concurrent.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/tests/kms_concurrent.c b/tests/kms_concurrent.c
index 1403e990..ce05f5fa 100644
--- a/tests/kms_concurrent.c
+++ b/tests/kms_concurrent.c
@@ -36,6 +36,7 @@ typedef struct {
 	igt_display_t display;
 	igt_plane_t **plane;
 	struct igt_fb *fb;
+	int max_planes;
 } data_t;
 
 /* Command line parameters. */
@@ -321,30 +322,28 @@ static void
 run_tests_for_pipe(data_t *data, enum pipe pipe)
 {
 	igt_output_t *output;
-	int max_planes;
 
 	igt_fixture {
 		int valid_tests = 0;
+		int n_planes = data->display.pipes[pipe].n_planes;
 
 		igt_skip_on(pipe >= data->display.n_pipes);
-		igt_require(data->display.pipes[pipe].n_planes > 0);
+		igt_require(n_planes > 0);
 
-		for_each_valid_output_on_pipe(&data->display, pipe, output)
+		for_each_valid_output_on_pipe(&data->display, pipe, output) {
+			test_init(data, pipe, n_planes, output);
+			data->max_planes = min(data->max_planes,
+						test_bandwidth(data, pipe, output));
+			test_fini(data, pipe, n_planes, output);
 			valid_tests++;
-
+		}
 		igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
+		igt_display_reset(&data->display);
 	}
 
 	igt_subtest_f("pipe-%s", kmstest_pipe_name(pipe)) {
 		for_each_valid_output_on_pipe(&data->display, pipe, output) {
-			int n_planes = data->display.pipes[pipe].n_planes;
-
-			test_init(data, pipe, n_planes, output);
-			max_planes = test_bandwidth(data, pipe, output);
-			test_fini(data, pipe, n_planes, output);
-
-			igt_display_reset(&data->display);
-			run_test(data, pipe, max_planes, output);
+			run_test(data, pipe, data->max_planes, output);
 		}
 	}
 }
@@ -392,6 +391,7 @@ igt_main_args("", long_options, help_str, opt_handler, NULL)
 		kmstest_set_vt_graphics_mode();
 		igt_display_require(&data.display, data.drm_fd);
 		igt_require(data.display.is_atomic);
+		data.max_planes = data.display.pipes[0].n_planes;
 	}
 
 	for_each_pipe_static(pipe) {
-- 
2.20.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

end of thread, other threads:[~2020-03-30  7:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-27 14:08 [igt-dev] [PATCH i-g-t] tests/kms_concurrent: Move bandwidth calculation to igt_fixture Mika Kahola
2020-03-27 14:33 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2020-03-28 14:21 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
2020-03-30  6:18 ` [igt-dev] ✓ Fi.CI.BAT: success for tests/kms_concurrent: Move bandwidth calculation to igt_fixture (rev2) Patchwork
2020-03-30  7:37 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.