On Mon, 16 Feb 2026, BALATON Zoltan wrote:
On Mon, 16 Feb 2026, Paolo Bonzini wrote:
Il dom 15 feb 2026, 10:51 BALATON Zoltan <[email protected]> ha scritto:
+void ppc_graphic_dimensions(int *width, int *height, int *depth)
+{
+    *width = graphic_width ?: 800;
+    *height = graphic_height ?: 600;
+    *depth = graphic_depth ?: 32;
+}

I think there's no reason to have this common to all ppc machines.


I agree with you here that it's better to just inline this in all the
boards that need it, because there's no reason to have 800x600x32 across
such disparate machines.

Can you provide a patch showing how you'd prefer it to be done?

Maybe turning these into properties could work. I could look at adding
such properties but don't know how to change the -g option. But
considering these are all machines that Mark maintains maybe he should do
something about it


I am not sure what you'd be requesting of him?

The easiest were if he agreed to drop -g option but he
never agrees removing anything


Not sure who's he? Is it me since I asked Philippe to keep -g, or Mark? And
if it's Mark, I am not sure what you're trying to obtain by involving (and
in a pretty rude way, too) someone who's not even part of the thread.

Mark is cc-ed on this thread and it seems this -g option is only used by machines he maintains. My previous experience with patches submitted to things he maintains is that this most of the time leads to long discussions on why what I propose is wrong and how else should it be done instead. (I'm not saying that it's because it's me who submits the patch, I've seen this happening to other contributors too but it looks like Mark has strong views on how things should be done and he's reluctant to accept anything else.) Because of that I try not to touch anything that Mark maintains unless he says beforehand what would be acceptable. I did not mean it to be rude or attack him but I also think this isn't the best way to work either. But given these cicrumstances I think Mark should state his peference about this as at the end he is the maintainer who will have to approve it.

so then he should provide patches to clean
this up the way he prefers. I could try to make patches but I'm afraid
those would become wasted effort so may I only do it when there's an
approved way that will be accepted.

The -g 800x600x32 option, if desired, can become simply a shortcut for -M
gfxwidth=800,gfxheight=600,gfxdepth=32 (or
gfx.width=800,gfx.height=600,gfx.depth=32), which is more similar to how
smp or boot work). This would actually be easier to implement with
Philippe's move of all graphics_* accesses to board code, so his patches
should go in either way. And then the globals can be removed altogether.

A problem with global option may be that resolution is not really a machine property but that of the display and one machine may have more than one display. Currently those display devices that support EDID use xres,yres,xmin,ymin,xmax,ymax properties and some devices like VGA have

Ther's no xmin,ymin but there's refresh_rate. However depth is missing.

DEFINE_EDID_PROPERTIES to forward these to the edid generation. For others it can be set less intuitively with -global. (This was asked by somebody for ati-vga recently so I plan to add forwarding properties for that.) Maybe we should move into that direction and make these properties of the display devices and call them xres,yres too for consistency. But there may be some complication here with fw_cfg and OpenBIOS too so in that case just keeping the globals and using machine properties may be simpler.

Another problem with -g is that it only works with a few obscure machines and will do nothing for most of the other machines which is confusing. So in the longer term I think it should either be deprecated and these machines changed to use properties on display devices like the others or as you proposed last year it may need to become an option to set defaults for all displays which is simliar to audiodev that was turned into a machine property from a top level option a while ago.

Anyway these are just my comments to this topic that I wanted to share and then the involved parties will do whatever they want. I wanted to share this in the hope to add some points that I think may be relevant.

Regards,
BALATON Zoltan

Reply via email to