diff options
author | Antonio Argenziano <antonio.argenziano@intel.com> | 2018-02-22 16:54:38 -0800 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2018-02-23 09:22:06 +0000 |
commit | 1fb30f1131d2a31d0752a73929ca247708d471e4 (patch) | |
tree | 006d6a1786ae718ecbe5f76282296d5510580391 /tests/gem_evict_alignment.c | |
parent | 998e1da7e830bad248497dccf23d7309e63e1207 (diff) |
igt: Use lib gem_execbuf where possible
Replace custom execbuf ioctl wrapper with the ones in lib.
v2:
- Lib execbuf wrapper is not signal handling friendly. (Chris)
v3:
- EXECBUFFER2_WR != EXECBUFFER2. (Chris)
v4: Drop gem_exec_fence.c changes
Signed-off-by: Antonio Argenziano <antonio.argenziano@intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Petri Latvala <petri.latvala@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'tests/gem_evict_alignment.c')
-rw-r--r-- | tests/gem_evict_alignment.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/gem_evict_alignment.c b/tests/gem_evict_alignment.c index 239be728..140d5583 100644 --- a/tests/gem_evict_alignment.c +++ b/tests/gem_evict_alignment.c @@ -61,7 +61,7 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, struct drm_i915_gem_exec_object2 *obj; struct drm_i915_gem_execbuffer2 exec; uint32_t handle; - int n, ret, i=0; + int n, i=0; batch[i++] = (XY_SRC_COPY_BLT_CMD | XY_SRC_COPY_BLT_WRITE_ALPHA | @@ -121,10 +121,7 @@ copy(int fd, uint32_t dst, uint32_t src, uint32_t *all_bo, i915_execbuffer2_set_context_id(exec, 0); exec.rsvd2 = 0; - ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &exec); - if (ret) - ret = errno; - igt_assert_eq(ret, error); + igt_assert_eq(__gem_execbuf(fd, &exec), -error); gem_close(fd, handle); free(obj); |