[igt-dev] [PATCH v20 2/6] lib/i915: add gem_engine_topology library and for_each loop definition

Chris Wilson chris at chris-wilson.co.uk
Fri Apr 12 16:31:57 UTC 2019


Quoting Andi Shyti (2019-04-12 16:32:52)
> > > +int64_t gem_map_all_engines(int fd)
> > 
> > int64_t?
> 
> yeah... should be uint32_t, I forgot gem_context_create had some
> igt_requires, I thought 32 bit for ctx_id and the rest for
> -errno.
> 
> I don't even need 'gem_require_contexts()', because it
> basically does the same thing of 'gem_context_create()'
> 
> > There's no indication this creates a context.
> > 
> > int gem_context_map_all_engines(int i915, uint32_t ctx)
> 
> I wanted the caller not to care about the context.

I have reservations that hiding the context is not the best plan. After
all, the caller does have to use the context later on.

My gut feeling is that it would be better to pass the context in, but
the benefit of doubt says you must have found this useful :)

> I can probably
> call it 'gem_create_populated_context()'?

Such is the debate of the ages.
-Chris


More information about the igt-dev mailing list