public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Chris Wilson <chris@chris-wilson.co.uk>, igt-dev@lists.freedesktop.org
Cc: Intel-gfx@lists.freedesktop.org
Subject: Re: [igt-dev] [Intel-gfx] [PATCH i-g-t 2/2] tests/i915_query: Engine discovery tests
Date: Wed, 1 May 2019 16:56:20 +0100	[thread overview]
Message-ID: <88974c5a-3fbe-f51b-ffc6-7ac83b795046@linux.intel.com> (raw)
In-Reply-To: <155671156003.1850.8570225810057290177@skylake-alporthouse-com>


On 01/05/2019 12:52, Chris Wilson wrote:
> Quoting Tvrtko Ursulin (2019-05-01 12:42:59)
>> +               switch (engine->engine.engine_class) {
>> +               case I915_ENGINE_CLASS_RENDER:
>> +                       /* Will be tested later. */
>> +                       break;
>> +               case I915_ENGINE_CLASS_COPY:
>> +                       igt_assert(gem_has_blt(fd));
>> +                       break;
>> +               case I915_ENGINE_CLASS_VIDEO:
>> +                       switch (engine->engine.engine_instance) {
>> +                       case 0:
>> +                               igt_assert(gem_has_bsd(fd));
>> +                               break;
>> +                       case 1:
>> +                               igt_assert(gem_has_bsd2(fd));
>> +                               break;
> 
> 
> Is that relationship a given?
> 
> One could argue that gem_has_blt() means that I915_EXEC_BLT works, but
> without !gem_has_blt() we could still access CLASS_COPY:0 via
> ctx->engines[].

"without !gem_has_blt()".. hmmm what do you mean? If you mean 
gem_has_blt() is false but bcs:0 is still accessible via ctx->engines[] 
then how?

>> +                       }
>> +                       break;
>> +               case I915_ENGINE_CLASS_VIDEO_ENHANCE:
>> +                       igt_assert(gem_has_vebox(fd));
>> +                       break;
>> +               default:
>> +                       igt_assert(0);
>> +               }
>> +       }
>> +
>> +       /* Reverse check to the above - all GET_PARAM engines are present. */
>> +       igt_assert(has_engine(engines, I915_ENGINE_CLASS_RENDER, 0));
>> +       if (gem_has_blt(fd))
>> +               igt_assert(has_engine(engines, I915_ENGINE_CLASS_COPY, 0));
>> +       if (gem_has_bsd(fd))
>> +               igt_assert(has_engine(engines, I915_ENGINE_CLASS_VIDEO, 0));
>> +       if (gem_has_bsd2(fd))
>> +               igt_assert(has_engine(engines, I915_ENGINE_CLASS_VIDEO, 1));
>> +       if (gem_has_vebox(fd))
>> +               igt_assert(has_engine(engines, I915_ENGINE_CLASS_VIDEO_ENHANCE,
>> +                                      0));
> 
> Whereas this should always make sense, given the legacy interface and
> the modern interface, the modern interface should be a superset of the
> legacy.
> 
> Just thinking aloud.

Sure, no harm in looking at it again. The test was written long time ago.

Regards,

Tvrtko
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2019-05-01 15:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-01 11:42 [igt-dev] [PATCH i-g-t 0/2] Engine discovery tests Tvrtko Ursulin
2019-05-01 11:42 ` [igt-dev] [PATCH i-g-t 1/2] headers: bump Tvrtko Ursulin
2019-05-01 11:42 ` [igt-dev] [PATCH i-g-t 2/2] tests/i915_query: Engine discovery tests Tvrtko Ursulin
2019-05-01 11:52   ` [igt-dev] [Intel-gfx] " Chris Wilson
2019-05-01 15:56     ` Tvrtko Ursulin [this message]
2019-05-01 12:02 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-05-02  2:51 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=88974c5a-3fbe-f51b-ffc6-7ac83b795046@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=chris@chris-wilson.co.uk \
    --cc=igt-dev@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