summaryrefslogtreecommitdiff
path: root/tests/syncobj_wait.c
AgeCommit message (Collapse)Author
2018-02-20igt/syncobj: Tidy ye olde compiler warningsChris Wilson
syncobj_basic.c: In function ‘__real_main225’: syncobj_basic.c:202:26: warning: ‘fd’ may be used uninitialized in this function [-Wmaybe-uninitialized] syncobj_basic.c:227:6: note: ‘fd’ was declared here syncobj_wait.c: In function ‘test_wait_complex’: syncobj_wait.c:702:3: warning: ‘first_signaled’ may be used uninitialized in this function [-Wmaybe-uninitialized] syncobj_wait.c: In function ‘__real_main758’: syncobj_wait.c:492:24: warning: ‘timeline’ may be used uninitialized in this function [-Wmaybe-uninitialized] syncobj_wait.c:473:15: note: ‘timeline’ was declared here syncobj_wait.c:326:23: warning: ‘timeline’ may be used uninitialized in this function [-Wmaybe-uninitialized] syncobj_wait.c:320:6: note: ‘timeline’ was declared here syncobj_wait.c:406:31: warning: ‘fd’ may be used uninitialized in this function [-Wmaybe-uninitialized] syncobj_wait.c:760:6: note: ‘fd’ was declared here Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
2017-10-11igt/syncobj_wait: Don't close the timeline early in wait_snapshotJason Ekstrand
Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_snapshot requires the fence to continue to be busy so that the __syncobj_wait() will return with -ETIME. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103188 References: ea4d5a270b57 ("dma-buf/sw_sync: force signal all unsignaled fences on dying timeline") Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Tested-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2017-10-11igt/syncobj_wait: Close the sw_sync timeline after the testChris Wilson
Closing the sw_sync timeline now signals any remaining fences upon it; but test_wait_interrupted requires the fence to be busy for the __syncobj_wait() not to immediately return with -ETIME (and so be interrupted instead). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103187 References: ea4d5a270b57 ("dma-buf/sw_sync: force signal all unsignaled fences on dying timeline") Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Dave Airlie <airlied@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-11igt/syncobj_wait: Replace open-coded calls to __syncobj_wait()Chris Wilson
Remove the bare igt_ioctl(SYNCOBJ_WAIT) in favour of __syncobj_wait() for tidier error reporting. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: Jason Ekstrand <jason@jlekstrand.net> Cc: Dave Airlie <airlied@redhat.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-10syncobj: Add a test for SYNCOBJ_CREATE_SIGNALEDJason Ekstrand
Reviewed-by: Dave Airlie <airlied@redhat.com> Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
2017-10-10tests/syncobj: Add some wait and reset tests (v7)Jason Ekstrand
This adds both trivial error-checking tests as well as more complex tests which actually test whether or not waits do what they're supposed to do. They only currently work on i915 but it should be simple to hook them up for other drivers by simply implementing the little function pointer hook provided at the top for triggering a syncobj. v2: - Actually add the reset tests. v3: - Only do one execbuf for trigger - Use do_ioctl and do_ioctl_err - Better check for syncobj support - Add local_/LOCAL_ defines of things - Use a timer instead of a pthread v4: - Use ioctl wrappers - Use VGEM instead of i915 - Combine a bunch of the simple tests into one function v5: - Combinatorially generate basic tests - Use sw_sync instead of using vgem directly - Add even more tests v6: - Rebase on the new SYNCOBJ_RESET API - Add tests for SYNCOBJ_SIGNAL v7: - Improve the signal and reset bad pad tests Reviewed-by: Dave Airlie <airlied@redhat.com> [airlied: fix build] Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>