mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2026-08-22 05:43:02 +00:00
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:
@@ -141,14 +141,6 @@ static void fill_reloc(struct drm_i915_gem_relocation_entry *reloc, uint32_t han
|
||||
reloc->write_domain = 0;
|
||||
}
|
||||
|
||||
static int __gem_execbuf(int fd, struct drm_i915_gem_execbuffer2 *eb)
|
||||
{
|
||||
int err = 0;
|
||||
if (drmIoctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, eb))
|
||||
err = errno;
|
||||
return err;
|
||||
}
|
||||
|
||||
#define BUSY_LOAD (1 << 0)
|
||||
#define INTERRUPTIBLE (1 << 1)
|
||||
|
||||
@@ -200,8 +192,8 @@ static void run_test(int fd, int num_fences, int expected_errno,
|
||||
if (flags & BUSY_LOAD)
|
||||
emit_dummy_load();
|
||||
|
||||
igt_assert_eq(__gem_execbuf(fd, &execbuf[0]), expected_errno);
|
||||
igt_assert_eq(__gem_execbuf(fd, &execbuf[1]), expected_errno);
|
||||
igt_assert_eq(__gem_execbuf(fd, &execbuf[0]), -expected_errno);
|
||||
igt_assert_eq(__gem_execbuf(fd, &execbuf[1]), -expected_errno);
|
||||
} while (--loop);
|
||||
|
||||
if (flags & INTERRUPTIBLE)
|
||||
|
||||
Reference in New Issue
Block a user