diff options
author | Rodolfo Giometti <giometti@linux.it> | 2006-10-03 04:14:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 11:04:09 -0400 |
commit | ca27ac4cc6caa73740122a5f3d601c8a27b89e7c (patch) | |
tree | 9ee1a21ff2300c97b3d164fa64be725f61c226b4 /drivers/video/au1100fb.c | |
parent | 53a04c6fb2e886efbc28b564d413bb5e70d79784 (diff) |
[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: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/au1100fb.c')
-rw-r--r-- | drivers/video/au1100fb.c | 30 |
1 files changed, 26 insertions, 4 deletions
diff --git a/drivers/video/au1100fb.c b/drivers/video/au1100fb.c index f25d5d648333..ef5c16f7f5a6 100644 --- a/drivers/video/au1100fb.c +++ b/drivers/video/au1100fb.c | |||
@@ -8,6 +8,7 @@ | |||
8 | * <c.pellegrin@exadron.com> | 8 | * <c.pellegrin@exadron.com> |
9 | * | 9 | * |
10 | * PM support added by Rodolfo Giometti <giometti@linux.it> | 10 | * PM support added by Rodolfo Giometti <giometti@linux.it> |
11 | * Cursor enable/disable by Rodolfo Giometti <giometti@linux.it> | ||
11 | * | 12 | * |
12 | * Copyright 2002 MontaVista Software | 13 | * Copyright 2002 MontaVista Software |
13 | * Author: MontaVista Software, Inc. | 14 | * Author: MontaVista Software, Inc. |
@@ -110,6 +111,10 @@ static struct fb_var_screeninfo au1100fb_var __initdata = { | |||
110 | 111 | ||
111 | static struct au1100fb_drv_info drv_info; | 112 | static struct au1100fb_drv_info drv_info; |
112 | 113 | ||
114 | static int nocursor = 0; | ||
115 | module_param(nocursor, int, 0644); | ||
116 | MODULE_PARM_DESC(nocursor, "cursor enable/disable"); | ||
117 | |||
113 | /* | 118 | /* |
114 | * Set hardware with var settings. This will enable the controller with a specific | 119 | * Set hardware with var settings. This will enable the controller with a specific |
115 | * mode, normally validated with the fb_check_var method | 120 | * 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 | return 0; | 427 | return 0; |
423 | } | 428 | } |
424 | 429 | ||
430 | /* fb_cursor | ||
431 | * Used to disable cursor drawing... | ||
432 | */ | ||
433 | int au1100fb_fb_cursor(struct fb_info *info, struct fb_cursor *cursor) | ||
434 | { | ||
435 | if (nocursor) | ||
436 | return 0; | ||
437 | else | ||
438 | return -EINVAL; /* just to force soft_cursor() call */ | ||
439 | } | ||
440 | |||
425 | static struct fb_ops au1100fb_ops = | 441 | static struct fb_ops au1100fb_ops = |
426 | { | 442 | { |
427 | .owner = THIS_MODULE, | 443 | .owner = THIS_MODULE, |
@@ -433,6 +449,7 @@ static struct fb_ops au1100fb_ops = | |||
433 | .fb_imageblit = cfb_imageblit, | 449 | .fb_imageblit = cfb_imageblit, |
434 | .fb_rotate = au1100fb_fb_rotate, | 450 | .fb_rotate = au1100fb_fb_rotate, |
435 | .fb_mmap = au1100fb_fb_mmap, | 451 | .fb_mmap = au1100fb_fb_mmap, |
452 | .fb_cursor = au1100fb_fb_cursor, | ||
436 | }; | 453 | }; |
437 | 454 | ||
438 | 455 | ||
@@ -677,7 +694,7 @@ int au1100fb_setup(char *options) | |||
677 | if (options) { | 694 | if (options) { |
678 | while ((this_opt = strsep(&options,",")) != NULL) { | 695 | while ((this_opt = strsep(&options,",")) != NULL) { |
679 | /* Panel option */ | 696 | /* Panel option */ |
680 | if (!strncmp(this_opt, "panel:", 6)) { | 697 | if (!strncmp(this_opt, "panel:", 6)) { |
681 | int i; | 698 | int i; |
682 | this_opt += 6; | 699 | this_opt += 6; |
683 | for (i = 0; i < num_panels; i++) { | 700 | for (i = 0; i < num_panels; i++) { |
@@ -685,13 +702,18 @@ int au1100fb_setup(char *options) | |||
685 | known_lcd_panels[i].name, | 702 | known_lcd_panels[i].name, |
686 | strlen(this_opt))) { | 703 | strlen(this_opt))) { |
687 | panel_idx = i; | 704 | panel_idx = i; |
688 | break; | 705 | break; |
706 | } | ||
689 | } | 707 | } |
690 | } | ||
691 | if (i >= num_panels) { | 708 | if (i >= num_panels) { |
692 | print_warn("Panel %s not supported!", this_opt); | 709 | print_warn("Panel %s not supported!", this_opt); |
693 | } | 710 | } |
694 | } | 711 | } |
712 | if (!strncmp(this_opt, "nocursor", 8)) { | ||
713 | this_opt += 8; | ||
714 | nocursor = 1; | ||
715 | print_info("Cursor disabled"); | ||
716 | } | ||
695 | /* Mode option (only option that start with digit) */ | 717 | /* Mode option (only option that start with digit) */ |
696 | else if (isdigit(this_opt[0])) { | 718 | else if (isdigit(this_opt[0])) { |
697 | mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL); | 719 | mode = kmalloc(strlen(this_opt) + 1, GFP_KERNEL); |
@@ -700,7 +722,7 @@ int au1100fb_setup(char *options) | |||
700 | /* Unsupported option */ | 722 | /* Unsupported option */ |
701 | else { | 723 | else { |
702 | print_warn("Unsupported option \"%s\"", this_opt); | 724 | print_warn("Unsupported option \"%s\"", this_opt); |
703 | } | 725 | } |
704 | } | 726 | } |
705 | } | 727 | } |
706 | 728 | ||