qemu-ppc
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any plan for command line '-g' option (graphical resolution and dept


From: Mark Cave-Ayland
Subject: Re: Any plan for command line '-g' option (graphical resolution and depth)?
Date: Thu, 20 Feb 2025 11:13:58 +0000
User-agent: Mozilla Thunderbird

On 20/02/2025 09:20, Philippe Mathieu-Daudé wrote:

Hi,

QEMU provides the global '-g' CLI option:

$ qemu-system-foo --help

   -g WxH[xDEPTH]  Set the initial graphical resolution and depth

This option is used to pass resolution/depth information to guest
firmwares in the machines defined in the following files:

   hw/ppc/mac_newworld.c
   hw/ppc/mac_oldworld.c
   hw/ppc/prep.c
   hw/ppc/spapr.c
   hw/sparc/sun4m.c
   hw/sparc64/sun4u.c

Examples:

- hw/ppc/spapr.c:1102:

   _FDT(fdt_setprop_cell(fdt, c, "qemu,graphic-width", graphic_width));

- hw/sparc64/sun4u.c:716:

   fw_cfg_add_i16(fw_cfg, FW_CFG_SPARC64_WIDTH, graphic_width);


Obviously we have default values, which are different per architecture!
Clearly these ought to be machine properties.

At least for VGA it is possible to use VGA via the width and height properties to set the initial values i.e. on the command line with -device VGA,width=1024,height=768 and then use an EDID parser to get the information in the firmware. But then we hit the same problem of how to set these properties from the command line on in-built devices again.

It is also used to set TYPE_NUBUS_MACFB properties in hw/m68k/q800.c.
Here i suppose we could directly use '-global nubus-macfb.width=value'
etc. although I'm not sure it is the recommended way.

This approach should work, however -global feels more like a big hammer as opposed to a proper solution. In particular it doesn't work if you have e.g. multiple screens that you want set to different resolutions.

Should we start deprecating '-g' as a whole?

I think there should be a better way to consolidate the default resolution selection on display devices (particularly in the case of multiple displays), so yes.


ATB,

Mark.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]