summaryrefslogtreecommitdiff
path: root/lib/ioctl_wrappers.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2015-12-11 21:24:21 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2016-01-20 13:13:57 +0000
commita2eb63720b939d58a39cc7e5ef5ad2204fec260a (patch)
treeb35229ad70386e4215b98beda086fe6fe78c2838 /lib/ioctl_wrappers.c
parent47b61378426002c0f71644c65c73477265a5751d (diff)
lib: Always double check igt_require_hang_ring() on use
If we move the igt_require() into the hang injector, this makes simple test cases even more convenient. More complex test cases can always do their own precursory check before settting up the test. However, this does embed the assumption that the first context we are called from is safe (i.e no i915.enable_hangcheck/i915.reset interferrence). v2: A couple of environment variables to skip hang testing or to force hang injection even if the GPU cannot be reset. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/ioctl_wrappers.c')
-rw-r--r--lib/ioctl_wrappers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ioctl_wrappers.c b/lib/ioctl_wrappers.c
index e348f265..22c694b4 100644
--- a/lib/ioctl_wrappers.c
+++ b/lib/ioctl_wrappers.c
@@ -1241,6 +1241,7 @@ void gem_require_caching(int fd)
void gem_require_ring(int fd, int ring_id)
{
switch (ring_id) {
+ case I915_EXEC_DEFAULT:
case I915_EXEC_RENDER:
return;
case I915_EXEC_BLT:
@@ -1255,6 +1256,7 @@ void gem_require_ring(int fd, int ring_id)
return;
#endif
default:
+ igt_warn("Invalid ring: %d\n", ring_id);
igt_assert(0);
return;
}