2009-08-04 Robert Millan <rmh.grub@aybabtu.com>
Fix a bug resulting in black screen when loading Linux using a
packed video mode.
* kern/i386/pc/startup.S (grub_vbe_bios_getset_dac_palette_width): New
function.
* include/grub/i386/pc/vbe.h (GRUB_VBE_CAPABILITY_DACWIDTH): New macro.
(grub_vbe_bios_getset_dac_palette_width): New function.
(grub_vbe_bios_get_dac_palette_width)
(grub_vbe_bios_set_dac_palette_width): New macros (act as wrappers for
grub_vbe_bios_getset_dac_palette_width()).
* video/i386/pc/vbe.c (grub_vbe_probe): Use `GRUB_VBE_STATUS_OK' to
check for return status.
(grub_vbe_get_video_mode_info): When getting information for a packed
mode (<= 8 bpp), obtain DAC palette width using
grub_vbe_bios_getset_dac_palette_width(), and use that for initializing
{red,green,blue}_mark_size.
This commit is contained in:
parent
ecb1a6d9e9
commit
f56a875639
4 changed files with 93 additions and 1 deletions
|
|
@ -30,6 +30,8 @@
|
|||
/* VBE status codes. */
|
||||
#define GRUB_VBE_STATUS_OK 0x004f
|
||||
|
||||
#define GRUB_VBE_CAPABILITY_DACWIDTH (1 << 0)
|
||||
|
||||
/* Bits from the GRUB_VBE "mode_attributes" field in the mode info struct. */
|
||||
#define GRUB_VBE_MODEATTR_SUPPORTED (1 << 0)
|
||||
#define GRUB_VBE_MODEATTR_RESERVED_1 (1 << 1)
|
||||
|
|
@ -181,6 +183,11 @@ grub_vbe_status_t EXPORT_FUNC(grub_vbe_bios_get_controller_info) (struct grub_vb
|
|||
grub_vbe_status_t EXPORT_FUNC(grub_vbe_bios_get_mode_info) (grub_uint32_t mode,
|
||||
struct grub_vbe_mode_info_block *mode_info);
|
||||
|
||||
grub_vbe_status_t EXPORT_FUNC(grub_vbe_bios_getset_dac_palette_width) (int set, int *width);
|
||||
|
||||
#define grub_vbe_bios_get_dac_palette_width(width) grub_vbe_bios_getset_dac_palette_width(0, (width))
|
||||
#define grub_vbe_bios_set_dac_palette_width(width) grub_vbe_bios_getset_dac_palette_width(1, (width))
|
||||
|
||||
/* Call VESA BIOS 0x4f02 to set video mode, return status. */
|
||||
grub_vbe_status_t EXPORT_FUNC(grub_vbe_bios_set_mode) (grub_uint32_t mode,
|
||||
struct grub_vbe_crtc_info_block *crtc_info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue