[PATCH i-g-t] tests/kms_pipe_crc_basic: Reset GPU before running subtests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It has been noticed by our CI BAT testing that in some 1%-3% probability
kms_pipe_crc_basic subtest read-crc-pipe-x-frame-sequence fails when
comparing gathered CRC frames. However, running kms_pipe_crc_basic
subtests alone i.e. outside BAT I was unable to replicate the issue.

The patch proposes a GPU reset before running the subtests. This way we
can ensure that GPU register settings are reinitialized if they have been
altered by the tests executed earlier in BAT.

The issue has been seen on following bug reports
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99788
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100367

Signed-off-by: Mika Kahola <mika.kahola@xxxxxxxxx>
---
 tests/kms_pipe_crc_basic.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/tests/kms_pipe_crc_basic.c b/tests/kms_pipe_crc_basic.c
index f49b434..e1940e6 100644
--- a/tests/kms_pipe_crc_basic.c
+++ b/tests/kms_pipe_crc_basic.c
@@ -175,6 +175,13 @@ static void test_read_crc(data_t *data, int pipe, unsigned flags)
 	igt_require_f(valid_connectors, "No connector found for pipe %i\n", pipe);
 }
 
+static void reset_gpu(void)
+{
+	int fd = drm_open_driver(DRIVER_INTEL);
+	igt_post_hang_ring(fd, igt_hang_ring(fd, I915_EXEC_DEFAULT));
+	close(fd);
+}
+
 data_t data = {0, };
 
 igt_main
@@ -194,6 +201,9 @@ igt_main
 		data.debugfs = igt_debugfs_dir(data.drm_fd);
 	}
 
+	/* before running tests, reset gpu */
+	reset_gpu();
+
 	igt_subtest("bad-pipe")
 		test_bad_command(&data, "pipe D none");
 
-- 
2.7.4

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux