[igt-dev] [PATCH v13 6/9] lib/i915: add gem_engine_topology library

Andi Shyti andi.shyti at intel.com
Wed Mar 20 11:35:05 UTC 2019


On Wed, Mar 20, 2019 at 11:18:47AM +0000, Chris Wilson wrote:
> Quoting Andi Shyti (2019-03-20 11:13:16)
> > On Wed, Mar 20, 2019 at 10:59:05AM +0000, Chris Wilson wrote:
> > Another solution would be having the engine_data structure as a
> > global structure that contains all informations and it's
> > allocated outside the for_each. We can have functions inside it
> > like init, get_next, and so on, instead of using it just as a
> > mere leaking iterator.
> 
> You can't use a single global, as I need nested iterators.

Sorry, I didn't mean a single global structure, but a "global" in
the sense used by everyone "data structure". tests would
use/allocate/iterate/create/destroy engine_data instead of
intel_execution_engine2.

Anyway, I'll keep it easy for now :)

Cheers,
Andi

> Don't worry about interrupted loops leaking, it's par for the course for
> igt_assert() as we don't have full setup/cleanup (igt_try {} igt_catch
> {} igt_finally {} anyone?).
> -Chris


More information about the igt-dev mailing list