summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2020-12-20 16:13:22 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2020-12-20 17:15:17 +0000
commitb30bdfecaf1ff38b83c0bfbcf5981732a968a464 (patch)
tree4800a72b4140afa1d6537779c30ef41f9cd73f4d /benchmarks
parent73871127b295f28340799d0ab55d06d620b4a953 (diff)
benchmarks/gem_latency: Release the user-forcewake before close
Release the forcewake before closing to avoid the deadlock from atexit. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/gem_latency.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/benchmarks/gem_latency.c b/benchmarks/gem_latency.c
index e89b5c5a..774a33d3 100644
--- a/benchmarks/gem_latency.c
+++ b/benchmarks/gem_latency.c
@@ -27,7 +27,6 @@
#include <pthread.h>
-#include "igt.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdint.h>
@@ -44,6 +43,9 @@
#include <sys/resource.h>
#include "drm.h"
+#include "igt.h"
+#include "igt_device.h"
+
#define CONTEXT 0x1
#define REALTIME 0x2
#define CMDPARSER 0x4
@@ -453,7 +455,8 @@ static int run(int seconds,
if (gen < 6)
return IGT_EXIT_SKIP; /* Needs BCS timestamp */
- intel_register_access_init(&mmio_data, intel_get_pci_device(), false, fd);
+ intel_register_access_init(&mmio_data,
+ igt_device_get_pci_device(fd), false, fd);
if (gen == 6)
timestamp_reg = REG(RCS_TIMESTAMP);
@@ -544,6 +547,7 @@ static int run(int seconds,
}
getrusage(RUSAGE_SELF, &rused);
+ intel_register_access_fini(&mmio_data);
switch ((flags >> 8) & 0xf) {
default: