hw/hppa: Avoid creation of artist if disabled on command line
authorHelge Deller <deller@gmx.de>
Tue, 4 Feb 2025 20:04:39 +0000 (21:04 +0100)
committerHelge Deller <deller@gmx.de>
Tue, 4 Feb 2025 21:57:34 +0000 (22:57 +0100)
Do not create the artist graphic card if the user disabled it
with "-global artist.disable=true" on the command line.

Signed-off-by: Helge Deller <deller@gmx.de>
hw/hppa/machine.c

index 9c98b4c2290728b53f6cfe9d3cab0e385ed251e8..c5f247633eb4f66ba975f7016d5bc9c41eb3e3a8 100644 (file)
@@ -366,12 +366,15 @@ static void machine_HP_common_init_tail(MachineState *machine, PCIBus *pci_bus,
 
     /* Graphics setup. */
     if (machine->enable_graphics && vga_interface_type != VGA_NONE) {
-        vga_interface_created = true;
         dev = qdev_new("artist");
         s = SYS_BUS_DEVICE(dev);
-        sysbus_realize_and_unref(s, &error_fatal);
-        sysbus_mmio_map(s, 0, translate(NULL, LASI_GFX_HPA));
-        sysbus_mmio_map(s, 1, translate(NULL, ARTIST_FB_ADDR));
+        bool disabled = object_property_get_bool(OBJECT(dev), "disable", NULL);
+        if (!disabled) {
+            sysbus_realize_and_unref(s, &error_fatal);
+            vga_interface_created = true;
+            sysbus_mmio_map(s, 0, translate(NULL, LASI_GFX_HPA));
+            sysbus_mmio_map(s, 1, translate(NULL, ARTIST_FB_ADDR));
+        }
     }
 
     /* Network setup. */