[igt-dev] [PATCH v12 6/7] lib/igt_gt: use for_each_engine_class_instance to loop through active engines

Andi Shyti andi.shyti at intel.com
Tue Mar 19 10:26:28 UTC 2019


Hi Tvrtko,

> > -	for_each_engine_class_instance(gem_fd, e_) {
> > +	for_each_engine_class_instance(gem_fd, 0, e_) {
> 
> How much churn it would be to drop for_each_engine_class_instance and
> convert the for_each_engine_physical macro to use the new scheme?
> 
> I am thinking about ending with two macros:
> 
> for_each_engine_physical(fd, e) // or not e, if it is in the iterator?
> 
> for_each_engine_context(fd, ctx, e) // when tests are using contexts
> 
> The former would just be:
> 
> #define for_each_engine_physical(fd) for_each_engine_context(fd, 0)
> 
> Chris your opinion?

We've been discussing this, this is what I suggested offline :)

Maybe I wasn't clear then :)

But yes, I definitely agree.

Andi


More information about the igt-dev mailing list