Quoting Chris Wilson (2019-07-31 09:05:25) > + /* First up, check the legacy engine selector ABI for independence */ > + igt_subtest_group { > + struct intel_execution_engine2 engines[64]; > + unsigned int num_engines = 0; > + > + igt_fixture { > + const struct intel_execution_engine *e; > + > + for (e = intel_execution_engines; e->name; e++) { > + if (!gem_ring_has_physical_engine(fd, e->exec_id | e->flags)) > + continue; > + > + /* Must be unique, no unknowable BSD aliases! */ > + engines[num_engines] = > + gem_eb_flags_to_engine(e->exec_id | e->flags); > + if (engines[num_engines].flags != -1) > + continue; > + > + if (!gem_can_store_dword(fd, engines[num_engines].flags)) > + continue; > + > + num_engines++; > + if (num_engines == ARRAY_SIZE(engines)) > + break; > + } > + } I also expect this to be repeated enough to merit something like num_engines = gem_engines_get_legacy(fd, engines, ARRAY_SIZE(engines), LEGACY_PHYSICAL | LEGACY_CAN_STORE_DWORD); -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx