]> git.proxmox.com Git - grub2.git/commitdiff
2010-02-10 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 10 Feb 2010 19:27:12 +0000 (20:27 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Wed, 10 Feb 2010 19:27:12 +0000 (20:27 +0100)
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.

ChangeLog
loader/i386/efi/linux.c
loader/i386/linux.c

index b4eb12a5409e3cc6aadedd5867f7bfd5bf823999..70353ec0c59295c5e770cd93735ed0fb248cdde1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index ebaf8974379997b3b942be925043a6cbc218b21f..a6db22e222e253c8916f2d0840ac0d7eb895ed0c 100644 (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;
index 630aec6f40cf48c85120352ab1851ed2b3a62dbe..d3d935182ac3177506b7cc7f38e3055523336aaf 100644 (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
     {