[igt-dev] [PATCH v14 2/5] lib: ioctl_wrappers: reach engines by index as well

Chris Wilson chris at chris-wilson.co.uk
Thu Mar 21 01:05:49 UTC 2019


Quoting Andi Shyti (2019-03-21 01:00:12)
> 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 at intel.com>
> Reviewed-by: Chris Wilson <chris at chris-wilson.co.uk>
> ---
>  lib/i915/gem_context.c | 21 +++++++++++++++++++++
>  lib/i915/gem_context.h |  2 ++
>  lib/ioctl_wrappers.c   | 19 -------------------
>  lib/ioctl_wrappers.h   |  3 ++-
>  4 files changed, 25 insertions(+), 20 deletions(-)
> 
> diff --git a/lib/i915/gem_context.c b/lib/i915/gem_context.c
> index 16004685e920..5e2e31e91384 100644
> --- a/lib/i915/gem_context.c
> +++ b/lib/i915/gem_context.c
> @@ -275,3 +275,24 @@ void gem_context_set_priority(int fd, uint32_t ctx_id, int prio)
>  {
>         igt_assert(__gem_context_set_priority(fd, ctx_id, prio) == 0);
>  }
> +
> +bool gem_context_has_engine(int fd, unsigned engine, unsigned ctx)

It's still BACKWARDS!!!!
-Chris


More information about the igt-dev mailing list