projects
/
seabios.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vgabios: Fix linelength calculations in bochsvga and vbe.
[seabios.git]
/
vgasrc
/
bochsvga.c
diff --git
a/vgasrc/bochsvga.c
b/vgasrc/bochsvga.c
index e40a1fd507eefa92a5a234d20dcd094711f93539..36688324c20951c6975de6f1e2bf6aec6aeefea2 100644
(file)
--- a/
vgasrc/bochsvga.c
+++ b/
vgasrc/bochsvga.c
@@
-171,7
+171,8
@@
static int mode_valid(struct vgamode_s *vmode_g)
u16 width = GET_GLOBAL(vmode_g->width);
u16 height = GET_GLOBAL(vmode_g->height);
u8 depth = GET_GLOBAL(vmode_g->depth);
u16 width = GET_GLOBAL(vmode_g->width);
u16 height = GET_GLOBAL(vmode_g->height);
u8 depth = GET_GLOBAL(vmode_g->depth);
- u32 mem = width * height * DIV_ROUND_UP(depth, 8);
+ u32 mem = (height * DIV_ROUND_UP(width * vga_bpp(vmode_g), 8)
+ * 4 / stdvga_bpp_factor(vmode_g));
return width <= max_xres && depth <= max_bpp && mem <= max_mem;
}
return width <= max_xres && depth <= max_bpp && mem <= max_mem;
}