aboutsummaryrefslogtreecommitdiffstats
path: root/vgasrc/stdvgamodes.c
Commit message (Collapse)AuthorAgeFilesLines
* vgabios: Fix generating modes list for static_functionalityHEADmasterSteven Price2024-10-251-2/+2
| | | | | | | | | | | | Accessing the data in the vga_modes array requires using GET_GLOBAL(), and the bits set in the bit array should correspond to the modes, not the indexes in vga_modes. With this change the modes calculated matches the expected value of 0xfe0ff. Fixes: 12900b1a2431 ("vgabios: Fill in available legacy modes in video_func_static at runtime") Signed-off-by: Steven Price <steven@ecrips.co.uk>
* stdvgaio: Only read/write one color palette entry at a timeKevin O'Connor2024-04-131-4/+4
| | | | | | | | | Introduce stdvga_dac_read_many() and stdvga_dac_write_many() for writing multiple dac palette entries. Convert the stdvga_dac_read() and stdvga_dac_write() low-level IO access functions in stdvgaio.c to access just one color palette entry. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stdvgamodes: Improve naming of dac palette tablesKevin O'Connor2024-03-311-42/+50
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* stdvgamodes: No need to store pelmask in vga_modes[]Kevin O'Connor2024-03-311-19/+18
| | | | | | The pelmask is always 0xff so no need to store in a static table. 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-7/+5
| | | | | | | | | 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>
* 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>
* vgainit: Move video param setup to stdvga_build_video_param()Kevin O'Connor2016-08-051-0/+10
| | | | | | | Move the full video_param_table[] setup (including the updating of the BDA) to stdvga_build_video_param(). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Fill in available legacy modes in video_func_static at runtimeKevin O'Connor2014-10-271-0/+9
| | | | | | | Instead of hard coding the list of modes, fill them in from the list of supported modes. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Move standard table definitions to std/vga.hKevin O'Connor2014-10-271-2/+2
| | | | | | | | Move the standard video bios definitions into a new header file. Also, define a struct with the layout for the static functionality table. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Make sure stdvga_list_modes() doesn't overrun the buffer.Kevin O'Connor2014-02-111-1/+1
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Load the DAC palette in "packed" modes on Cirrus and BochsVGA.Kevin O'Connor2013-12-041-0/+7
| | | | | | | This is a port of a patch applied to the "lgpl vgabios" tree (that was released in its v0.7a release). Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Move function definitions for output.c from util.h to new file output.h.Kevin O'Connor2013-09-181-2/+2
| | | | | | Also, sort the order of include files in the c files. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Rename util.c to string.c and introduce string.h.Kevin O'Connor2013-09-181-1/+2
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* Report stdvga modes in VBE via int10 (AX = 4F00h)Christian Gmeiner2012-09-101-0/+10
| | | | | | | | | | As all supported graphic adapters are supporting VGA we should list them in int10 (AX = 4F00h). Also clext.c and bochsvga.c are haveing a function named like is_XXX_mode() which checks if its a default VGA mode or a VESA mode. If its a normal VGA mode stdvga_set_mode() gets called. Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
* vgabios: Move stdvga_set_mode() to stdvgamodes.c.Kevin O'Connor2012-02-011-2/+118
| | | | Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Move BDA setting from driver code to common code.Kevin O'Connor2012-02-011-0/+7
| | | | | | | | | | Always setup the BDA on a mode switch. Call that BDA setup code unconditionally. Also, always set vbe_mode and use that for finding the current mode and for reporting the mode to vbe callers. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Don't have geode code peak into stdvga mode struct.Kevin O'Connor2012-01-161-0/+11
| | | | | | | Create a wrapper (stdvga_override_crtc) so the Geode code doesn't need to access the stdvga mode tables directly. Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
* vgabios: Rename vgatables.c to stdvgamodes.c.Kevin O'Connor2012-01-161-0/+362
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>