public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH i-g-t] HAX: Find CRC failures more reliably
Date: Tue, 24 Oct 2017 17:35:22 +0200	[thread overview]
Message-ID: <20171024153522.9068-1-maarten.lankhorst@linux.intel.com> (raw)

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

             reply	other threads:[~2017-10-24 15:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-24 15:35 Maarten Lankhorst [this message]
2017-10-24 17:35 ` ✗ Fi.CI.BAT: failure for HAX: Find CRC failures more reliably 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171024153522.9068-1-maarten.lankhorst@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox