pxafb: Add option to enable/disable the cursor
PATCH 1/1 pxafb: Add option to enable/disable the cursor
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
drivers/video/pxafb.c +21 -0
@@ -9,6 +9,8 @@* which in turn is * Based on acornfb.c Copyright (C) Russell King. * +* Cursor enable/disable by Rodolfo Giometti <[email protected]> +* * 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 ;
Quoted 2 lines · Rodolfo Giometti
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.
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of:
Quoted 3 lines · Russell King
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
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems [email protected] UNIX programming phone: +39 349 2432127
Quoted 11 lines · Russell King
Quoted 3 lines
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 ?
Quoted 3 lines · James Simmons
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
Signature · 4 lines
GNU/Linux Solutions e-mail: [email protected] Linux Device Driver [email protected] Embedded Systems [email protected] UNIX programming phone: +39 349 2432127