No need to duplicate between backends.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
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;
+
struct fd_bo *control_mem;
volatile struct fd_pipe_control *control;
uint64_t gmem_base;
uint32_t gmem;
uint32_t queue_id;
-
- /**
- * 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);
flush_submit_list(struct list_head *submit_list)
{
struct fd_submit_sp *fd_submit = to_fd_submit_sp(last_submit(submit_list));
- struct msm_pipe *msm_pipe = to_msm_pipe(fd_submit->base.pipe);
+ struct fd_pipe *pipe = fd_submit->base.pipe;
+ struct msm_pipe *msm_pipe = to_msm_pipe(pipe);
struct drm_msm_gem_submit req = {
.flags = msm_pipe->pipe,
.queueid = msm_pipe->queue_id,
if (fd_submit->in_fence_fd != -1) {
req.flags |= MSM_SUBMIT_FENCE_FD_IN;
req.fence_fd = fd_submit->in_fence_fd;
- msm_pipe->no_implicit_sync = true;
+ pipe->no_implicit_sync = true;
}
- if (msm_pipe->no_implicit_sync) {
+ if (pipe->no_implicit_sync) {
req.flags |= MSM_SUBMIT_NO_IMPLICIT;
}
/* If buffer is shared, but we are using explicit sync, no
* need to fallback to implicit sync in host:
*/
- if (pipe && to_virtio_pipe(pipe)->no_implicit_sync)
+ if (pipe && pipe->no_implicit_sync)
goto out;
struct msm_ccmd_gem_cpu_prep_req req = {
uint32_t ring_idx;
struct slab_parent_pool ring_pool;
- /**
- * If we *ever* see an in-fence-fd, assume that userspace is
- * not relying on implicit fences.
- */
- bool no_implicit_sync;
-
/**
* We know that the kernel allocated fence seqno's sequentially per-
* submitqueue in a range 1..INT_MAX, which is incremented *after* any
{
struct fd_submit_sp *fd_submit = to_fd_submit_sp(last_submit(submit_list));
struct virtio_pipe *virtio_pipe = to_virtio_pipe(fd_submit->base.pipe);
- struct fd_device *dev = virtio_pipe->base.dev;
+ struct fd_pipe *pipe = &virtio_pipe->base;
+ struct fd_device *dev = pipe->dev;
unsigned nr_cmds = 0;
}
if (fd_submit->in_fence_fd != -1) {
- virtio_pipe->no_implicit_sync = true;
+ pipe->no_implicit_sync = true;
}
- if (virtio_pipe->no_implicit_sync) {
+ if (pipe->no_implicit_sync) {
req->flags |= MSM_SUBMIT_NO_IMPLICIT;
}