aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/stdvga.c
diff options
context:
space:
mode:
authorPatrick Rudolph <siro@das-labor.org>2017-05-29 19:25:12 +0200
committerKevin O'Connor <kevin@koconnor.net>2017-06-12 15:17:09 -0400
commit4902b8a703779ee2d85da406d6f1dc16df71a43d (patch)
tree9d78ef245ac730a3b2a1bd5e70f0d1ef1ec1db2e /vgasrc/stdvga.c
parent4b42cc4b31f682214ab473838f0de0584f58cba8 (diff)
downloadseabios-4902b8a703779ee2d85da406d6f1dc16df71a43d.tar.gz
SeaVGABIOS/vbe: Query driver for scanline pitch v2
Query the driver for the real scanline pitch in bytes. As cbvga doesn't change the pitch on mode change, always return the same pitch, that might exceed width times Bytes-per-pixel. Report the default stdvga pitch for all other drivers. Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'vgasrc/stdvga.c')
-rw-r--r--vgasrc/stdvga.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/vgasrc/stdvga.c b/vgasrc/stdvga.c
index 886deca0..0e24297e 100644
--- a/vgasrc/stdvga.c
+++ b/vgasrc/stdvga.c
@@ -321,6 +321,11 @@ stdvga_set_dacformat(struct vgamode_s *vmode_g, int val)
return -1;
}
+int
+stdvga_get_linesize(struct vgamode_s *vmode_g)
+{
+ return DIV_ROUND_UP(vmode_g->width * vga_bpp(vmode_g), 8);
+}
/****************************************************************
* Save/Restore state