On 23/2/26 00:50, BALATON Zoltan wrote:
On Mon, 23 Feb 2026, BALATON Zoltan wrote:
On Mon, 23 Feb 2026, Philippe Mathieu-Daudé wrote:
If a dimension is not set, have the machine init code set
the default value by calling the ppc_graphic_dimensions()
helper, common to all PowerPC machines. Declare local
variables to avoid using the global ones.
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Message-Id: <[email protected]>
---
include/hw/ppc/ppc.h | 2 ++
hw/ppc/mac_newworld.c | 10 ++++++----
hw/ppc/mac_oldworld.c | 10 ++++++----
hw/ppc/ppc.c | 8 ++++++++
hw/ppc/prep.c | 4 ++++
hw/ppc/spapr.c | 4 ++++
system/globals-target.c | 6 ------
7 files changed, 30 insertions(+), 14 deletions(-)
diff --git a/hw/ppc/ppc.c b/hw/ppc/ppc.c
index a512d4fa647..d7b4466d701 100644
--- a/hw/ppc/ppc.c
+++ b/hw/ppc/ppc.c
@@ -29,6 +29,7 @@
#include "qemu/timer.h"
#include "exec/cpu-interrupt.h"
#include "system/cpus.h"
+#include "system/system.h"
#include "qemu/log.h"
#include "qemu/main-loop.h"
#include "qemu/error-report.h"
@@ -1557,3 +1558,10 @@ void ppc_irq_reset(PowerPCCPU *cpu)
kvmppc_set_interrupt(cpu, PPC_INTERRUPT_EXT, 0);
}
}
+
+void ppc_graphic_dimensions(int *width, int *height, int *depth)
+{
+ *width = graphic_width ?: 800;
+ *height = graphic_height ?: 600;
+ *depth = graphic_depth ?: 32;
+}
Sorry but didn't we say that there should be no common
ppc_graphic_dimensions function but each board should set its own
defaults?
OK I see there's a v2 with the correct patches.
Yeah sorry I swiched back in the older branch to check something
and forgot to go to the newer again before posting the PR!