If we ever see explicit fencing used, then we can disable implicit
fencing, even for internal or unfenced batches.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10444>
uint32_t last_submit_fence;
uint32_t last_enqueue_fence; /* just for debugging */
+
+ /**
+ * If we *ever* see an in-fence-fd, assume that userspace is
+ * not relying on implicit fences.
+ */
+ bool no_implicit_sync;
};
FD_DEFINE_CAST(fd_pipe, msm_pipe);
}
if (msm_submit->in_fence_fd != -1) {
- req.flags |= MSM_SUBMIT_FENCE_FD_IN | MSM_SUBMIT_NO_IMPLICIT;
+ req.flags |= MSM_SUBMIT_FENCE_FD_IN;
req.fence_fd = msm_submit->in_fence_fd;
+ msm_pipe->no_implicit_sync = true;
+ }
+
+ if (msm_pipe->no_implicit_sync) {
+ req.flags |= MSM_SUBMIT_NO_IMPLICIT;
}
if (msm_submit->out_fence && msm_submit->out_fence->use_fence_fd) {