mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
* 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:
1 parent
c7064d9425
commit
4c6c9431d2
2 files changed
+21
No files matched your search
@@ -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 ();
|
||||
|
||||
Reference in new issue
Block a user