Mesa (master): anv: reset binary syncobj to be signaled before submission

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Feb 22 21:47:42 UTC 2021


Module: Mesa
Branch: master
Commit: cb74cd816c0a0b1d6a715585414f8518cefbba5a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cb74cd816c0a0b1d6a715585414f8518cefbba5a

Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date:   Mon Feb 22 13:57:37 2021 +0200

anv: reset binary syncobj to be signaled before submission

Before we introduced the submission thread in 829699ba632b2b, once we
returned from vkQueueSubmit, all signaled syncobj would have a
i915_request/dma-fence waiting to be signaled by some work that would
submitted to HW by i915.

After this submission thread that is no longer the case. We added a
few checks in places like vkQueuePresentKHR() to wait for the binary
semaphores to materialize before we would hand things over to the WSI
code.

Unfortunately 829699ba632b2b forgot to reset the signaled binary
semaphore.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Fixes: 829699ba632b2b ("anv: implement shareable timeline semaphores")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/4276
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9188>

---

 src/intel/vulkan/anv_queue.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/intel/vulkan/anv_queue.c b/src/intel/vulkan/anv_queue.c
index bf6381a332f..63054cd4ce1 100644
--- a/src/intel/vulkan/anv_queue.c
+++ b/src/intel/vulkan/anv_queue.c
@@ -1071,6 +1071,13 @@ anv_queue_submit_add_out_semaphores(struct anv_queue_submit *submit,
          break;
 
       case ANV_SEMAPHORE_TYPE_DRM_SYNCOBJ: {
+         /*
+          * Reset the content of the syncobj so it doesn't contain a
+          * previously signaled dma-fence, until one is added by EXECBUFFER by
+          * the submission thread.
+          */
+         anv_gem_syncobj_reset(device, impl->syncobj);
+
          result = anv_queue_submit_add_syncobj(submit, device, impl->syncobj,
                                                I915_EXEC_FENCE_SIGNAL,
                                                0);



More information about the mesa-commit mailing list