From: Chris Wilson <chris@chris-wilson.co.uk>
To: Antonio Argenziano <antonio.argenziano@intel.com>,
intel-gfx@lists.freedesktop.org
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [Intel-gfx] [igt-dev] [PATCH i-g-t 2/4] i915/gem_ctx_engine: Exercise for_each_context_engine() with custom engine[]
Date: Fri, 14 Feb 2020 21:57:24 +0000 [thread overview]
Message-ID: <158171744428.15393.6774321422582015904@skylake-alporthouse-com> (raw)
In-Reply-To: <224cefba-4b48-c085-b0b5-952b62af29b3@intel.com>
Quoting Antonio Argenziano (2020-02-14 21:49:16)
>
>
> On 14/02/20 11:40, Chris Wilson wrote:
> > Set up a custom engine map with no engines, and check that the
> > for_each_context_engine() correctly iterates over nothing.
> >
> > Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> > ---
> > tests/i915/gem_ctx_engines.c | 28 ++++++++++++++++++++++++++++
> > 1 file changed, 28 insertions(+)
> >
> > diff --git a/tests/i915/gem_ctx_engines.c b/tests/i915/gem_ctx_engines.c
> > index 063140e0f..6a2edd1e0 100644
> > --- a/tests/i915/gem_ctx_engines.c
> > +++ b/tests/i915/gem_ctx_engines.c
> > @@ -549,6 +549,31 @@ static void independent(int i915)
> > gem_context_destroy(i915, param.ctx_id);
> > }
> >
> > +static void libapi(int i915)
> > +{
> > + struct i915_context_param_engines engines = {};
>
> Is there a case for invalid engines as well?
One would have to think what the behaviour should be :)
for_each_context_engine() should iterate over every engine defined,
providing you with (e->class, e->instance, e->pretty_name).
Invalid will still have an entry, maybe with "unknown".
for_each_physical_engine would skip invalid entries that are rejected by
the kernel. It's really just
for_each_context_engine()
for_each_if(gem_has_ring())
and I think I should drop the second loop here and focus on testing that
for_each_context_engine() simply reports back the class:inst we put
into the context.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2020-02-14 21:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-14 19:40 [Intel-gfx] [PATCH i-g-t 1/4] i915/gem_ctx_engines: Exercise 0 engines[] Chris Wilson
2020-02-14 19:40 ` [Intel-gfx] [PATCH i-g-t 2/4] i915/gem_ctx_engine: Exercise for_each_context_engine() with custom engine[] Chris Wilson
2020-02-14 21:49 ` [Intel-gfx] [igt-dev] " Antonio Argenziano
2020-02-14 21:57 ` Chris Wilson [this message]
2020-02-14 19:40 ` [Intel-gfx] [PATCH i-g-t 3/4] lib/i915: Don't confuse param.size Chris Wilson
2020-02-14 23:16 ` [Intel-gfx] [igt-dev] " Stimson, Dale B
2020-02-14 19:40 ` [Intel-gfx] [PATCH i-g-t 4/4] lib/i915/gem_engine_topology.c - intel_get_current_engine invalid result Chris Wilson
2020-02-14 21:22 ` [Intel-gfx] [igt-dev] [PATCH i-g-t 1/4] i915/gem_ctx_engines: Exercise 0 engines[] Antonio Argenziano
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=158171744428.15393.6774321422582015904@skylake-alporthouse-com \
--to=chris@chris-wilson.co.uk \
--cc=antonio.argenziano@intel.com \
--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;
as well as URLs for NNTP newsgroup(s).