From d958f505cc5d66f8f5275bd6d0e20e2e0d59233b Mon Sep 17 00:00:00 2001 From: Andy Whitcroft Date: Thu, 29 Jul 2010 16:36:31 +0100 Subject: [PATCH] UBUNTU: SAUCE: vt -- allow grub to request automatic vt_handoff Grub may be able to select a graphics mode and paint a splash screen for us. If so it needs to be able to tell us it has done so. Add support for detecting a new graphics mode selected bit in the screen_info passed over at boot. Use this to automatically enable vt_handoff mode. Signed-off-by: Andy Whitcroft Acked-by: Stefan Bader Signed-off-by: Leann Ogasawara --- drivers/tty/vt/vt.c | 6 ++++++ include/linux/screen_info.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c index 7ce6528..5ca9be1 100644 --- a/drivers/tty/vt/vt.c +++ b/drivers/tty/vt/vt.c @@ -2904,6 +2904,12 @@ static int __init con_init(void) struct vc_data *vc; unsigned int currcons = 0, i; + if (screen_info.flags & VIDEO_FLAGS_HANDOFF) { + printk(KERN_INFO "vt handoff: grub requested handoff (vt#8)\n"); + if (vt_handoff == -1) + vt_handoff = 8; + } + console_lock(); if (conswitchp) diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h index 899fbb4..e699dd4 100644 --- a/include/linux/screen_info.h +++ b/include/linux/screen_info.h @@ -67,6 +67,7 @@ struct screen_info { #define VIDEO_TYPE_EFI 0x70 /* EFI graphic mode */ #define VIDEO_FLAGS_NOCURSOR (1 << 0) /* The video mode has no cursor set */ +#define VIDEO_FLAGS_HANDOFF (1 << 1) /* Video buffer is alredy painted */ #ifdef __KERNEL__ extern struct screen_info screen_info; -- 1.7.10.4