diff mbox series

[v4,3/3] hw/arm/sbsa-ref: set default display to Bochs

Message ID 20230524111413.833912-4-marcin.juszkiewicz@linaro.org
State New
Headers show
Series hw/arm/sbsa-ref: sort out graphics a bit | expand

Commit Message

Marcin Juszkiewicz May 24, 2023, 11:14 a.m. UTC
This way we can use pci_vga_init() and have Bochs by default while still
have an option to run with other VGA cards.

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
---
 hw/arm/sbsa-ref.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

Comments

Thomas Huth May 24, 2023, 11:48 a.m. UTC | #1
On 24/05/2023 13.14, Marcin Juszkiewicz wrote:
> This way we can use pci_vga_init() and have Bochs by default while still
> have an option to run with other VGA cards.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>   hw/arm/sbsa-ref.c | 5 +++--
>   1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 9c3e670ec6..ed7ed00b3d 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -647,9 +647,9 @@ static void create_pcie(SBSAMachineState *sms)
>   
>               pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
>           }
> -    }
>   
> -    pci_create_simple(pci->bus, -1, "bochs-display");
> +        pci_vga_init(pci->bus);
> +    }
>   
>       create_smmu(sms, pci->bus);
>   }
> @@ -863,6 +863,7 @@ static void sbsa_ref_class_init(ObjectClass *oc, void *data)
>       mc->default_ram_size = 1 * GiB;
>       mc->default_ram_id = "sbsa-ref.ram";
>       mc->default_cpus = 4;
> +    mc->default_display = "bochs-display";
>       mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
>       mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
>       mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;

Reviewed-by: Thomas Huth <thuth@redhat.com>
diff mbox series

Patch

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 9c3e670ec6..ed7ed00b3d 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -647,9 +647,9 @@  static void create_pcie(SBSAMachineState *sms)
 
             pci_nic_init_nofail(nd, pci->bus, nd->model, NULL);
         }
-    }
 
-    pci_create_simple(pci->bus, -1, "bochs-display");
+        pci_vga_init(pci->bus);
+    }
 
     create_smmu(sms, pci->bus);
 }
@@ -863,6 +863,7 @@  static void sbsa_ref_class_init(ObjectClass *oc, void *data)
     mc->default_ram_size = 1 * GiB;
     mc->default_ram_id = "sbsa-ref.ram";
     mc->default_cpus = 4;
+    mc->default_display = "bochs-display";
     mc->possible_cpu_arch_ids = sbsa_ref_possible_cpu_arch_ids;
     mc->cpu_index_to_instance_props = sbsa_ref_cpu_index_to_props;
     mc->get_default_cpu_node_id = sbsa_ref_get_default_cpu_node_id;