From: Daniel Vetter Subject: [PATCH 1/3] tests/gem_wait_render_timeout: Drop local structs Date: Mon, 29 Sep 2014 14:54:24 +0200 Message-ID: <1411995266-6284-1-git-send-email-daniel.vetter@ffwll.ch> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-wg0-f47.google.com (mail-wg0-f47.google.com [74.125.82.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A3136E279 for ; Mon, 29 Sep 2014 07:22:24 -0700 (PDT) Received: by mail-wg0-f47.google.com with SMTP id b13so1853989wgh.18 for ; Mon, 29 Sep 2014 07:22:23 -0700 (PDT) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Intel Graphics Development Cc: Daniel Vetter , Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org We're long past the point where libdrm has these. Signed-off-by: Daniel Vetter --- tests/gem_wait_render_timeout.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/tests/gem_wait_render_timeout.c b/tests/gem_wait_render_timeout.c index e05b7ae203a5..86640faf442a 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; -- 1.9.3