diff options
| -rw-r--r-- | lib/i915/gem_ring.c | 20 | ||||
| -rw-r--r-- | tests/gem_exec_fence.c | 4 | ||||
| -rw-r--r-- | tests/gem_exec_schedule.c | 4 |
3 files changed, 21 insertions, 7 deletions
diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c index 7326673a..df92e620 100644 --- a/lib/i915/gem_ring.c +++ b/lib/i915/gem_ring.c @@ -31,6 +31,18 @@ #include "ioctl_wrappers.h" #include "igt_dummyload.h" +static int __execbuf(int fd, struct drm_i915_gem_execbuffer2 *execbuf) +{ + int err; + + err = 0; + if (ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, execbuf)) + err = -errno; + + errno = 0; + return err; +} + static void alarm_handler(int sig) { } @@ -81,15 +93,15 @@ gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags f sigaction(SIGALRM, &sa, &old_sa); itv.it_interval.tv_sec = 0; - itv.it_interval.tv_usec = 100; + itv.it_interval.tv_usec = 1000; itv.it_value.tv_sec = 0; - itv.it_value.tv_usec = 1000; + itv.it_value.tv_usec = 10000; setitimer(ITIMER_REAL, &itv, NULL); last = -1; count = 0; do { - if (ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf) == 0) { + if (__execbuf(fd, &execbuf) == 0) { count++; continue; } @@ -100,6 +112,8 @@ gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags f last = count; } while (1); + igt_assert_eq(__execbuf(fd, &execbuf), -EINTR); + memset(&itv, 0, sizeof(itv)); setitimer(ITIMER_REAL, &itv, NULL); sigaction(SIGALRM, &old_sa, NULL); diff --git a/tests/gem_exec_fence.c b/tests/gem_exec_fence.c index 93ed3b9b..26bde788 100644 --- a/tests/gem_exec_fence.c +++ b/tests/gem_exec_fence.c @@ -551,9 +551,9 @@ static void test_keep_in_fence(int fd, unsigned int engine, unsigned int flags) sigaction(SIGALRM, &sa, NULL); itv.it_interval.tv_sec = 0; - itv.it_interval.tv_usec = 100; + itv.it_interval.tv_usec = 1000; itv.it_value.tv_sec = 0; - itv.it_value.tv_usec = 1000; + itv.it_value.tv_usec = 10000; setitimer(ITIMER_REAL, &itv, NULL); execbuf.flags |= LOCAL_EXEC_FENCE_IN; diff --git a/tests/gem_exec_schedule.c b/tests/gem_exec_schedule.c index 8a69ab5c..89cf4285 100644 --- a/tests/gem_exec_schedule.c +++ b/tests/gem_exec_schedule.c @@ -833,9 +833,9 @@ static void test_pi_ringfull(int fd, unsigned int engine) sigaction(SIGALRM, &sa, NULL); itv.it_interval.tv_sec = 0; - itv.it_interval.tv_usec = 100; + itv.it_interval.tv_usec = 1000; itv.it_value.tv_sec = 0; - itv.it_value.tv_usec = 1000; + itv.it_value.tv_usec = 10000; setitimer(ITIMER_REAL, &itv, NULL); last = -1; |
