diff options
author | Patrick Rudolph <siro@das-labor.org> | 2017-05-29 19:25:10 +0200 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2017-06-12 15:10:05 -0400 |
commit | 4b42cc4b31f682214ab473838f0de0584f58cba8 (patch) | |
tree | 4762eb88fb50309ce113d9c6be740916d3f69e25 | |
parent | 58953eb793b7f43f9cbb72bd7802922746235266 (diff) | |
download | seabios-4b42cc4b31f682214ab473838f0de0584f58cba8.tar.gz |
SeaVGABios/cbvga: Advertise correct pixel format
Accumulate the pixel format's bits instead relying on coreboot's
bits_per_pixel, which says nothing about the active pixel format.
Allows VBE to correctly advertise XRGB8 and BGRX8 framebuffer formats,
commonly used by coreboot.
Fixes at least Windows Bootloader and gfxboot.
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
-rw-r--r-- | vgasrc/cbvga.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/vgasrc/cbvga.c b/vgasrc/cbvga.c index b8216a9e..39ffdbb2 100644 --- a/vgasrc/cbvga.c +++ b/vgasrc/cbvga.c @@ -1,6 +1,7 @@ // Simple framebuffer vgabios for use with coreboot native vga init. // // Copyright (C) 2014 Kevin O'Connor <kevin@koconnor.net> +// Copyright (C) 2017 Patrick Rudolph <siro@das-labor.org> // // This file may be distributed under the terms of the GNU LGPLv3 license. @@ -164,7 +165,8 @@ cbvga_setup(void) } u64 addr = GET_FARVAR(0, cbfb->physical_address); - u8 bpp = GET_FARVAR(0, cbfb->bits_per_pixel); + u8 bpp = cbfb->blue_mask_size + cbfb->green_mask_size + + cbfb->red_mask_size + cbfb->reserved_mask_size; u32 xlines = GET_FARVAR(0, cbfb->x_resolution); u32 ylines = GET_FARVAR(0, cbfb->y_resolution); u32 linelength = GET_FARVAR(0, cbfb->bytes_per_line); |