Let's check renderer_blocked instead directly. Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> --- include/hw/virtio/virtio-gpu.h | 1 - hw/display/virtio-gpu.c | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-)
diff --git a/include/hw/virtio/virtio-gpu.h b/include/hw/virtio/virtio-gpu.h index fb74fba4a9..5b19b0d9d4 100644 --- a/include/hw/virtio/virtio-gpu.h +++ b/include/hw/virtio/virtio-gpu.h @@ -86,7 +86,6 @@ struct virtio_gpu_ctrl_command { VirtQueue *vq; struct virtio_gpu_ctrl_hdr cmd_hdr; uint32_t error; - bool waiting; bool finished; QTAILQ_ENTRY(virtio_gpu_ctrl_command) next; }; diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c index 48b3e0ceaa..37055926d3 100644 --- a/hw/display/virtio-gpu.c +++ b/hw/display/virtio-gpu.c @@ -813,8 +813,7 @@ void virtio_gpu_process_cmdq(VirtIOGPU *g) while (!QTAILQ_EMPTY(&g->cmdq)) { cmd = QTAILQ_FIRST(&g->cmdq); - cmd->waiting = g->renderer_blocked; - if (cmd->waiting) { + if (g->renderer_blocked) { break; } @@ -863,7 +862,6 @@ static void virtio_gpu_handle_ctrl(VirtIODevice *vdev, VirtQueue *vq) cmd->vq = vq; cmd->error = 0; cmd->finished = false; - cmd->waiting = false; QTAILQ_INSERT_TAIL(&g->cmdq, cmd, next); cmd = virtqueue_pop(vq, sizeof(struct virtio_gpu_ctrl_command)); } -- 2.18.0.rc1