From e3b68bb66683ad4cb4c80df904a3a21c98a2b6c2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 23 Jan 2016 09:44:19 +0000 Subject: lib: Share common __gem_execbuf() An oft-repeated function to check EXECBUFFER2 for a particular fail condition. Signed-off-by: Chris Wilson --- benchmarks/gem_exec_ctx.c | 8 -------- 1 file changed, 8 deletions(-) (limited to 'benchmarks/gem_exec_ctx.c') diff --git a/benchmarks/gem_exec_ctx.c b/benchmarks/gem_exec_ctx.c index d84ca3b5..b859018e 100644 --- a/benchmarks/gem_exec_ctx.c +++ b/benchmarks/gem_exec_ctx.c @@ -56,14 +56,6 @@ static double elapsed(const struct timespec *start, return (end->tv_sec - start->tv_sec) + 1e-9*(end->tv_nsec - start->tv_nsec); } -static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) -{ - int err = 0; - if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) - err = -errno; - return err; -} - static uint32_t batch(int fd) { const uint32_t buf[] = {MI_BATCH_BUFFER_END}; -- cgit v1.2.3