[igt-dev] [PATCH i-g-t] lib/igt_debugfs: Add timeouts to opening pipe CRC fd.

Maarten Lankhorst maarten.lankhorst at linux.intel.com
Thu Apr 5 10:49:54 UTC 2018


This will fix the PSR tests to fail slightly faster, since they wait
indefinitely for a CRC that never comes during open.

Signed-off-by: Maarten Lankhorst <maarten.lankhorst at linux.intel.com>
---
 lib/igt_debugfs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 8adc02e9cc47..094df564b6f4 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -757,7 +757,10 @@ void igt_pipe_crc_start(igt_pipe_crc_t *pipe_crc)
 
 	sprintf(buf, "crtc-%d/crc/data", pipe_crc->pipe);
 
+	igt_set_timeout(5, "Opening crc fd, which waits for first CRC.");
 	pipe_crc->crc_fd = openat(pipe_crc->dir, buf, pipe_crc->flags);
+	igt_reset_timeout();
+
 	igt_assert(pipe_crc->crc_fd != -1);
 	errno = 0;
 }
-- 
2.16.3



More information about the igt-dev mailing list