[igt-dev] [RFC v2 40/43] tests/amdgpu/amd_prime: use the gem_engine_topology library

Ramalingam C
2019-06-21T10:02:14Z

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));