* [PATCH igt] igt/perf_pmu: Semaphores do not exists before gen6
@ 2018-02-09 14:39 Chris Wilson
2018-02-12 9:50 ` [igt-dev] " Tvrtko Ursulin
0 siblings, 1 reply; 2+ messages in thread
From: Chris Wilson @ 2018-02-09 14:39 UTC (permalink / raw)
To: intel-gfx; +Cc: igt-dev
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>
---
tests/perf_pmu.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
index a27a8a81e..c7f87d52f 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);
--
2.16.1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [igt-dev] [PATCH igt] igt/perf_pmu: Semaphores do not exists before gen6
2018-02-09 14:39 [PATCH igt] igt/perf_pmu: Semaphores do not exists before gen6 Chris Wilson
@ 2018-02-12 9:50 ` Tvrtko Ursulin
0 siblings, 0 replies; 2+ messages in thread
From: Tvrtko Ursulin @ 2018-02-12 9:50 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: igt-dev
On 09/02/2018 14:39, Chris Wilson wrote:
> 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>
> ---
> tests/perf_pmu.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
> index a27a8a81e..c7f87d52f 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);
>
Ooopsie.. :(
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-02-12 9:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-09 14:39 [PATCH igt] igt/perf_pmu: Semaphores do not exists before gen6 Chris Wilson
2018-02-12 9:50 ` [igt-dev] " Tvrtko Ursulin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox