[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL v3 08/25] vl: move display early init before default devices
|
From: |
marcandre . lureau |
|
Subject: |
[PULL v3 08/25] vl: move display early init before default devices |
|
Date: |
Tue, 7 Nov 2023 14:15:06 +0400 |
From: Marc-André Lureau <marcandre.lureau@redhat.com>
The next commit needs to have the display registered itself before
creating the default VCs.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
---
system/vl.c | 31 ++++++++++++++++++-------------
1 file changed, 18 insertions(+), 13 deletions(-)
diff --git a/system/vl.c b/system/vl.c
index e9819408df..cf46e438cc 100644
--- a/system/vl.c
+++ b/system/vl.c
@@ -1352,6 +1352,23 @@ static void qemu_disable_default_devices(void)
}
}
+static void qemu_setup_display(void)
+{
+ 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);
+}
+
static void qemu_create_default_devices(void)
{
MachineClass *machine_class = MACHINE_GET_CLASS(current_machine);
@@ -1401,18 +1418,6 @@ static void qemu_create_default_devices(void)
#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;
- }
-
/* If no default VGA is requested, the default is "none". */
if (default_vga) {
vga_model = get_default_vga_model(machine_class);
@@ -1937,7 +1942,6 @@ static void qemu_create_early_backends(void)
"ignoring option");
}
- qemu_display_early_init(&dpy);
qemu_console_early_init();
if (dpy.has_gl && dpy.gl != DISPLAYGL_MODE_OFF && display_opengl == 0) {
@@ -3666,6 +3670,7 @@ void qemu_init(int argc, char **argv)
suspend_mux_open();
qemu_disable_default_devices();
+ qemu_setup_display();
qemu_create_default_devices();
qemu_create_early_backends();
--
2.41.0
- [PULL v3 00/25] Pixman patches, marcandre . lureau, 2023/11/07
- [PULL v3 01/25] build-sys: add a "pixman" feature, marcandre . lureau, 2023/11/07
- [PULL v3 05/25] vl: drop needless -spice checks, marcandre . lureau, 2023/11/07
- [PULL v3 04/25] ui: add pixman-minimal.h, marcandre . lureau, 2023/11/07
- [PULL v3 03/25] ui: compile out some qemu-pixman functions when !PIXMAN, marcandre . lureau, 2023/11/07
- [PULL v3 06/25] qemu-options: define -vnc only #ifdef CONFIG_VNC, marcandre . lureau, 2023/11/07
- [PULL v3 08/25] vl: move display early init before default devices,
marcandre . lureau <=
- [PULL v3 10/25] ui/vc: console-vc requires PIXMAN, marcandre . lureau, 2023/11/07
- [PULL v3 07/25] vl: simplify display_remote logic, marcandre . lureau, 2023/11/07
- [PULL v3 02/25] build-sys: drop needless warning pragmas for old pixman, marcandre . lureau, 2023/11/07
- [PULL v3 09/25] ui/console: allow to override the default VC, marcandre . lureau, 2023/11/07
- Re: [PULL v3 09/25] ui/console: allow to override the default VC, Peter Maydell, 2023/11/16