aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/cbvga.c
Commit message (Collapse)AuthorAgeFilesLines
* vgasrc: Rename vgahw_get_linesize() to vgahw_minimum_linelength()Kevin O'Connor2024-03-151-7/+7
| | | | | | | | Make the relationship between vgahw_get_linelength() and vgahw_get_linesize() more clear by renaming it to vgahw_minimum_linelength(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgasrc: Use curmode_g instead of vmode_g when mode is the current video modeKevin O'Connor2024-03-151-8/+8
| | | | | | | | | Many functions are passed a pointer to the current video mode vgamode_s struct. Use the name 'curmode_g' for these functions and use 'vmode_g' for functions that can accept an arbitrary video mode. Hopefully this will make the goals of the functions more clear. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Remove dos line endings introduced in the last two commitsUwe Kleine-König2019-10-211-9/+9
| | | | | | | | | | | These were added somewhere between the mailing list server and Gerd's working copy (as the patch I got via the mailing list is fine). These don't disturb the compiler, but they look ugly so remove them. Reported-by: Paul Menzel <pmenzel@molgen.mpg.de> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Message-Id: <20191020200726.20116-1-uwe@kleine-koenig.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga: reuse svga modes definitions from svgamodes.cUwe Kleine-König2019-10-181-71/+9
| | | | | | | | | | | | | | For cbvga only modes with MM_DIRECT are usable, so skip the other ones. This effectively adds the following modes: { 0x10D, { MM_DIRECT, 320, 200, 15, 8, 16, SEG_GRAPH } }, { 0x10E, { MM_DIRECT, 320, 200, 16, 8, 16, SEG_GRAPH } }, { 0x10F, { MM_DIRECT, 320, 200, 24, 8, 16, SEG_GRAPH } }, { 0x140, { MM_DIRECT, 320, 200, 32, 8, 16, SEG_GRAPH } }, Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org> Message-Id: <20191017203353.18898-1-uwe@kleine-koenig.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* SeaVGABios/cbvga: Fix bpp for coreboot framebufferMatt DeVillier2018-09-181-2/+8
| | | | | | | | | | | | | | | | Commit 4b42cc4 [SeaVGABios/cbvga: Advertise correct pixel format] neglected to wrap the cbfb mask size components in GET_FARVAR(), which resulted in a bogus value for bpp, breaking output on most/all devices. Fix this by adding GET_FARVAR() as appropriate. Additionally, some newer ChromeOS devices still fail even with this fix, so fall back to using the coreboot reported bit depth if the calculated valid is invalid. TEST: build/boot a variety of devices (google/[reef,eve], purism/librem_skl) using coreboot framebuffer init, verify SeaBIOS boot menu prompt visible. Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
* cbvga_set_mode: refine clear display logicGerd Hoffmann2018-06-261-8/+10
| | | | | | | There is no need to skip text mode clearing. Clearing the framebuffer should be safe on legacy calls too. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga_set_mode: disable clearmem in windows x86 emulator.Gerd Hoffmann2018-06-221-1/+9
| | | | Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga_list_modes: don't list current mode twiceGerd Hoffmann2018-06-221-1/+5
| | | | | | | In case we've already added the framebuffer video mode to the list do not add number 0x140. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga_setup_modes: use real mode number instead of 0x140Gerd Hoffmann2018-06-221-0/+5
| | | | | | | In case the framebuffer size matches one of the cbvga video modes just use that mode number instead of 0x140. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* cbvga: factor out cbvga_setup_modes()Gerd Hoffmann2018-06-221-25/+32
| | | | | | Factor out generic data structure setup code from cbvga_setup(). Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
* SeaVGABios/cbvga: Advertise compatible VESA modesPatrick Rudolph2017-06-121-1/+103
| | | | | | | | | | | | | | | | Advertise compatible VESA modes, that are smaller or equal to coreboot's active framebuffer. Only modes that have the same Bpp are advertise and can be selected. Allows the Windows 7 bootloader NTLDR to show up in VESA mode. Allows to show the Windows 7 boot logo. Allows Windows to boot in safe mode and in normal boot using VgaSave driver with resolution up to 1600x1200. This fixes most likely other bootloader and operating systems as well, in case the are relying on VESA framebuffer support. Signed-off-by: Patrick Rudolph <siro@das-labor.org>
* SeaVGABios/cbvga: Use active mode to clear screenPatrick Rudolph2017-06-121-1/+1
| | | | | | As coreboot framebuffer is immutable always use CBmodeinfo. Signed-off-by: Patrick Rudolph <siro@das-labor.org>
* SeaVGABIOS/vbe: Query driver for scanline pitch v2Patrick Rudolph2017-06-121-0/+7
| | | | | | | | | | | 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>
* SeaVGABios/cbvga: Advertise correct pixel formatPatrick Rudolph2017-06-121-1/+3
| | | | | | | | | | | | 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>
* vgautil: Move definitions from cbvga.h and clext.h to vgautil.hKevin O'Connor2016-08-051-1/+0
| | | | | | | These files only need to export simple function definitions - move them to vgautil.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgautil: Add new header file with misc function and variable definitionsKevin O'Connor2016-08-051-1/+2
| | | | | | | | Move the generic function and variable definitions from vgabios.h to a new file vgautil.h. This reduces the size and complexity of vgabios.h. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgafb: Move header definitions from vgabios.h to new file vgafb.hKevin O'Connor2016-08-041-0/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Add software cursor capabilityKevin O'Connor2014-11-121-2/+2
| | | | | | | | Add mechanism for drawing a cursor to the framebuffer to implement a cursor in software. The timer interrupt is "hooked" so that the cursor can blink. This can be useful for "coreboot native vga". Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Support emulating text mode attributes while in graphics modeKevin O'Connor2014-11-121-3/+7
| | | | | | | | | Add support for simple text mode attribute emulation while in graphics mode. This improves text highlighting and background color on some boot-loaders. Enable it only for CBVGA vgabios and only when a text mode is requested. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Initial support for coreboot native vga vgabios.Kevin O'Connor2014-04-111-0/+189
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>