Hi
On Mon, May 27, 2024 at 7:03 AM Dmitry Osipenko <
dmitry.osipenko@collabora.com> wrote:
> Check whether command processing has been finished; otherwise, stop
> processing commands and retry the command again next time. This allows
> us to support asynchronous execution of non-fenced commands needed for
> unmapping host blobs safely.
>
> Suggested-by: Akihiko Odaki <akihiko.odaki@daynix.com>
> Signed-off-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
> ---
> hw/display/virtio-gpu.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c
> index f3d2def9a49f..8e05a2d0c7c5 100644
> --- a/hw/display/virtio-gpu.c
> +++ b/hw/display/virtio-gpu.c
> @@ -1054,6 +1054,11 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g)
> /* process command */
> vgc->process_cmd(g, cmd);
>
> + /* command suspended */
> + if (!cmd->finished && !(cmd->cmd_hdr.flags &
> VIRTIO_GPU_FLAG_FENCE)) {
>
Since this is not tracked in "inflight" debugging, it would be worth adding
a trace for this early break.
Btw, if you could replace the fprintf below with a trace as well, this
would be a nice cleanup too
> + break;
> + }
> +
> QTAILQ_REMOVE(&g->cmdq, cmd, next);
> if (virtio_gpu_stats_enabled(g->parent_obj.conf)) {
> g->stats.requests++;
> --
> 2.44.0
>
>
--
Marc-André Lureau