[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] spice: delay starting until display are initialized
From: |
Marc-André Lureau |
Subject: |
Re: [PATCH] spice: delay starting until display are initialized |
Date: |
Thu, 28 Jan 2021 23:28:50 +0400 |
On Thu, Jan 28, 2021 at 8:34 PM Gerd Hoffmann <kraxel@redhat.com> wrote:
>
> Hi,
>
> > > So move the vmstate handler registration call too?
> > > I'd prefer to not add more state variables if we can avoid it ...
> >
> > Does that seem right to you?
>
> > @@ -626,7 +625,7 @@ static int add_channel(void *opaque, const char
> > *name, const char *value,
> > static void vm_change_state_handler(void *opaque, int running,
> > RunState state)
> > {
> > - if (running && spice_display_init_done) {
> > + if (running) {
> > qemu_spice_display_start();
> > } else if (state != RUN_STATE_PAUSED) {
> > qemu_spice_display_stop();
> > @@ -635,7 +634,7 @@ static void vm_change_state_handler(void *opaque,
> > int running,
> >
> > void qemu_spice_display_init_done(void)
> > {
> > - spice_display_init_done = true;
> > + qemu_add_vm_change_state_handler(vm_change_state_handler, NULL);
> > vm_change_state_handler(NULL, runstate_is_running(), runstate_get());
>
> I'd just call qemu_spice_display_start() directly here, the need for
> runstate_get() goes away then. Otherwise looks good to me.
Hmm, that could work, but it will behave differently as we will start
spice even if the VM is not running then.
--
Marc-André Lureau
- [PATCH] spice: delay starting until display are initialized, marcandre . lureau, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Gerd Hoffmann, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Marc-André Lureau, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Marc-André Lureau, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Gerd Hoffmann, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Marc-André Lureau, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Gerd Hoffmann, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Marc-André Lureau, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized, Gerd Hoffmann, 2021/01/28
- Re: [PATCH] spice: delay starting until display are initialized,
Marc-André Lureau <=
- Re: [PATCH] spice: delay starting until display are initialized, Gerd Hoffmann, 2021/01/29