public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ben Widawsky <benjamin.widawsky@intel.com>
To: Intel GFX <intel-gfx@lists.freedesktop.org>
Cc: Bryan Bell <bryan.j.bell@intel.com>,
	Ben Widawsky <ben@bwidawsk.net>,
	Ben Widawsky <benjamin.widawsky@intel.com>
Subject: [PATCH 08/14] intel_l3_parity: Assert all GEN7+ support
Date: Tue, 17 Sep 2013 21:12:49 -0700	[thread overview]
Message-ID: <1379477575-2164-8-git-send-email-benjamin.widawsky@intel.com> (raw)
In-Reply-To: <1379477575-2164-1-git-send-email-benjamin.widawsky@intel.com>

v2: Don't assert for Valleyview (Bryan)
Rework code to be a bit more readable.

CC: "Bell, Bryan J" <bryan.j.bell@intel.com>
Signed-off-by: Ben Widawsky <ben@bwidawsk.net>
---
 tools/intel_l3_parity.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c
index 970dcd6..715d095 100644
--- a/tools/intel_l3_parity.c
+++ b/tools/intel_l3_parity.c
@@ -116,15 +116,14 @@ int main(int argc, char *argv[])
 	drm_fd = drm_open_any();
 	devid = intel_get_drm_devid(drm_fd);
 
+	if (intel_gen(devid) < 7 || IS_VALLEYVIEW(devid))
+		exit(EXIT_SUCCESS);
+
 	ret = asprintf(&path, "/sys/class/drm/card%d/l3_parity", device);
 	assert(ret != -1);
 
 	fd = open(path, O_RDWR);
-	if (fd == -1 && IS_IVYBRIDGE(devid)) {
-		perror("Opening sysfs");
-		exit(EXIT_FAILURE);
-	} else if (fd == -1)
-		exit(EXIT_SUCCESS);
+	assert(fd != -1);
 
 	ret = read(fd, l3log, NUM_REGS * sizeof(uint32_t));
 	if (ret == -1) {
-- 
1.8.4

  parent reply	other threads:[~2013-09-18  4:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-18  4:12 [PATCH 1/6] drm/i915: Fix HSW parity test Ben Widawsky
2013-09-18  4:12 ` [PATCH 2/6] drm/i915: Add second slice l3 remapping Ben Widawsky
2013-09-18  7:36   ` Ville Syrjälä
2013-09-18 16:22     ` Ben Widawsky
2013-09-19 18:13     ` [PATCH] [v3] " Ben Widawsky
2013-09-18  4:12 ` [PATCH 3/6] drm/i915: Make l3 remapping use the ring Ben Widawsky
2013-09-19 18:39   ` Daniel Vetter
2013-09-18  4:12 ` [PATCH 4/6] drm/i915: Keep a list of all contexts Ben Widawsky
2013-09-18  4:12 ` [PATCH 5/6] drm/i915: Do remaps for " Ben Widawsky
2013-09-18  7:48   ` Ville Syrjälä
2013-09-19  1:14     ` Ben Widawsky
2013-09-19  1:17       ` Ben Widawsky
2013-09-19  2:03     ` [PATCH] [v3] " Ben Widawsky
2013-09-18  4:12 ` [PATCH 6/6] drm/i915: s/HAS_L3_GPU_CACHE/HAS_L3_DPF Ben Widawsky
2013-09-18  7:50   ` Ville Syrjälä
2013-09-19 17:47     ` [PATCH] [v2] " Ben Widawsky
2013-09-19 18:01     ` Ben Widawsky
2013-09-19 18:41       ` Daniel Vetter
2013-09-19 19:59         ` Ben Widawsky
2013-09-18  4:12 ` [PATCH 07/14] intel_l3_parity: Fix indentation Ben Widawsky
2013-09-18  4:12 ` Ben Widawsky [this message]
2013-09-18  4:12 ` [PATCH 09/14] intel_l3_parity: Use getopt for the l3 parity tool Ben Widawsky
2013-09-18  4:12 ` [PATCH 10/14] intel_l3_parity: Hardware info argument Ben Widawsky
2013-09-18  4:12 ` [PATCH 11/14] intel_l3_parity: slice support Ben Widawsky
2013-09-18  4:12 ` [PATCH 12/14] intel_l3_parity: Actually support multiple slices Ben Widawsky
2013-09-18  4:12 ` [PATCH 13/14] intel_l3_parity: Support error injection Ben Widawsky
2013-09-18  4:12 ` [PATCH 14/14] intel_l3_parity: Support a daemonic mode Ben Widawsky

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=1379477575-2164-8-git-send-email-benjamin.widawsky@intel.com \
    --to=benjamin.widawsky@intel.com \
    --cc=ben@bwidawsk.net \
    --cc=bryan.j.bell@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