In case we've already added the framebuffer video mode
to the list do not add number 0x140.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
vgasrc/cbvga.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c
index 2139a00904..13a666b22b 100644
--- a/vgasrc/cbvga.c
+++ b/vgasrc/cbvga.c
@@ -107,6 +107,8 @@ struct vgamode_s *cbvga_find_mode(int mode)
void
cbvga_list_modes(u16 seg, u16 *dest, u16 *last)
{
+ int seen = 0;
+
if (GET_GLOBAL(CBmode) != 0x3) {
/* Advertise additional SVGA modes for Microsoft NTLDR graphical mode.
* Microsoft NTLDR:
@@ -122,9 +124,11 @@ cbvga_list_modes(u16 seg, u16 *dest, u16 *last)
continue;
SET_FARVAR(seg, *dest, mode);
dest++;
+ if (GET_GLOBAL(CBmode) == mode)
+ seen = 1;
}
}
- if (dest < last) {
+ if (dest < last && !seen) {
SET_FARVAR(seg, *dest, GET_GLOBAL(CBmode));
dest++;
}
--
2.9.3
_______________________________________________
SeaBIOS mailing list
SeaBIOS@seabios.org
https://mail.coreboot.org/mailman/listinfo/seabios