[PATCH 2/2] UBUNTU: SAUCE: vt -- allow grub to request automatic vt_handoff
Stefan Bader
stefan.bader at canonical.com
Thu Jul 29 16:00:35 UTC 2010
Looks simple enough.
Acked-by: Stefan Bader <stefan.bader at canonical.com>
On 07/29/2010 05:36 PM, Andy Whitcroft wrote:
> 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 at canonical.com>
> ---
> drivers/char/vt.c | 6 ++++++
> include/linux/screen_info.h | 1 +
> 2 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/char/vt.c b/drivers/char/vt.c
> index 2c64292..09f5632 100644
> --- a/drivers/char/vt.c
> +++ b/drivers/char/vt.c
> @@ -2885,6 +2885,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;
> + }
> +
> acquire_console_sem();
>
> 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;
More information about the kernel-team
mailing list