public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] HAX: Find CRC failures more reliably
@ 2017-10-24 15:35 Maarten Lankhorst
  2017-10-24 17:35 ` ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Maarten Lankhorst @ 2017-10-24 15:35 UTC (permalink / raw)
  To: intel-gfx

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

diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c
index 8b33b478a9a9..92788b18b19f 100644
--- a/lib/igt_debugfs.c
+++ b/lib/igt_debugfs.c
@@ -582,20 +582,14 @@ static void pipe_crc_exit_handler(int sig)
  */
 void igt_require_pipe_crc(int fd)
 {
-	const char *cmd = "pipe A none";
-	int ctl, written;
-
-	ctl = igt_debugfs_open(fd, "crtc-0/crc/control", O_RDONLY);
-	if (ctl < 0) {
-		ctl = igt_debugfs_open(fd, "i915_display_crc_ctl", O_WRONLY);
-		igt_require_f(ctl,
-			      "No display_crc_ctl found, kernel too old\n");
-
-		written = write(ctl, cmd, strlen(cmd));
-		igt_require_f(written < 0,
-			      "CRCs not supported on this platform\n");
-	}
-	close(ctl);
+	int dir;
+	struct stat stat;
+
+	dir = igt_debugfs_dir(fd);
+	igt_assert(dir >= 0);
+	igt_assert_eq(fstatat(dir, "crtc-0/crc/control", &stat, 0), 0);
+
+	close(dir);
 }
 
 static void igt_hpd_storm_exit_handler(int sig)
@@ -735,22 +729,9 @@ pipe_crc_new(int fd, enum pipe pipe, enum intel_pipe_crc_source source, int flag
 
 	sprintf(buf, "crtc-%d/crc/control", pipe);
 	pipe_crc->ctl_fd = openat(debugfs, buf, O_WRONLY);
-	if (pipe_crc->ctl_fd == -1) {
-		pipe_crc->ctl_fd = openat(debugfs,
-					  "i915_display_crc_ctl", O_WRONLY);
-		igt_assert(pipe_crc->ctl_fd != -1);
-		pipe_crc->is_legacy = true;
-	}
+	igt_assert(pipe_crc->ctl_fd != -1);
 
-	if (pipe_crc->is_legacy) {
-		sprintf(buf, "i915_pipe_%s_crc", kmstest_pipe_name(pipe));
-		pipe_crc->crc_fd = openat(debugfs, buf, flags);
-		igt_assert(pipe_crc->crc_fd != -1);
-		igt_debug("Using legacy frame CRC ABI\n");
-	} else {
-		pipe_crc->crc_fd = -1;
-		igt_debug("Using generic frame CRC ABI\n");
-	}
+	igt_debug("Using generic frame CRC ABI\n");
 
 	pipe_crc->fd = fd;
 	pipe_crc->dir = debugfs;
-- 
2.14.1

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

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

end of thread, other threads:[~2017-10-25 11:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-10-24 15:35 [PATCH i-g-t] HAX: Find CRC failures more reliably Maarten Lankhorst
2017-10-24 17:35 ` ✗ Fi.CI.BAT: failure for " Patchwork
2017-10-25  8:36 ` [PATCH i-g-t] HAX: Find CRC failures more reliably, v2 Maarten Lankhorst
2017-10-25  8:56 ` ✗ Fi.CI.BAT: failure for HAX: Find CRC failures more reliably (rev2) Patchwork
2017-10-25  9:18 ` ✗ Fi.CI.BAT: warning " Patchwork
2017-10-25  9:19 ` ✗ Fi.CI.IGT: failure for HAX: Find CRC failures more reliably Patchwork
2017-10-25 10:14 ` ✗ Fi.CI.BAT: failure for HAX: Find CRC failures more reliably (rev2) Patchwork
2017-10-25 11:11 ` ✓ Fi.CI.IGT: success " Patchwork

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