vgabios: Ignore mode flags in vbe get_mode_info call.

Ignore any mode flags a caller may have set on the vbe get_mode_info
call.  The spec doesn't require ignoring of flags, but it appears at
least some real-world vgabios vbe implementations do this.

Signed-off-by: Kevin O'Connor <>
diff --git a/vgasrc/vbe.c b/vgasrc/vbe.c
index 227a244..01c8071 100644
--- a/vgasrc/vbe.c
+++ b/vgasrc/vbe.c
@@ -74,7 +74,7 @@
     dprintf(1, "VBE mode info request: %x\n", mode);
-    struct vgamode_s *vmode_g = vgahw_find_mode(mode);
+    struct vgamode_s *vmode_g = vgahw_find_mode(mode & ~MF_VBEFLAGS);
     if (! vmode_g) {
         dprintf(1, "VBE mode %x not found\n", mode);
         regs->ax = 0x014f;