[igt-dev] [PATCH i-g-t 6/6] aubdump: Signal drm sync objects when device override is used

Jason Ekstrand jason at jlekstrand.net
Thu Feb 22 01:06:21 UTC 2018


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Wed, Feb 21, 2018 at 3:19 PM, Jordan Justen <jordan.l.justen at intel.com>
wrote:

> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/igt-dev/attachments/20180221/86ba08ac/attachment.html>


More information about the igt-dev mailing list