summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2018-02-21 14:08:34 -0800
committerJordan Justen <jordan.l.justen@intel.com>2018-02-22 11:54:02 -0800
commitfe4cdd9e734d348be2d518fd0e663bddb886b7f0 (patch)
tree860e0f65b928fee72f93a8e8db1a008abf981486 /tools
parentbfd586c18b820a3f1174197d9031b6ffde091872 (diff)
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 <jason@jlekstrand.net> Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Scott D Phillips <scott.d.phillips@intel.com> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'tools')
-rw-r--r--tools/aubdump.c16
1 files changed, 16 insertions, 0 deletions
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