[igt-dev] [RFC PATCH v8 4/5] lib: ioctl_wrappers: reach engines by index as well

Chris Wilson chris at chris-wilson.co.uk
Wed Feb 13 00:19:04 UTC 2019


Quoting Andi Shyti (2019-02-12 23:54:35)
> With the new engine query method engines are reachable through
> an index and context they are combined with.
> 
> The 'gem_has_ring()' becomes 'gem_has_ring_by_idx()' that
> requires the index that the engine is mapped with in the driver.
> 
> The previous function becomes a wrapper to the new
> 'gem_has_ring_by_idx()'.
> 
> Signed-off-by: Andi Shyti <andi.shyti at intel.com>
> ---
>  lib/ioctl_wrappers.c | 10 ++++++----
>  lib/ioctl_wrappers.h |  4 +++-
>  2 files changed, 9 insertions(+), 5 deletions(-)
> 
> diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
> index 404c2fbf9355..2dd860dbd9d6 100644
> --- a/lib/ioctl_wrappers.c
> +++ b/lib/ioctl_wrappers.c
> @@ -1465,14 +1465,14 @@ void igt_require_gem(int fd)
>         igt_require_f(err == 0, "Unresponsive i915/GEM device\n");
>  }
>  
> -bool gem_has_ring(int fd, unsigned ring)
> +bool gem_has_ring_by_idx(int fd, unsigned idx, unsigned rsvd1)

__gem_has_ring(int fd, uint32_t ctx, unsigned int ring)

#define gem_has_ring(fd, ring) __gem_has_ring(fd, 0, ring)

* mutters rsvd1!
-Chris


More information about the igt-dev mailing list