aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndy Whitcroft <apw@canonical.com>2010-07-29 16:36:31 +0100
committerJohn Rigby <john.rigby@linaro.org>2012-05-20 23:42:10 -0600
commite58bd18f4fdc03197f6a072a0005d31f11aa2537 (patch)
tree138e5d48b66c8b1a94c087ba6cd34c6d87bb87c3
parent422939ae30778c0a9abf59b4e024849677edb5ec (diff)
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 <apw@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
-rw-r--r--drivers/tty/vt/vt.c7
-rw-r--r--include/linux/screen_info.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/tty/vt/vt.c b/drivers/tty/vt/vt.c
index 0e1affd0e1a..8ac94163ba8 100644
--- a/drivers/tty/vt/vt.c
+++ b/drivers/tty/vt/vt.c
@@ -2896,6 +2896,13 @@ static int __init con_init(void)
struct vc_data *vc;
unsigned int currcons = 0, i;
+ if (screen_info.flags & VIDEO_FLAGS_HANDOFF) {
+ if (vt_handoff == 0)
+ vt_handoff = 8;
+ printk(KERN_INFO "vt handoff: grub requested handoff (vt#%d)\n",
+ vt_handoff);
+ }
+
console_lock();
if (conswitchp)
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index 899fbb487c9..e699dd416f9 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;