[PATCH v3 3/5] hw/arm/sbsa-ref: honor "-vga none" argument

Marcin Juszkiewicz posted 5 patches 2 years, 8 months ago
Maintainers: Radoslaw Biernacki <rad@semihalf.com>, Peter Maydell <peter.maydell@linaro.org>, Leif Lindholm <quic_llindhol@quicinc.com>, Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>, Paolo Bonzini <pbonzini@redhat.com>
There is a newer version of this series
[PATCH v3 3/5] hw/arm/sbsa-ref: honor "-vga none" argument
Posted by Marcin Juszkiewicz 2 years, 8 months ago
In case someone wants to run without graphics card.

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

diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
index 9c3e670ec6..c540b2f1ba 100644
--- a/hw/arm/sbsa-ref.c
+++ b/hw/arm/sbsa-ref.c
@@ -649,7 +649,9 @@ static void create_pcie(SBSAMachineState *sms)
         }
     }
 
-    pci_create_simple(pci->bus, -1, "bochs-display");
+    if (vga_interface_type != VGA_NONE) {
+        pci_create_simple(pci->bus, -1, "bochs-display");
+    }
 
     create_smmu(sms, pci->bus);
 }
-- 
2.40.1
Re: [PATCH v3 3/5] hw/arm/sbsa-ref: honor "-vga none" argument
Posted by Richard Henderson 2 years, 8 months ago
On 5/24/23 03:27, Marcin Juszkiewicz wrote:
> In case someone wants to run without graphics card.
> 
> Signed-off-by: Marcin Juszkiewicz<marcin.juszkiewicz@linaro.org>
> ---
>   hw/arm/sbsa-ref.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
Re: [PATCH v3 3/5] hw/arm/sbsa-ref: honor "-vga none" argument
Posted by Thomas Huth 2 years, 8 months ago
On 24/05/2023 12.27, Marcin Juszkiewicz wrote:
> In case someone wants to run without graphics card.
> 
> Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
> ---
>   hw/arm/sbsa-ref.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
> index 9c3e670ec6..c540b2f1ba 100644
> --- a/hw/arm/sbsa-ref.c
> +++ b/hw/arm/sbsa-ref.c
> @@ -649,7 +649,9 @@ static void create_pcie(SBSAMachineState *sms)
>           }
>       }
>   
> -    pci_create_simple(pci->bus, -1, "bochs-display");
> +    if (vga_interface_type != VGA_NONE) {
> +        pci_create_simple(pci->bus, -1, "bochs-display");
> +    }

Once you extended pci_vga_init(), I think you should simply replace this 
line with pci_vga_init(pci->bus) - then you get the handling for VGA_NONE 
and other graphic adapters automatically (especially one could use "-vga 
std" to switch back to the normal VGA card that was used in former times).

  Thomas