mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-21 14:56:18 +00:00
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>
This commit is contained in:
parent
318c0b22d7
commit
e740bdf5bd
@ -116,15 +116,14 @@ int main(int argc, char *argv[])
|
|||||||
drm_fd = drm_open_any();
|
drm_fd = drm_open_any();
|
||||||
devid = intel_get_drm_devid(drm_fd);
|
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);
|
ret = asprintf(&path, "/sys/class/drm/card%d/l3_parity", device);
|
||||||
assert(ret != -1);
|
assert(ret != -1);
|
||||||
|
|
||||||
fd = open(path, O_RDWR);
|
fd = open(path, O_RDWR);
|
||||||
if (fd == -1 && IS_IVYBRIDGE(devid)) {
|
assert(fd != -1);
|
||||||
perror("Opening sysfs");
|
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
} else if (fd == -1)
|
|
||||||
exit(EXIT_SUCCESS);
|
|
||||||
|
|
||||||
ret = read(fd, l3log, NUM_REGS * sizeof(uint32_t));
|
ret = read(fd, l3log, NUM_REGS * sizeof(uint32_t));
|
||||||
if (ret == -1) {
|
if (ret == -1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user