public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Daniel Mack <daniel@caiaq.de>
To: linux-kernel@vger.kernel.org
Cc: Daniel Mack <daniel@caiaq.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Andrea Righi <righi.andrea@gmail.com>
Subject: [PATCH] fbcon: make cursor display conditional
Date: Thu,  5 Nov 2009 10:17:38 +0100	[thread overview]
Message-ID: <1257412658-9444-1-git-send-email-daniel@caiaq.de> (raw)

For embedded systems, the blinking cursor at startup time can be
annoying and unintended. Add a new kernel parameter
'fbcon_disable_cursor' which disables it conditionally. The default
behaviour is unchanged.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Andrea Righi <righi.andrea@gmail.com>
---
 Documentation/kernel-parameters.txt |    3 +++
 drivers/video/console/fbcon.c       |   11 ++++++++++-
 2 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
index 9107b38..80ac54e 100644
--- a/Documentation/kernel-parameters.txt
+++ b/Documentation/kernel-parameters.txt
@@ -743,6 +743,9 @@ and is between 256 and 4096 characters. It is defined in the file
 			Format: <interval>,<probability>,<space>,<times>
 			See also /Documentation/fault-injection/.
 
+	fbcon_disable_cursor
+			Disable the cursor in the framebuffer console
+
 	fd_mcs=		[HW,SCSI]
 			See header of drivers/scsi/fd_mcs.c.
 
diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c
index 5a686ce..039aa86 100644
--- a/drivers/video/console/fbcon.c
+++ b/drivers/video/console/fbcon.c
@@ -116,6 +116,14 @@ static int fbcon_has_exited;
 static int primary_device = -1;
 static int fbcon_has_console_bind;
 
+static int fbcon_disable_cursor;
+static int __init _fbcon_disable_cursor(char *str)
+{
+	fbcon_disable_cursor = 1;
+	return 1;
+}
+__setup("fbcon_disable_cursor", _fbcon_disable_cursor);
+
 #ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY
 static int map_override;
 
@@ -1288,7 +1296,8 @@ static void fbcon_cursor(struct vc_data *vc, int mode)
 	int y;
  	int c = scr_readw((u16 *) vc->vc_pos);
 
-	if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1)
+	if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1 ||
+	    fbcon_disable_cursor)
 		return;
 
 	if (vc->vc_cursor_type & 0x10)
-- 
1.6.5


             reply	other threads:[~2009-11-05  9:18 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-05  9:17 Daniel Mack [this message]
2009-11-06  8:16 ` [PATCH] fbcon: make cursor display conditional Clemens Ladisch
2009-11-06 14:39   ` Andrea Righi
2009-11-06 16:45     ` Daniel Mack
2009-11-09  8:35       ` Clemens Ladisch
2009-11-09  9:10         ` Daniel Mack
2009-11-09  9:15           ` [PATCH] vt: make the default cursor shape configurable Clemens Ladisch
2009-11-09  9:53             ` Alan Cox
2009-11-09 11:26               ` Clemens Ladisch
2009-11-09 11:46                 ` Alan Cox
2009-11-09 12:21                   ` Clemens Ladisch
2009-11-09 14:50                   ` Daniel Mack
2009-11-09 17:58                     ` David Newall
2009-11-09 18:07                       ` Daniel Mack
2009-11-09 22:09                       ` Daniel Mack
2009-11-10 12:05                         ` David Newall
2009-11-10 12:30                           ` Daniel Mack
2009-11-10 12:36                             ` David Newall
2009-11-10 12:39                               ` Daniel Mack
2009-11-10 21:09                         ` Pavel Machek
2009-11-10 23:26                           ` Andrew Morton
2009-11-11  6:56                             ` Clemens Ladisch
2009-11-11  7:54                               ` Pavel Machek
2009-11-12 22:05                               ` Andrew Morton
2009-11-13  7:28                                 ` Clemens Ladisch

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=1257412658-9444-1-git-send-email-daniel@caiaq.de \
    --to=daniel@caiaq.de \
    --cc=akpm@linux-foundation.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=righi.andrea@gmail.com \
    /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