diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-29 14:24:26 +0200 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-29 15:33:07 +0200 |
commit | 5da8b8db02df768ba560e7522f69106246a0590c (patch) | |
tree | b4001fa494f3727046d6e25d4a0c0ff93d455cc2 /tests | |
parent | f33fa71481caa308f141797033cd2bc6479630fc (diff) |
tests/gem_wait_render_timeout: Drop local structs
We're long past the point where libdrm has these.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gem_wait_render_timeout.c | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c index e05b7ae2..86640faf 100644 --- a/tests/gem_wait_render_timeout.c +++ b/tests/gem_wait_render_timeout.c @@ -69,21 +69,10 @@ do_time_diff(struct timespec *end, struct timespec *start) return ret; } -/* to avoid stupid depencies on libdrm, copy&paste */ -struct local_drm_i915_gem_wait { - /** Handle of BO we shall wait on */ - __u32 bo_handle; - __u32 flags; - /** Number of nanoseconds to wait, Returns time remaining. */ - __u64 timeout_ns; -}; - -# define WAIT_IOCTL DRM_IOWR(DRM_COMMAND_BASE + 0x2c, struct local_drm_i915_gem_wait) - static int gem_bo_wait_timeout(int fd, uint32_t handle, uint64_t *timeout_ns) { - struct local_drm_i915_gem_wait wait; + struct drm_i915_gem_wait wait; int ret; igt_assert(timeout_ns); @@ -91,7 +80,7 @@ gem_bo_wait_timeout(int fd, uint32_t handle, uint64_t *timeout_ns) wait.bo_handle = handle; wait.timeout_ns = *timeout_ns; wait.flags = 0; - ret = drmIoctl(fd, WAIT_IOCTL, &wait); + ret = drmIoctl(fd, DRM_IOCTL_I915_GEM_WAIT, &wait); *timeout_ns = wait.timeout_ns; return ret ? -errno : 0; |