[igt-dev] [PATCH] [PATCH i-g-t][V6]tests/i915/gem_sync.c :Added __for_each_physical_engine to utilize all available
Melkaveri, Arjun
arjun.melkaveri at intel.com
Tue Apr 14 16:49:11 UTC 2020
Thanks
Arjun M
-----Original Message-----
From: Chris Wilson <chris at chris-wilson.co.uk>
Sent: Tuesday, April 14, 2020 10:16 PM
To: Melkaveri, Arjun <arjun.melkaveri at intel.com>; igt-dev at lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH] [PATCH i-g-t][V6]tests/i915/gem_sync.c :Added __for_each_physical_engine to utilize all available
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.
Will re verify this .
> + 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));
I was correcting this one . apologies
Pardon????
-Chris
More information about the igt-dev
mailing list