diff options
author | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-09-06 11:40:03 -0700 |
---|---|---|
committer | Ben Widawsky <benjamin.widawsky@intel.com> | 2013-09-20 09:42:07 -0700 |
commit | e740bdf5bd1339b58912eb359902ca68529b438d (patch) | |
tree | 748e8208da572223226b59a57a8de758ef94a446 /tools | |
parent | 318c0b22d7756d2ae33328935c2f15cd790f6b01 (diff) |
intel_l3_parity: Assert all GEN7+ support
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/intel_l3_parity.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/tools/intel_l3_parity.c b/tools/intel_l3_parity.c index 970dcd67..715d0957 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) { |