diff --git a/src/freedreno/drm/freedreno_pipe.c b/src/freedreno/drm/freedreno_pipe.c index 13e8ad979e858..c3fc7db41f51a 100644 --- a/src/freedreno/drm/freedreno_pipe.c +++ b/src/freedreno/drm/freedreno_pipe.c @@ -152,6 +152,9 @@ fd_pipe_purge(struct fd_pipe *pipe) fd_fence_flush(unflushed_fence); fd_fence_del(unflushed_fence); } + + if (pipe->funcs->finish) + pipe->funcs->finish(pipe); } int diff --git a/src/freedreno/drm/freedreno_priv.h b/src/freedreno/drm/freedreno_priv.h index 7e6b3c22ce44c..b59629a7ee5e7 100644 --- a/src/freedreno/drm/freedreno_priv.h +++ b/src/freedreno/drm/freedreno_priv.h @@ -314,6 +314,7 @@ struct fd_pipe_funcs { * the pipe implementation) */ void (*flush)(struct fd_pipe *pipe, uint32_t fence); + void (*finish)(struct fd_pipe *pipe); int (*get_param)(struct fd_pipe *pipe, enum fd_param_id param, uint64_t *value); diff --git a/src/freedreno/drm/virtio/virtio_pipe.c b/src/freedreno/drm/virtio/virtio_pipe.c index 8b4644777acd6..f91344c7644b2 100644 --- a/src/freedreno/drm/virtio/virtio_pipe.c +++ b/src/freedreno/drm/virtio/virtio_pipe.c @@ -112,6 +112,14 @@ virtio_pipe_get_param(struct fd_pipe *pipe, enum fd_param_id param, } } +static void +virtio_pipe_finish(struct fd_pipe *pipe) +{ + struct virtio_pipe *virtio_pipe = to_virtio_pipe(pipe); + if (util_queue_is_initialized(&virtio_pipe->retire_queue)) + util_queue_finish(&virtio_pipe->retire_queue); +} + static int virtio_pipe_wait(struct fd_pipe *pipe, const struct fd_fence *fence, uint64_t timeout) { @@ -208,6 +216,7 @@ static const struct fd_pipe_funcs funcs = { .ringbuffer_new_object = fd_ringbuffer_sp_new_object, .submit_new = virtio_submit_new, .flush = fd_pipe_sp_flush, + .finish = virtio_pipe_finish, .get_param = virtio_pipe_get_param, .wait = virtio_pipe_wait, .destroy = virtio_pipe_destroy,