[igt-dev] [RFC v2 40/43] tests/amdgpu/amd_prime: use the gem_engine_topology library
Ramalingam C
ramalingam.c at intel.com
Fri Jun 21 10:03:42 UTC 2019
Replace the legacy for_each_engine* defines with the ones
implemented in the gem_engine_topology library.
Signed-off-by: Ramalingam C <ramalingam.c at intel.com>
---
tests/amdgpu/amd_prime.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/tests/amdgpu/amd_prime.c b/tests/amdgpu/amd_prime.c
index dc71ac70c9fc..cd2367ffd53e 100644
--- a/tests/amdgpu/amd_prime.c
+++ b/tests/amdgpu/amd_prime.c
@@ -173,14 +173,15 @@ static void i915_to_amd(int i915, int amd, amdgpu_device_handle device)
const uint32_t bbe = MI_BATCH_BUFFER_END;
struct drm_i915_gem_exec_object2 obj[2];
struct drm_i915_gem_execbuffer2 execbuf;
- unsigned int engines[16], engine;
+ unsigned int engines[16];
+ const struct intel_execution_engine2 *engine;
unsigned int nengine;
unsigned long count;
struct cork c;
nengine = 0;
- for_each_physical_engine(i915, engine)
- engines[nengine++] = engine;
+ __for_each_physical_engine(i915, engine)
+ engines[nengine++] = engine->flags;
igt_require(nengine);
memset(obj, 0, sizeof(obj));
--
2.19.1
More information about the igt-dev
mailing list