summaryrefslogtreecommitdiff
path: root/vgasrc
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2018-05-30 22:52:04 +0200
committerGerd Hoffmann <kraxel@redhat.com>2018-06-22 07:44:07 +0200
commit902bacb5f00b72efaf55865c665a4bb4c0f46459 (patch)
treedc7bd005a7f430dd87c0c31c9ab5e6e352c551c9 /vgasrc
parent77404b450d30a1d7860e717e98762b8a4745341d (diff)
downloadqemu-seabios-902bacb5f00b72efaf55865c665a4bb4c0f46459.tar.gz
cbvga_setup_modes: use real mode number instead of 0x140
In case the framebuffer size matches one of the cbvga video modes just use that mode number instead of 0x140. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'vgasrc')
-rw-r--r--vgasrc/cbvga.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c
index 9ae97d5..fb68620 100644
--- a/vgasrc/cbvga.c
+++ b/vgasrc/cbvga.c
@@ -260,6 +260,11 @@ cbvga_setup_modes(u64 addr, u8 bpp, u32 xlines, u32 ylines, u32 linelength)
dprintf(3, "Removing mode %x\n", GET_GLOBAL(cbmode_g->mode));
SET_VGA(cbmode_g->mode, 0xffff);
}
+ if ((GET_GLOBAL(cbmode_g->info.height) == ylines)
+ && (GET_GLOBAL(cbmode_g->info.width) == xlines)
+ && (GET_GLOBAL(cbmode_g->info.depth) == bpp)) {
+ SET_VGA(CBmode, GET_GLOBAL(cbmode_g->mode));
+ }
}
}