Commit 3445dd26ec for qemu.org
commit 3445dd26ecbd7a731f73e586dae3410a24b576d1
Author: Philippe Mathieu-Daudé <philmd@linaro.org>
Date: Wed Feb 11 14:45:46 2026 +0100
hw/m68k/q800: Use MacFbMode fields in q800_machine_init()
Once the Mac Frame Buffer device is realized on the NuBus,
its MacFbMode might be different of the global graphic_depth
and graphic_width globals. Prefer the device MacFbMode fields
to initialize the BootInfo structure.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Message-Id: <20260216213121.47122-4-philmd@linaro.org>
diff --git a/hw/m68k/q800.c b/hw/m68k/q800.c
index 4767eb4298..b55c03a90b 100644
--- a/hw/m68k/q800.c
+++ b/hw/m68k/q800.c
@@ -605,9 +605,9 @@ static void q800_machine_init(MachineState *machine)
BOOTINFO2(param_ptr, BI_MEMCHUNK, 0, ram_size);
BOOTINFO1(param_ptr, BI_MAC_VADDR,
VIDEO_BASE + macfb_mode->offset);
- BOOTINFO1(param_ptr, BI_MAC_VDEPTH, graphic_depth);
+ BOOTINFO1(param_ptr, BI_MAC_VDEPTH, macfb_mode->depth);
BOOTINFO1(param_ptr, BI_MAC_VDIM,
- (graphic_height << 16) | graphic_width);
+ (graphic_height << 16) | macfb_mode->width);
BOOTINFO1(param_ptr, BI_MAC_VROW, macfb_mode->stride);
BOOTINFO1(param_ptr, BI_MAC_SCCBASE, SCC_BASE);