LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] pxafb: Add option to enable/disable the cursor
@ 2007-02-13 17:38 Rodolfo Giometti
  2007-02-13 17:48 ` Russell King
  0 siblings, 1 reply; 5+ messages in thread
From: Rodolfo Giometti @ 2007-02-13 17:38 UTC (permalink / raw)
  To: linux-arm-kernel; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 301 bytes --]

Add cursor enable/disable, very useful if you wish a full screen boot
logo.
    
Cursor can be disabled from kernel command line:
    
   video=pxafb:nocursor
    
or from sysfs interface:
    
   echo 1 > /sys/module/pxafb/parameters/nocursor
    
Signed-off-by: Rodolfo Giometti <giometti@linux.it>

[-- Attachment #2: patch-pxafb-nocursor --]
[-- Type: text/plain, Size: 1977 bytes --]

diff --git a/drivers/video/pxafb.c b/drivers/video/pxafb.c
index b4947c8..5d33501 100644
--- a/drivers/video/pxafb.c
+++ b/drivers/video/pxafb.c
@@ -9,6 +9,8 @@
  *  which in turn is
  *   Based on acornfb.c Copyright (C) Russell King.
  *
+ * Cursor enable/disable by Rodolfo Giometti <giometti@linux.it>
+ *
  * This file is subject to the terms and conditions of the GNU General Public
  * License.  See the file COPYING in the main directory of this archive for
  * more details.
@@ -54,6 +56,10 @@
 
 #include "pxafb.h"
 
+static int nocursor = 0;
+module_param(nocursor, int, 0644);
+MODULE_PARM_DESC(nocursor, "cursor enable/disable");
+
 /* Bits which should not be set in machine configuration structures */
 #define LCCR0_INVALID_CONFIG_MASK (LCCR0_OUM|LCCR0_BM|LCCR0_QDM|LCCR0_DIS|LCCR0_EFM|LCCR0_IUM|LCCR0_SFM|LCCR0_LDM|LCCR0_ENB)
 #define LCCR3_INVALID_CONFIG_MASK (LCCR3_HSP|LCCR3_VSP|LCCR3_PCD|LCCR3_BPP)
@@ -464,6 +470,17 @@ static int pxafb_mmap(struct fb_info *info,
 	return -EINVAL;
 }
 
+/* fb_cursor
+ * Used to disable cursor drawing...
+ */
+int pxafb_cursor(struct fb_info *info, struct fb_cursor *cursor)
+{
+	if (nocursor)
+		return 0;
+	else
+		return -EINVAL;	/* just to force soft_cursor() call */
+}
+
 static struct fb_ops pxafb_ops = {
 	.owner		= THIS_MODULE,
 	.fb_check_var	= pxafb_check_var,
@@ -474,6 +491,7 @@ static struct fb_ops pxafb_ops = {
 	.fb_imageblit	= cfb_imageblit,
 	.fb_blank	= pxafb_blank,
 	.fb_mmap	= pxafb_mmap,
+	.fb_cursor	= pxafb_cursor,
 };
 
 /*
@@ -1308,6 +1326,9 @@ static int __init pxafb_parse_options(struct device *dev, char *options)
 			inf->lccr0 = (inf->lccr0 & ~LCCR0_DPD) | LCCR0_4PixMono;
                 } else if (!strncmp(this_opt, "8pix", 4)) {
 			inf->lccr0 = (inf->lccr0 & ~LCCR0_DPD) | LCCR0_8PixMono;
+		} else if (!strncmp(this_opt, "nocursor", 8)) {
+			nocursor = 1;
+			dev_info(dev, "cursor disabled");
 		} else {
 			dev_err(dev, "unknown option: %s\n", this_opt);
 			return -EINVAL;

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pxafb: Add option to enable/disable the cursor
  2007-02-13 17:38 [PATCH] pxafb: Add option to enable/disable the cursor Rodolfo Giometti
@ 2007-02-13 17:48 ` Russell King
  2007-02-13 18:04   ` Rodolfo Giometti
  0 siblings, 1 reply; 5+ messages in thread
From: Russell King @ 2007-02-13 17:48 UTC (permalink / raw)
  To: Rodolfo Giometti; +Cc: linux-kernel

On Tue, Feb 13, 2007 at 06:38:05PM +0100, Rodolfo Giometti wrote:
> Add cursor enable/disable, very useful if you wish a full screen boot
> logo.

Maybe this should be a generic option?  Or maybe issue ESC [ 25 l
to disable the cursor if you're wanting to turn it off from userspace.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pxafb: Add option to enable/disable the cursor
  2007-02-13 17:48 ` Russell King
@ 2007-02-13 18:04   ` Rodolfo Giometti
  2007-02-13 18:22     ` James Simmons
  0 siblings, 1 reply; 5+ messages in thread
From: Rodolfo Giometti @ 2007-02-13 18:04 UTC (permalink / raw)
  To: linux-kernel

On Tue, Feb 13, 2007 at 05:48:29PM +0000, Russell King wrote:
> 
> Maybe this should be a generic option?  Or maybe issue ESC [ 25 l
> to disable the cursor if you're wanting to turn it off from userspace.

This is useful if you have a full screen boot logo. How I can issue
ESC [ 25 l at boot time?

Without this patch the full screen boot logo is corrupted in the upper
left corner with a little box containing the blinking cursor.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                     		giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pxafb: Add option to enable/disable the cursor
  2007-02-13 18:04   ` Rodolfo Giometti
@ 2007-02-13 18:22     ` James Simmons
  2007-02-15 13:23       ` Rodolfo Giometti
  0 siblings, 1 reply; 5+ messages in thread
From: James Simmons @ 2007-02-13 18:22 UTC (permalink / raw)
  To: Rodolfo Giometti; +Cc: linux-kernel


> On Tue, Feb 13, 2007 at 05:48:29PM +0000, Russell King wrote:
> > 
> > Maybe this should be a generic option?  Or maybe issue ESC [ 25 l
> > to disable the cursor if you're wanting to turn it off from userspace.
> 
> This is useful if you have a full screen boot logo. How I can issue
> ESC [ 25 l at boot time?
> 
> Without this patch the full screen boot logo is corrupted in the upper
> left corner with a little box containing the blinking cursor.

The reason you have a cursor is because you are using the framebuffer 
console. Do you need fbcon ? 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] pxafb: Add option to enable/disable the cursor
  2007-02-13 18:22     ` James Simmons
@ 2007-02-15 13:23       ` Rodolfo Giometti
  0 siblings, 0 replies; 5+ messages in thread
From: Rodolfo Giometti @ 2007-02-15 13:23 UTC (permalink / raw)
  To: James Simmons; +Cc: linux-kernel

On Tue, Feb 13, 2007 at 06:22:01PM +0000, James Simmons wrote:
> 
> The reason you have a cursor is because you are using the framebuffer 
> console. Do you need fbcon ? 

Yes. During the system update process on in the production stage a
console is very useful.

Ciao,

Rodolfo

-- 

GNU/Linux Solutions                  e-mail:    giometti@enneenne.com
Linux Device Driver                             giometti@gnudd.com
Embedded Systems                     		giometti@linux.it
UNIX programming                     phone:     +39 349 2432127

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-02-15 13:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-13 17:38 [PATCH] pxafb: Add option to enable/disable the cursor Rodolfo Giometti
2007-02-13 17:48 ` Russell King
2007-02-13 18:04   ` Rodolfo Giometti
2007-02-13 18:22     ` James Simmons
2007-02-15 13:23       ` Rodolfo Giometti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).