mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Matthew Garrett <mjg@redhat.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, mjg@redhat.com, hpa@zytor.com,
	mingo@redhat.com, tglx@linutronix.de
Subject: [tip:x86/setup] x86, setup: Store the boot cursor state
Date: Sat, 14 Nov 2009 00:09:40 GMT	[thread overview]
Message-ID: <tip-d9b263528e01bfbaf716b51f38606b3dfe5ac1e9@git.kernel.org> (raw)
In-Reply-To: <1258142222-16092-1-git-send-email-mjg@redhat.com>

Commit-ID:  d9b263528e01bfbaf716b51f38606b3dfe5ac1e9
Gitweb:     http://git.kernel.org/tip/d9b263528e01bfbaf716b51f38606b3dfe5ac1e9
Author:     Matthew Garrett <mjg@redhat.com>
AuthorDate: Fri, 13 Nov 2009 14:57:00 -0500
Committer:  H. Peter Anvin <hpa@zytor.com>
CommitDate: Fri, 13 Nov 2009 14:23:11 -0800

x86, setup: Store the boot cursor state

Add a field to store the boot cursor state and implement this for VGA on
x86. This can then be used to set the default policy for the boot console.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
LKML-Reference: <1258142222-16092-1-git-send-email-mjg@redhat.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
---
 arch/x86/boot/video.c       |    6 ++++++
 include/linux/screen_info.h |    5 ++++-
 2 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/arch/x86/boot/video.c b/arch/x86/boot/video.c
index d42da38..f767164 100644
--- a/arch/x86/boot/video.c
+++ b/arch/x86/boot/video.c
@@ -27,6 +27,12 @@ static void store_cursor_position(void)
 
 	boot_params.screen_info.orig_x = oreg.dl;
 	boot_params.screen_info.orig_y = oreg.dh;
+
+	if (oreg.ch & 0x20)
+		boot_params.screen_info.flags |= VIDEO_FLAGS_NOCURSOR;
+
+	if ((oreg.ch & 0x1f) > (oreg.cl & 0x1f))
+		boot_params.screen_info.flags |= VIDEO_FLAGS_NOCURSOR;
 }
 
 static void store_video_mode(void)
diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
index 1ee2c05..899fbb4 100644
--- a/include/linux/screen_info.h
+++ b/include/linux/screen_info.h
@@ -14,7 +14,8 @@ struct screen_info {
 	__u16 orig_video_page;	/* 0x04 */
 	__u8  orig_video_mode;	/* 0x06 */
 	__u8  orig_video_cols;	/* 0x07 */
-	__u16 unused2;		/* 0x08 */
+	__u8  flags;		/* 0x08 */
+	__u8  unused2;		/* 0x09 */
 	__u16 orig_video_ega_bx;/* 0x0a */
 	__u16 unused3;		/* 0x0c */
 	__u8  orig_video_lines;	/* 0x0e */
@@ -65,6 +66,8 @@ struct screen_info {
 
 #define VIDEO_TYPE_EFI		0x70	/* EFI graphic mode		*/
 
+#define VIDEO_FLAGS_NOCURSOR	(1 << 0) /* The video mode has no cursor set */
+
 #ifdef __KERNEL__
 extern struct screen_info screen_info;
 

      parent reply	other threads:[~2009-11-14  0:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-13 19:57 [PATCH 1/3] " Matthew Garrett
2009-11-13 19:57 ` [PATCH 2/3] vc: Add support for hiding the cursor when creating VTs Matthew Garrett
2009-11-13 19:57   ` [PATCH 3/3] vgacon: Add support for setting the default cursor state Matthew Garrett
2009-11-14  0:10     ` [tip:x86/setup] " tip-bot for Matthew Garrett
2009-11-13 20:14   ` [PATCH v2] vc: Add support for hiding the cursor when creating VTs Matthew Garrett
2009-11-14  0:09     ` [tip:x86/setup] " tip-bot for Matthew Garrett
2009-11-13 22:38   ` [PATCH 2/3] " H. Peter Anvin
2009-11-13 22:41     ` Matthew Garrett
2009-11-13 21:51 ` [PATCH 1/3] setup: Store the boot cursor state H. Peter Anvin
2009-11-13 22:02   ` Matthew Garrett
2009-11-13 22:16     ` H. Peter Anvin
2009-11-14  0:09 ` tip-bot for Matthew Garrett [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-d9b263528e01bfbaf716b51f38606b3dfe5ac1e9@git.kernel.org \
    --to=mjg@redhat.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome