lib: Share common __gem_execbuf()

An oft-repeated function to check EXECBUFFER2 for a particular fail
condition.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson
2016-01-23 09:44:19 +00:00
parent 711398e82a
commit e3b68bb666
17 changed files with 26 additions and 133 deletions
-9
View File
@@ -49,15 +49,6 @@
#define LOCAL_I915_EXEC_NO_RELOC (1<<11)
#define LOCAL_I915_EXEC_HANDLE_LUT (1<<12)
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 double elapsed(const struct timespec *start,
const struct timespec *end)
{