Commit ca27ac4c authored by Rodolfo Giometti's avatar Rodolfo Giometti Committed by Linus Torvalds

[PATCH] au1100fb: 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=au1100fb:nocursor,panel:Toppoly_TD035STED4

or from sysfs interface:

   echo 1 > /sys/module/au1100fb/parameters/nocursor

- fix up some wrong indentation issues.
Signed-off-by: default avatarRodolfo Giometti <giometti@linux.it>
Signed-off-by: default avatarAntonino Daplas <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 53a04c6f
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
* <c.pellegrin@exadron.com> * <c.pellegrin@exadron.com>
* *
* PM support added by Rodolfo Giometti <giometti@linux.it> * PM support added by Rodolfo Giometti <giometti@linux.it>
* Cursor enable/disable by Rodolfo Giometti <giometti@linux.it>
* *
* Copyright 2002 MontaVista Software * Copyright 2002 MontaVista Software
* Author: MontaVista Software, Inc. * Author: MontaVista Software, Inc.
...@@ -110,6 +111,10 @@ static struct fb_var_screeninfo au1100fb_var __initdata = { ...@@ -110,6 +111,10 @@ static struct fb_var_screeninfo au1100fb_var __initdata = {
static struct au1100fb_drv_info drv_info; static struct au1100fb_drv_info drv_info;
static int nocursor = 0;
module_param(nocursor, int, 0644);
MODULE_PARM_DESC(nocursor, "cursor enable/disable");
/* /*
* Set hardware with var settings. This will enable the controller with a specific * Set hardware with var settings. This will enable the controller with a specific
* mode, normally validated with the fb_check_var method * mode, normally validated with the fb_check_var method
...@@ -422,6 +427,17 @@ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma) ...@@ -422,6 +427,17 @@ int au1100fb_fb_mmap(struct fb_info *fbi, struct vm_area_struct *vma)
return 0; return 0;
} }
/* fb_cursor
* Used to disable cursor drawing...
*/
int au1100fb_fb_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 au1100fb_ops = static struct fb_ops au1100fb_ops =
{ {
.owner = THIS_MODULE, .owner = THIS_MODULE,
...@@ -433,6 +449,7 @@ static struct fb_ops au1100fb_ops = ...@@ -433,6 +449,7 @@ static struct fb_ops au1100fb_ops =
.fb_imageblit = cfb_imageblit, .fb_imageblit = cfb_imageblit,
.fb_rotate = au1100fb_fb_rotate, .fb_rotate = au1100fb_fb_rotate,
.fb_mmap = au1100fb_fb_mmap, .fb_mmap = au1100fb_fb_mmap,
.fb_cursor = au1100fb_fb_cursor,
}; };
...@@ -677,7 +694,7 @@ int au1100fb_setup(char *options) ...@@ -677,7 +694,7 @@ int au1100fb_setup(char *options)
if (options) { if (options) {
while ((this_opt = strsep(&options,",")) != NULL) { while ((this_opt = strsep(&options,",")) != NULL) {
/* Panel option */ /* Panel option */
if (!strncmp(this_opt, "panel:", 6)) { if (!strncmp(this_opt, "panel:", 6)) {
int i; int i;
this_opt += 6; this_opt += 6;
for (i = 0; i < num_panels; i++) { for (i = 0; i < num_panels; i++) {
...@@ -685,13 +702,18 @@ int au1100fb_setup(char *options) ...@@ -685,13 +702,18 @@ int au1100fb_setup(char *options)
known_lcd_panels[i].name, known_lcd_panels[i].name,
strlen(this_opt))) { strlen(this_opt))) {
panel_idx = i; panel_idx = i;
break; break;
}
} }
}
if (i >= num_panels) { if (i >= num_panels) {
print_warn("Panel %s not supported!", this_opt); print_warn("Panel %s not supported!", this_opt);
} }
} }
if (!strncmp(this_opt, "nocursor", 8)) {
this_opt += 8;
nocursor = 1;
print_info("Cursor disabled");
}
/* Mode option (only option that start with digit) */ /* Mode option (only option that start with digit) */
else if (isdigit(this_opt[0])) { else if (isdigit(this_opt[0])) {
mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL); mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL);
...@@ -700,7 +722,7 @@ int au1100fb_setup(char *options) ...@@ -700,7 +722,7 @@ int au1100fb_setup(char *options)
/* Unsupported option */ /* Unsupported option */
else { else {
print_warn("Unsupported option \"%s\"", this_opt); print_warn("Unsupported option \"%s\"", this_opt);
} }
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment