public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH igt] igt/perf_pmu: Semaphores do not exists before gen6
Date: Mon, 12 Feb 2018 09:50:44 +0000	[thread overview]
Message-ID: <168e61d8-40d8-7a67-bb8d-e12c8272fd8c@linux.intel.com> (raw)
In-Reply-To: <20180209143959.16606-1-chris@chris-wilson.co.uk>


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

      reply	other threads:[~2018-02-12  9:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=168e61d8-40d8-7a67-bb8d-e12c8272fd8c@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox