[igt-dev] [PATCH i-g-t 06/21] gem_wsim: Use IGT uapi headers

Tvrtko Ursulin
2019-05-08T12:10:43Z

From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>

We are moving towards bumping the uAPI headers more often instead of using
too much local struct/ioctl/param definitions since the latter are more
challenging for rebase and maintenance.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
---
benchmarks/gem_wsim.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index 1084e95fa8df..609e64f3d9c8 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -41,7 +41,6 @@
#include <limits.h>
#include <pthread.h>

-
#include "intel_chipset.h"
#include "intel_reg.h"
#include "drm.h"
@@ -57,9 +56,6 @@

#include "ewma.h"

-#define LOCAL_I915_EXEC_FENCE_IN (1<<16)
-#define LOCAL_I915_EXEC_FENCE_OUT (1<<17)
-
enum intel_engine_id {
RCS,
BCS,
@@ -864,7 +860,7 @@ eb_update_flags(struct w_step *w, enum intel_engine_id engine,

igt_assert(w->emit_fence <= 0);
if (w->emit_fence)
- w->eb.flags |= LOCAL_I915_EXEC_FENCE_OUT;
+ w->eb.flags |= I915_EXEC_FENCE_OUT;
}

static struct drm_i915_gem_exec_object2 *
@@ -1993,16 +1989,16 @@ do_eb(struct workload *wrk, struct w_step *w, enum intel_engine_id engine,
igt_assert(tgt >= 0 && tgt < w->idx);
igt_assert(wrk->steps[tgt].emit_fence > 0);

- w->eb.flags |= LOCAL_I915_EXEC_FENCE_IN;
+ w->eb.flags |= I915_EXEC_FENCE_IN;
w->eb.rsvd2 = wrk->steps[tgt].emit_fence;
}

- if (w->eb.flags & LOCAL_I915_EXEC_FENCE_OUT)
+ if (w->eb.flags & I915_EXEC_FENCE_OUT)
gem_execbuf_wr(fd, &w->eb);
else
gem_execbuf(fd, &w->eb);

- if (w->eb.flags & LOCAL_I915_EXEC_FENCE_OUT) {
+ if (w->eb.flags & I915_EXEC_FENCE_OUT) {
w->emit_fence = w->eb.rsvd2 >> 32;
igt_assert(w->emit_fence > 0);
}
--
2.19.1