2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>

Pass SIMPLE framebuffer size in bytes and not 64K blocks.

	* loader/i386/efi/linux.c (grub_linux_setup_video): Don't divide by 64K.
	* loader/i386/linux.c (grub_linux_setup_video): Likewise.
	(grub_linux_boot): Divide by 64K when on VESA.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-02-10 20:27:12 +01:00
parent 65a533e78a
commit 7cae4377a2
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,11 @@
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
Pass SIMPLE framebuffer size in bytes and not 64K blocks.
* loader/i386/efi/linux.c (grub_linux_setup_video): Don't divide by 64K.
* loader/i386/linux.c (grub_linux_setup_video): Likewise.
(grub_linux_boot): Divide by 64K when on VESA.
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
Support GRUB_GFXPAYLOAD_LINUX.

View File

@ -576,7 +576,7 @@ grub_linux_setup_video (struct linux_kernel_params *params)
params->lfb_line_len = line_len;
params->lfb_base = fb_base;
params->lfb_size = (line_len * params->lfb_height + 65535) >> 16;
params->lfb_size = ALIGN_UP (line_len * params->lfb_height, 65536);
params->red_mask_size = 8;
params->red_field_pos = 16;

View File

@ -410,7 +410,7 @@ grub_linux_setup_video (struct linux_kernel_params *params)
params->lfb_line_len = mode_info.pitch;
params->lfb_base = (grub_size_t) framebuffer;
params->lfb_size = (params->lfb_line_len * params->lfb_height + 65535) >> 16;
params->lfb_size = ALIGN_UP (params->lfb_line_len * params->lfb_height, 65536);
params->red_mask_size = mode_info.red_mask_size;
params->red_field_pos = mode_info.red_field_pos;
@ -543,6 +543,8 @@ grub_linux_boot (void)
/* Use generic framebuffer unless VESA is known to be supported. */
if (params->have_vga != GRUB_VIDEO_LINUX_TYPE_VESA)
params->have_vga = GRUB_VIDEO_LINUX_TYPE_SIMPLE;
else
params->lfb_size >>= 16;
}
else
{