diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-05-29 19:25:12 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-06-12 15:17:09 -0400 |
commit | 4902b8a703779ee2d85da406d6f1dc16df71a43d (patch) | |
tree | 9d78ef245ac730a3b2a1bd5e70f0d1ef1ec1db2e /vgasrc/cbvga.c | |
parent | 4b42cc4b31f682214ab473838f0de0584f58cba8 (diff) | |
download | seabios-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/cbvga.c')
-rw-r--r-- | vgasrc/cbvga.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index 39ffdbb2..417ade3a 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -115,6 +115,13 @@ cbvga_set_mode(struct vgamode_s *vmode_g, int flags) return 0; } +int +cbvga_get_linesize(struct vgamode_s *vmode_g) +{ + /* Can't change mode, always report active pitch. */ + return GET_GLOBAL(CBlinelength); +} + #define CB_TAG_FRAMEBUFFER 0x0012 struct cb_framebuffer { u32 tag; |