[igt-dev] [PATCH] [PATCH i-g-t][V6]tests/i915/gem_sync.c :Added __for_each_physical_engine to utilize all available
Chris Wilson
chris at chris-wilson.co.uk
Tue Apr 14 16:46:23 UTC 2020
Quoting Arjun Melkaveri (2020-04-14 17:40:16)
> static void
> sync_ring(int fd, unsigned ring, int num_children, int timeout)
> {
> + const struct intel_execution_engine2 *e2;
> unsigned engines[16];
> const char *names[16];
> int num_engines = 0;
>
> if (ring == ALL_ENGINES) {
> - for_each_physical_engine(e, fd) {
> - names[num_engines] = e->name;
> - engines[num_engines++] = eb_ring(e);
> + __for_each_physical_engine(fd, e2) {
> + names[num_engines] = e2->name;
This doesn't work. e2->name is on the stack and so goes out of scope
after the loop.
> + engines[num_engines++] = e2->flags;
> if (num_engines == ARRAY_SIZE(engines))
> break;
> }
>
> num_children *= num_engines;
> } else {
> - gem_require_ring(fd, ring);
> + igt_require(gem_can_store_dword(fd, ring));
Pardon????
-Chris
More information about the igt-dev
mailing list