From f6c06b6807ff9281295989ebad72523865325a4f Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 13 Nov 2009 15:14:11 -0500 Subject: vc: Add support for hiding the cursor when creating VTs Add support for setting a global default for whether or not a visible cursor should be enabled when creating VCs. The default will be to do so, unless overridden by the user at boot time or by a driver. Signed-off-by: Matthew Garrett LKML-Reference: <1258143251-5818-1-git-send-email-mjg@redhat.com> Signed-off-by: H. Peter Anvin --- drivers/video/console/vgacon.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/video') diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index da55ccaf4d5..564643edb3c 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -585,6 +585,8 @@ static void vgacon_init(struct vc_data *c, int init) vgacon_uni_pagedir[1]++; if (!vgacon_uni_pagedir[0] && p) con_set_default_unimap(c); + + hide_boot_cursor(screen_info.flags & VIDEO_FLAGS_NOCURSOR); } static void vgacon_deinit(struct vc_data *c) -- cgit v1.2.3 From b434a680a29424856e0f40199daa9f65963c7cb4 Mon Sep 17 00:00:00 2001 From: Matthew Garrett Date: Fri, 13 Nov 2009 14:57:02 -0500 Subject: vgacon: Add support for setting the default cursor state Pass the vga cursor state to the vt layer, ensuring that we don't hide the cursor when the bootloader has deliberately disabled it. Signed-off-by: Matthew Garrett LKML-Reference: <1258142222-16092-3-git-send-email-mjg@redhat.com> Signed-off-by: H. Peter Anvin --- drivers/video/console/vgacon.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'drivers/video') diff --git a/drivers/video/console/vgacon.c b/drivers/video/console/vgacon.c index 564643edb3c..cc4bbbe44ac 100644 --- a/drivers/video/console/vgacon.c +++ b/drivers/video/console/vgacon.c @@ -586,7 +586,10 @@ static void vgacon_init(struct vc_data *c, int init) if (!vgacon_uni_pagedir[0] && p) con_set_default_unimap(c); - hide_boot_cursor(screen_info.flags & VIDEO_FLAGS_NOCURSOR); + /* Only set the default if the user didn't deliberately override it */ + if (global_cursor_default == -1) + global_cursor_default = + !(screen_info.flags & VIDEO_FLAGS_NOCURSOR); } static void vgacon_deinit(struct vc_data *c) -- cgit v1.2.3