freedreno/drm/virtio: Guest side fence waits

Now that fd_fence and fd_submit_fence are unified, we can wait on the
fence fd rather than needing to poll the host.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20263>
This commit is contained in:
Rob Clark 2022-12-15 08:48:00 -08:00 committed by Marge Bot
parent 995c64ddcb
commit 90b9b1330d

View file

@ -21,6 +21,7 @@
* SOFTWARE.
*/
#include "util/libsync.h"
#include "util/slab.h"
#include "freedreno_ringbuffer_sp.h"
@ -120,6 +121,10 @@ static int
virtio_pipe_wait(struct fd_pipe *pipe, const struct fd_fence *fence, uint64_t timeout)
{
MESA_TRACE_FUNC();
if (fence->use_fence_fd)
return sync_wait(fence->fence_fd, timeout / 1000000);
struct msm_ccmd_wait_fence_req req = {
.hdr = MSM_CCMD(WAIT_FENCE, sizeof(req)),
.queue_id = to_virtio_pipe(pipe)->queue_id,