Commit 5c520d976a for qemu.org

commit 5c520d976ae402c949a944519ad4d69754175eb8
Author: BALATON Zoltan <balaton@eik.bme.hu>
Date:   Sat Mar 21 17:30:12 2026 +0100

    ati-vga: Also switch mode on HW cursor enable bit change

    This does nothing for most drivers but works around issue and fixes
    output with the Solaris R128 driver that only sets display parameters
    after enabling CRT controller which we would miss otherwise.

    Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
    Tested-by: Chad Jablonski <chad@jablonski.xyz>
    Reviewed-by: Chad Jablonski <chad@jablonski.xyz>
    Message-ID: <ad3f415749178984c764f4ba810c663d1299ddfd.1774110169.git.balaton@eik.bme.hu>
    Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

diff --git a/hw/display/ati.c b/hw/display/ati.c
index 05cf507bd4..1a6a5ad4fd 100644
--- a/hw/display/ati.c
+++ b/hw/display/ati.c
@@ -617,6 +617,7 @@ static void ati_mm_write(void *opaque, hwaddr addr,
         ati_reg_write_offs(&s->regs.crtc_gen_cntl,
                            addr - CRTC_GEN_CNTL, data, size);
         if ((val & CRTC2_CUR_EN) != (s->regs.crtc_gen_cntl & CRTC2_CUR_EN)) {
+            ati_vga_switch_mode(s);
             if (s->cursor_guest_mode) {
                 s->vga.force_shadow = !!(s->regs.crtc_gen_cntl & CRTC2_CUR_EN);
             } else {