UBUNTU: SAUCE: vt -- allow grub to request automatic vt_handoff
authorAndy Whitcroft <apw@canonical.com>
Thu, 29 Jul 2010 15:36:31 +0000 (16:36 +0100)
committerLeann Ogasawara <leann.ogasawara@canonical.com>
Mon, 28 Mar 2011 13:49:06 +0000 (06:49 -0700)
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 <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>

drivers/tty/vt/vt.c
include/linux/screen_info.h

index 7ce6528..5ca9be1 100644 (file)
@@ -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)
index 899fbb4..e699dd4 100644 (file)
@@ -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;