[igt-dev] [PATCH i-g-t 6/6] aubdump: Signal drm sync objects when device override is used
Jordan Justen
jordan.l.justen at intel.com
Wed Feb 21 23:19:05 UTC 2018
This prevents an infinite hang with crucible (vulkan) rendering tests
when --device is used.
Cc: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Jordan Justen <jordan.l.justen at intel.com>
---
tools/aubdump.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tools/aubdump.c b/tools/aubdump.c
index 4ecba01a..ed90e91c 100644
--- a/tools/aubdump.c
+++ b/tools/aubdump.c
@@ -996,6 +996,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
--
2.16.1
More information about the igt-dev
mailing list