<div dir="ltr">Reviewed-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 21, 2018 at 3:19 PM, Jordan Justen <span dir="ltr"><<a href="mailto:jordan.l.justen@intel.com" target="_blank">jordan.l.justen@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This prevents an infinite hang with crucible (vulkan) rendering tests<br>
when --device is used.<br>
<br>
Cc: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br>
Signed-off-by: Jordan Justen <<a href="mailto:jordan.l.justen@intel.com">jordan.l.justen@intel.com</a>><br>
---<br>
 tools/aubdump.c | 16 ++++++++++++++++<br>
 1 file changed, 16 insertions(+)<br>
<br>
diff --git a/tools/aubdump.c b/tools/aubdump.c<br>
index 4ecba01a..ed90e91c 100644<br>
--- a/tools/aubdump.c<br>
+++ b/tools/aubdump.c<br>
@@ -996,6 +996,22 @@ dump_execbuffer2(int fd, struct drm_i915_gem_execbuffer2 *execbuffer2)<br>
                if (files[i] != NULL)<br>
                        fflush(files[i]);<br>
        }<br>
+<br>
+       if (device_override &&<br>
+           (execbuffer2->flags & I915_EXEC_FENCE_ARRAY) != 0) {<br>
+               struct drm_i915_gem_exec_fence *fences =<br>
+                       (void*)(uintptr_t)execbuffer2-<wbr>>cliprects_ptr;<br>
+               for (uint32_t i = 0; i < execbuffer2->num_cliprects; i++) {<br>
+                       if ((fences[i].flags & I915_EXEC_FENCE_SIGNAL) != 0) {<br>
+                               struct drm_syncobj_array arg = {<br>
+                                 .handles = (uintptr_t)&fences[i].handle,<br>
+                                       .count_handles = 1,<br>
+                                       .pad = 0,<br>
+                               };<br>
+                               libc_ioctl(fd, DRM_IOCTL_SYNCOBJ_SIGNAL, &arg);<br>
+                       }<br>
+               }<br>
+       }<br>
 }<br>
<br>
 static void<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.16.1<br>
<br>
</font></span></blockquote></div><br></div>