On 6/4/24 17:21, Marc-André Lureau wrote: >> @@ -65,13 +70,21 @@ static void virtio_gpu_gl_handle_ctrl(VirtIODevice >> *vdev, VirtQueue *vq) >> return; >> } >> >> - if (!gl->renderer_inited) { >> - virtio_gpu_virgl_init(g); >> - gl->renderer_inited = true; >> - } >> - if (gl->renderer_reset) { >> - gl->renderer_reset = false; >> + switch (gl->renderer_state) { >> + case RS_RESET: >> virtio_gpu_virgl_reset(g); >> + /* fallthrough */ >> + case RS_START: >> + if (virtio_gpu_virgl_init(g)) { >> + gl->renderer_state = RS_INIT_FAILED; >> + } else { >> + gl->renderer_state = RS_INITED; >> + } >> + break; >> + case RS_INIT_FAILED: >> + return; >> + case RS_INITED: >> + break; >> } >> >> > This still lets it go through the cmd processing after setting > gl->renderer_state = RS_INIT_FAILED, the first time.
Good catch, thanks! -- Best regards, Dmitry