diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-09 14:38:51 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-12 10:34:32 +0000 |
commit | 1cbec8b8cfd7550d4b1bdd72529a87faf5f6e736 (patch) | |
tree | 17c97dc0c6e92a65b1c20f083fd9520df384f13f /tests/perf_pmu.c | |
parent | 8b9f68a13442c9307ef602cb9f0282e0c4ec43e2 (diff) |
igt/perf_pmu: Semaphores do not exist before gen6
We don't expect to be able to open the I915_SAMPLE_SEMA on gen5 and
earlier as the HW doesn't support semaphores.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Diffstat (limited to 'tests/perf_pmu.c')
-rw-r--r-- | tests/perf_pmu.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c index a27a8a81..c7f87d52 100644 --- a/tests/perf_pmu.c +++ b/tests/perf_pmu.c @@ -74,13 +74,19 @@ static void init(int gem_fd, const struct intel_execution_engine2 *e, uint8_t sample) { int fd, err = 0; + bool exists; errno = 0; fd = perf_i915_open(__I915_PMU_ENGINE(e->class, e->instance, sample)); if (fd < 0) err = errno; - if (gem_has_engine(gem_fd, e->class, e->instance)) { + exists = gem_has_engine(gem_fd, e->class, e->instance); + if (intel_gen(intel_get_drm_devid(gem_fd)) < 6 && + sample == I915_SAMPLE_SEMA) + exists = false; + + if (exists) { igt_assert_eq(err, 0); igt_assert_fd(fd); close(fd); |