From: Andi Shyti <andi@etezian.org>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: IGT dev <igt-dev@lists.freedesktop.org>, Andi Shyti <andi@etezian.org>
Subject: Re: [igt-dev] [PATCH v17 2/7] lib: ioctl_wrappers: reach engines by index as well
Date: Fri, 5 Apr 2019 11:35:20 +0300 [thread overview]
Message-ID: <20190405083520.GD18786@jack.zhora.eu> (raw)
In-Reply-To: <155445117093.8259.8706988676557218468@skylake-alporthouse-com>
On Fri, Apr 05, 2019 at 08:59:30AM +0100, Chris Wilson wrote:
> Quoting Andi Shyti (2019-04-05 02:07:32)
> > From: Andi Shyti <andi.shyti@intel.com>
> >
> > With the new engine query method engines are reachable through
> > an index and context they are combined with.
> >
> > The 'gem_has_ring()' becomes 'gem_context_has_engine()' that
> > requires the index that the engine is mapped within the driver.
> > The function has been moved from lib/ioctl_wappers to
> > lib/i915/gem_context where it is more appropriate.
> >
> > The previous 'gem_has_ring()' function becomes a wrapper to the
> > new 'gem_context_has_engine()'.
> >
> > Signed-off-by: Andi Shyti <andi.shyti@intel.com>
> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
> > Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> > ---
> > lib/i915/gem_context.c | 27 +++++++++++++++++++++++++++
> > lib/i915/gem_context.h | 2 ++
> > lib/ioctl_wrappers.c | 19 -------------------
> > lib/ioctl_wrappers.h | 3 ++-
> > 4 files changed, 31 insertions(+), 20 deletions(-)
> >
> > diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
> > index 8b4d5b704650..488f4971c448 100644
> > --- a/lib/i915/gem_context.c
> > +++ b/lib/i915/gem_context.c
> > @@ -271,3 +271,30 @@ void gem_context_set_priority(int fd, uint32_t ctx_id, int prio)
> > {
> > igt_assert_eq(__gem_context_set_priority(fd, ctx_id, prio), 0);
> > }
> > +
> > +bool gem_context_has_engine(int fd, uint64_t ctx, uint64_t engine)
>
> Despite appearances, ctx is only a u32. And rsvd1 has the upper 32bits
> still unassigned. Left engine as uint64_t, feels overkill but flags is a
> full 64b and there may be good reason to stuff extra flags through this
> interface (though that may be rightfully considered abuse).
Thanks, Chris!
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-04-05 8:35 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-05 1:07 [igt-dev] [PATCH v17 0/7] new engine discovery interface Andi Shyti
2019-04-05 1:07 ` [igt-dev] [PATCH v17 1/7] lib/igt_gt: remove unnecessary argument Andi Shyti
2019-04-05 14:43 ` Caz Yokoyama
2019-04-05 1:07 ` [igt-dev] [PATCH v17 2/7] lib: ioctl_wrappers: reach engines by index as well Andi Shyti
2019-04-05 7:59 ` Chris Wilson
2019-04-05 8:35 ` Andi Shyti [this message]
2019-04-05 1:07 ` [igt-dev] [PATCH v17 3/7] include/drm-uapi: import i915_drm.h header file Andi Shyti
2019-04-05 1:07 ` [igt-dev] [PATCH v17 4/7] lib/i915: add gem_engine_topology library and for_each loop definition Andi Shyti
2019-04-05 8:42 ` Tvrtko Ursulin
2019-04-05 9:00 ` Andi Shyti
2019-04-05 9:16 ` Tvrtko Ursulin
2019-04-05 1:07 ` [igt-dev] [PATCH v17 5/7] lib: igt_gt: add eb flags to class helper Andi Shyti
2019-04-05 1:07 ` [igt-dev] [PATCH v17 6/7] lib: igt_gt: make gem_engine_can_store_dword() check engine class Andi Shyti
2019-04-05 1:07 ` [igt-dev] [PATCH v17 7/7] test: perf_pmu: use the gem_engine_topology library Andi Shyti
2019-04-05 8:50 ` Tvrtko Ursulin
2019-04-05 9:09 ` Andi Shyti
2019-04-05 9:22 ` Tvrtko Ursulin
2019-04-05 2:06 ` [igt-dev] ✗ Fi.CI.BAT: failure for series starting with [v17,1/7] lib/igt_gt: remove unnecessary argument 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=20190405083520.GD18786@jack.zhora.eu \
--to=andi@etezian.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.