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

Andi Shyti andi.shyti at intel.com
Wed Feb 13 01:11:03 UTC 2019


Hi Chris,

> > -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!

Yes, that's quite a controversy: the concept of 'ring' is swapped
depending on whether you call 'gem_has_ring' or
'gem_has_ring_by_idx' and I bet there is no naming choice that
would please both callers. Unless I use neutral names, like 'a'
and 'b', or 'x' and 'y'.

That's why originally I called it 'flags' and 'rsvd1' as they are
called in the 'drm_i915_gem_execbuffer2' structure, in order to
minimize confusion.

Andi


More information about the igt-dev mailing list