From fe4cdd9e734d348be2d518fd0e663bddb886b7f0 Mon Sep 17 00:00:00 2001 From: Jordan Justen Date: Wed, 21 Feb 2018 14:08:34 -0800 Subject: tools/aubdump: Signal drm sync objects when device override is used This prevents an infinite hang with crucible (vulkan) rendering tests when --device is used. Cc: Jason Ekstrand Signed-off-by: Jordan Justen Reviewed-by: Scott D Phillips Reviewed-by: Jason Ekstrand --- tools/aubdump.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tools') diff --git a/tools/aubdump.c b/tools/aubdump.c index c2950375..5989bed4 100644 --- a/tools/aubdump.c +++ b/tools/aubdump.c @@ -888,6 +888,22 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2) if (files[i] != NULL) fflush(files[i]); } + + if (device_override && + (execbuffer2->flags & I915_EXEC_FENCE_ARRAY) != 0) { + struct drm_i915_gem_exec_fence *fences = + (void*)(uintptr_t)execbuffer2->cliprects_ptr; + for (uint32_t i = 0; i < execbuffer2->num_cliprects; i++) { + if ((fences[i].flags & I915_EXEC_FENCE_SIGNAL) != 0) { + struct drm_syncobj_array arg = { + .handles = (uintptr_t)&fences[i].handle, + .count_handles = 1, + .pad = 0, + }; + libc_ioctl(fd, DRM_IOCTL_SYNCOBJ_SIGNAL, &arg); + } + } + } } static void -- cgit v1.2.3