Hi

On Wed, Oct 25, 2023 at 1:56 PM Thomas Huth <[email protected]> wrote:
>
> On 23/10/2023 13.30, [email protected] wrote:
> > From: Marc-André Lureau <[email protected]>
> >
> > The next commit needs to have the display registered itself before
> > creating the default VCs.
> >
> > Signed-off-by: Marc-André Lureau <[email protected]>
> > ---
> >   system/vl.c | 41 +++++++++++++++++++++++------------------
> >   1 file changed, 23 insertions(+), 18 deletions(-)
> >
> > diff --git a/system/vl.c b/system/vl.c
> > index 92d29bf521..2cecb3d884 100644
> > --- a/system/vl.c
> > +++ b/system/vl.c
> > @@ -1349,6 +1349,28 @@ static void qemu_disable_default_devices(void)
> >       }
> >   }
> >
> > +static void qemu_early_display_init(void)
> > +{
> > +#if defined(CONFIG_VNC)
> > +    if (!QTAILQ_EMPTY(&(qemu_find_opts("vnc")->head))) {
> > +        display_remote++;
> > +    }
> > +#endif
> > +    if (dpy.type == DISPLAY_TYPE_DEFAULT && !display_remote) {
> > +        if (!qemu_display_find_default(&dpy)) {
> > +            dpy.type = DISPLAY_TYPE_NONE;
> > +#if defined(CONFIG_VNC)
> > +            vnc_parse("localhost:0,to=99,id=default");
> > +#endif
> > +        }
> > +    }
> > +    if (dpy.type == DISPLAY_TYPE_DEFAULT) {
> > +        dpy.type = DISPLAY_TYPE_NONE;
> > +    }
> > +
> > +    qemu_display_early_init(&dpy);
> > +}
>
> So we now have qemu_early_display_init() and qemu_display_early_init() ... ?
> That's very confusing, could you maybe come up with a different name for the
> new function?

Ok, what about qemu_setup_display() ? I'll also simplify a bit the logic there.


Reply via email to