From: Andi Shyti <andi.shyti@intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: IGT dev <igt-dev@lists.freedesktop.org>, Andi Shyti <andi@etezian.org>
Subject: Re: [igt-dev] [PATCH v11 2/6] lib/i915: add gem_engine_topology library
Date: Wed, 13 Mar 2019 10:44:25 +0200 [thread overview]
Message-ID: <20190313084425.GA2517@intel.intel> (raw)
In-Reply-To: <4a0d1683-8543-78d5-d3a5-3e923d4709a8@linux.intel.com>
Hi Tvrtko,
> > +static void set_ctx_param_engines(int fd, uint32_t ctx_id)
> > +{
> > + struct i915_context_param_engines *ctx_engine;
> > + struct drm_i915_gem_context_param ctx_param;
> > + const struct intel_execution_engine2 *e2;
> > + uint8_t buff[SIZEOF_CTX_PARAM] = { };
> > + int i;
> > +
> > + if (ctx_is_set)
> > + return;
>
> A global ctx_is_set bool doesn't work with passed in ctx_id I think!?
>
> But more importantly.. could you try and make the iterator work of the local
> ctx.get_engines() query? Only configuring the ctx map to include all engines
> if not already set.
>
> Chris had a suggestion in the previous posting to use an iterator struct
> which I think has merit since it hides the explicit index var/param.
> (155179296327.27405.14019468668411244512@skylake-alporthouse-com)
>
> And then I'd drop the for_each_engine2 and just convert
> for_each_engine_class_instance straight away. Only one test uses it so
> shouldn't be too hard (perf_pmu).
>
> This will I think require adding the gem_set_eb_engine helper and possibly
> adding some helpers to allow usage with spin batches.
>
> We want to get a better view of usability in future IGT code and I think the
> series needs to be complete in this respect.
Yes, I understand the advantage of Chris proposal and the
ugliness of a globa ctx_is_set, but I thought we were going
throught this path in a second phase, given that for now "future
proof" (at least for me) is something with a different dimension
(I also wanted to keep the changes as smaller as possible, but it
turned out to be the wrong time to do so :) ).
Anyway, since you are pushing for this, I take this path.
Because I am now going to drastically change the logic, I would
also remove the 'init_engine_list()' and query the engine at any
'intel_engine_iter()' call with the double query (one for size
and one for the query itself).
... and it would be a completely different patchset :)
Andi
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-03-13 8:44 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-12 17:17 [igt-dev] [PATCH v11 0/6] new engine discovery interface Andi Shyti
2019-03-12 17:17 ` [igt-dev] [PATCH v11 1/6] include/drm-uapi: import i915_drm.h header file Andi Shyti
2019-03-12 17:17 ` [igt-dev] [PATCH v11 2/6] lib/i915: add gem_engine_topology library Andi Shyti
2019-03-13 7:41 ` Tvrtko Ursulin
2019-03-13 8:44 ` Andi Shyti [this message]
2019-03-12 17:17 ` [igt-dev] [PATCH v11 3/6] lib/igt_gt: use for_each_engine2 to loop through engines Andi Shyti
2019-03-12 17:17 ` [igt-dev] [PATCH v11 4/6] lib: ioctl_wrappers: reach engines by index as well Andi Shyti
2019-03-12 17:17 ` [igt-dev] [PATCH v11 5/6] lib: move gem_context_has_engine from ioctl_wrappers to gem_context Andi Shyti
2019-03-12 17:17 ` [igt-dev] [PATCH v11 6/6] tests: gem_exec_basic: add "exec-ctx" buffer execution demo test Andi Shyti
2019-03-13 12:53 ` [igt-dev] ✓ Fi.CI.BAT: success for new engine discovery interface Patchwork
2019-03-13 16:03 ` [igt-dev] ✓ Fi.CI.IGT: " 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=20190313084425.GA2517@intel.intel \
--to=andi.shyti@intel.com \
--cc=andi@etezian.org \
--cc=igt-dev@lists.freedesktop.org \
--cc=tvrtko.ursulin@linux.intel.com \
/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