Skip to contentSkip to conversation

lib/igt_debugfs: Throw away the two first CRCs

PATCH In review [email protected] 2 participants 3 messages Dec 9, 2014 – Dec 10, 2014 Library code

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 lib/igt_debugfs: Throw away the two first CRCs

From: Ville Syrjälä <[email protected]>

On CHV we sometimes see not just one but two bad CRCs. No real idea what would cause that, but let's just throw away the second CRC as well to gain some stability for the tests.

---
 lib/igt_debugfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
lib/igt_debugfs.c +4 -1
index 0b098ee..b44333e 100644
@@ -425,8 +425,11 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 	/*
 	 * For some no yet identified reason, the first CRC is bonkers. So
 	 * let's just wait for the next vblank and read out the buggy result.
+	 *
+	 * On CHV sometimes the second CRC is bonkers as well, so don't trust
+	 * that one either.
 	 */
-	igt_pipe_crc_get_crcs(pipe_crc, 1, &crcs);
+	igt_pipe_crc_get_crcs(pipe_crc, 2, &crcs);
 	free(crcs);
 }
 
Signature · 6 lines
2.0.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#1 lore raw

PATCH 2/2 tests/kms_mmio_vs_cs_flip: Count valid tests for all crtcs

From: Ville Syrjälä <[email protected]>

Report SKIP only if none of the pipe/connector combos worked, instead of trying to report for each pipe separately.

---
 tests/kms_mmio_vs_cs_flip.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)
tests/kms_mmio_vs_cs_flip.c +18 -18
index e50a911..00557aa 100644
@@ -474,31 +474,37 @@ test_crtc(data_t *data, igt_output_t *output, enum pipe pipe)
 }
 
 static void
-run_plane_test_for_pipe(data_t *data, enum pipe pipe)
+run_plane_test(data_t *data)
 {
 	igt_output_t *output;
 	enum igt_plane plane = 1; /* testing with one sprite is enough */
 	int valid_tests = 0;
-
-	igt_require(data->display.pipes[pipe].n_planes > 2);
+	enum pipe pipe;
 
 	for_each_connected_output(&data->display, output) {
-		if (test_plane(data, output, pipe, plane))
-			valid_tests++;
+		for_each_pipe(&data->display, pipe) {
+			igt_require(data->display.pipes[pipe].n_planes > 2);
+
+			if (test_plane(data, output, pipe, plane))
+				valid_tests++;
+		}
 	}
 
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
 }
 
 static void
-run_crtc_test_for_pipe(data_t *data, enum pipe pipe)
+run_crtc_test(data_t *data)
 {
 	igt_output_t *output;
 	int valid_tests = 0;
+	enum pipe pipe;
 
 	for_each_connected_output(&data->display, output) {
-		if (test_crtc(data, output, pipe))
-			valid_tests++;
+		for_each_pipe(&data->display, pipe) {
+			if (test_crtc(data, output, pipe))
+				valid_tests++;
+		}
 	}
 
 	igt_require_f(valid_tests, "no valid crtc/connector combinations found\n");
@@ -508,8 +514,6 @@ static data_t data;
 
 igt_main
 {
-	int pipe;
-
 	igt_skip_on_simulation();
 
 	igt_fixture {
@@ -531,15 +535,11 @@ igt_main
 		gem_set_tiling(data.drm_fd, data.busy_bo->handle, 0, 4096);
 	}
 
-	igt_subtest_f("setplane_vs_cs_flip") {
-		for (pipe = 0; pipe < data.display.n_pipes; pipe++)
-			run_plane_test_for_pipe(&data, pipe);
-	}
+	igt_subtest_f("setplane_vs_cs_flip")
+		run_plane_test(&data);
 
-	igt_subtest_f("setcrtc_vs_cs_flip") {
-		for (pipe = 0; pipe < data.display.n_pipes; pipe++)
-			run_crtc_test_for_pipe(&data, pipe);
-	}
+	igt_subtest_f("setcrtc_vs_cs_flip")
+		run_crtc_test(&data);
 
 	igt_fixture {
 		drm_intel_bo_unreference(data.busy_bo);
Signature · 6 lines
2.0.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
#2 lore raw
In reply to [email protected]
Quoted 16 lines · On Tue, Dec 09, 2014 at 05:25:16PM +0200, [email protected] wrote:

From: Ville Syrjälä <[email protected]>

On CHV we sometimes see not just one but two bad CRCs. No real idea what would cause that, but let's just throw away the second CRC as well to gain some stability for the tests.

---
 lib/igt_debugfs.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
lib/igt_debugfs.c +0 -0
index 0b098ee..b44333e 100644

lib/igt_debugfs.c void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc) · line 432

Quoted 9 lines
lib/igt_debugfs.c +4 -1
@@ -425,8 +425,11 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 	/*
 	 * For some no yet identified reason, the first CRC is bonkers. So
 	 * let's just wait for the next vblank and read out the buggy result.
+	 *
+	 * On CHV sometimes the second CRC is bonkers as well, so don't trust
+	 * that one either.
 	 */
-	igt_pipe_crc_get_crcs(pipe_crc, 1, &crcs);
+	igt_pipe_crc_get_crcs(pipe_crc, 2, &crcs);

I wonder a bit whether we shouldn't push these vblank waits into the kernel, maybe with some comments.

Wrt chv: Is this only on DP outputs? could be that the scrambler takes 2 vblanks (1 to set the bit, 1 to actually act on it) to go into the new fancy mode.
-Daniel

Quoted 10 lines
lib/igt_debugfs.c +0 -0
 	free(crcs);
 }
 
Signature · 6 lines
2.0.4

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx