On 2024/06/10 4:02, Dmitry Osipenko wrote:
On 6/3/24 08:44, Akihiko Odaki wrote:
On 2024/06/03 14:26, Dmitry Osipenko wrote:
On 6/2/24 08:34, Akihiko Odaki wrote:
+typedef enum {
+    RS_START,       /* starting state */
+    RS_INIT_FAILED, /* failed initialisation */

Is the distinction between RS_START and RS_INIT_FAILED really necessary?

The state stays in RS_INIT_FAILED once was failed until virtio-gpu is
reset, re-initializing virglrenderer isn't allowed in this state.

Can you elaborate more? Why isn't re-initializing allowed?

In practice, if virglrenderer initialization failed once, it will fail
second time. Otherwise we will be retrying to init endlessly because
guest won't stop sending virgl commands even if they all are timing out.
Each initialization failure produces a error msg.

I see.

A better solution is to add a new function to GraphicHwOps to call back after initializating the displays and before starting the guest. You can do virgl initialization in such a function, and exit(1) if the initialization fails because the guest has not started yet, saving this enum. I don't require you to make such a change however; this is not a regression of your patches so you have no obligation to fix it.

Reply via email to