* grub-core/video/fb/video_fb.c (grub_video_fb_get_info_and_fini):

Switch back to page zero before loading a kernel, since some kernel
drivers expect that.
Thanks to: Felix Kuehling.
This commit is contained in:
Colin Watson 2011-03-25 00:03:54 +00:00
parent c7064d9425
commit 4c6c9431d2
2 changed files with 21 additions and 0 deletions

View file

@ -1,3 +1,10 @@
2011-03-24 Colin Watson <cjwatson@ubuntu.com>
* grub-core/video/fb/video_fb.c (grub_video_fb_get_info_and_fini):
Switch back to page zero before loading a kernel, since some kernel
drivers expect that.
Thanks to: Felix Kuehling.
2011-03-24 Vladimir Serbinenko <phcoder@gmail.com>
* grub-core/lib/relocator.c (grub_relocator_alloc_chunk_addr)

View file

@ -1505,6 +1505,20 @@ grub_video_fb_get_info_and_fini (struct grub_video_mode_info *mode_info,
{
grub_memcpy (mode_info, &(framebuffer.front_target->mode_info),
sizeof (*mode_info));
/* We are about to load a kernel. Switch back to page zero, since some
kernel drivers expect that. */
if ((mode_info->mode_type & GRUB_VIDEO_MODE_TYPE_DOUBLE_BUFFERED)
&& framebuffer.set_page && framebuffer.displayed_page != 0)
{
/* Ensure both pages are exactly in sync. */
grub_memcpy (framebuffer.back_target->data,
framebuffer.front_target->data,
framebuffer.back_target->mode_info.pitch
* framebuffer.back_target->mode_info.height);
grub_video_swap_buffers ();
}
*framebuf = framebuffer.front_target->data;
grub_video_fb_fini ();