diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-22 15:24:54 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2017-02-22 15:28:33 +0000 |
commit | 9518cb59abe35143f15abac2b7ffdb99820ef53c (patch) | |
tree | 6840ce3c318a831bedecb33cae004fcdf5d3f40f /lib/ioctl_wrappers.c | |
parent | af0e1c583e4235028a750551b4637c79ff482b30 (diff) |
igt: Start marking up GEM tests that require an alive GPU to function
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r-- | lib/ioctl_wrappers.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c index cd0c24ba..2d1be49b 100644 --- a/lib/ioctl_wrappers.c +++ b/lib/ioctl_wrappers.c @@ -1480,6 +1480,17 @@ void gem_require_caching(int fd) errno = 0; } +void igt_require_gem(int fd) +{ + int err; + + err = 0; + if (ioctl(fd, DRM_IOCTL_I915_GEM_THROTTLE)) + err = -errno; + + igt_require_f(err == 0, "Unresponsive i915/GEM device\n"); +} + bool gem_has_ring(int fd, unsigned ring) { struct drm_i915_gem_execbuffer2 execbuf; |