diff -urN -X dontdiff linux-2.4.18-pre9/Documentation/Configure.help linux-2.4.18-pre9-logo/Documentation/Configure.help --- linux-2.4.18-pre9/Documentation/Configure.help Fri Dec 21 09:41:53 2001 +++ linux-2.4.18-pre9-logo/Documentation/Configure.help Sat Feb 9 12:26:02 2002 @@ -3916,6 +3916,35 @@ (e.g. an accelerated X server) and that are not frame buffer device-aware may cause unexpected results. If unsure, say N. +Default framebuffer cursor blink rate +CONFIG_FB_DEFAULT_CURSOR_BLINK_RATE + Sets the default Frame Buffer cursor blink rate. + This setting can be changed at runtime using the /proc sysctl + interface if the option CONFIG_FB_PROC_FB_CURSOR_BLINK_RATE + has also been set. + + Negative values hide the cursor completely. This may be useful + embedded systems or with full screen boot logos. + + Zero makes cursor visible but non-blinking. + + Values larger than zero alter the blink rate as usual. (The + original default varied from 20 to 40 depending on architecture). + + Default is 20. + +Sysctl to modify framebuffer cursor blink rate +CONFIG_FB_PROC_CURSOR_BLINK_RATE + Add support for changing the Frame Buffer cursor blink rate at + runtime via sysctl /proc/sys/dev/fb/cursor_blink_rate. + + For some pretty graphical boots it may be convenient to set the + default cursor blink rate to negative values (i.e. hidden) and + then only on tty/user runlevels turn it on with + 'echo 0 > /proc/sys/dev/fb/cursor_blink_rate' + + If you don't need to change frame buffer cursor blink rate, say N. + Acorn VIDC support CONFIG_FB_ACORN This is the frame buffer device driver for the Acorn VIDC graphics diff -urN -X dontdiff linux-2.4.18-pre9/drivers/video/Config.in linux-2.4.18-pre9-logo/drivers/video/Config.in --- linux-2.4.18-pre9/drivers/video/Config.in Wed Nov 14 15:16:31 2001 +++ linux-2.4.18-pre9-logo/drivers/video/Config.in Sat Feb 9 12:22:06 2002 @@ -200,6 +200,9 @@ tristate ' Virtual Frame Buffer support (ONLY FOR TESTING!)' CONFIG_FB_VIRTUAL fi + int ' Default framebuffer cursor blink rate' CONFIG_FB_DEFAULT_CURSOR_BLINK_RATE 20 + bool ' Sysctl modifiable cursor blink rate support' CONFIG_FB_PROC_CURSOR_BLINK_RATE + bool ' Advanced low level driver options' CONFIG_FBCON_ADVANCED if [ "$CONFIG_FBCON_ADVANCED" = "y" ]; then tristate ' Monochrome support' CONFIG_FBCON_MFB diff -urN -X dontdiff linux-2.4.18-pre9/drivers/video/fbcon.c linux-2.4.18-pre9-logo/drivers/video/fbcon.c --- linux-2.4.18-pre9/drivers/video/fbcon.c Fri Feb 8 17:17:51 2002 +++ linux-2.4.18-pre9-logo/drivers/video/fbcon.c Sat Feb 9 12:22:06 2002 @@ -34,6 +34,9 @@ * 2001 - Documented with DocBook * - Brad Douglas * + * 2001 December + * Cursor blink rate sysctl support by Tommi Kyntola . + * * The low level operations for the various display memory organizations are * now in separate source files. * @@ -214,6 +217,11 @@ static int fbcon_show_logo(void); +#if defined(CONFIG_FB_PROC_CURSOR_BLINK_RATE) && defined(CONFIG_SYSCTL) +static void fbcon_sysctl_unregister(void); +static void fbcon_sysctl_register(void); +#endif + #ifdef CONFIG_MAC /* * On the Macintoy, there may or may not be a working VBL int. We need to probe @@ -460,6 +468,10 @@ add_timer(&cursor_timer); } +#ifdef CONFIG_FB_DEFAULT_CURSOR_BLINK_RATE + cursor_blink_rate = CONFIG_FB_DEFAULT_CURSOR_BLINK_RATE; +#endif /* CONFIG_FB_DEFAULT_CURSOR_BLINK_RATE */ + return display_desc; } @@ -492,6 +504,10 @@ conp->vc_display_fg = &info->display_fg; if (!info->display_fg) info->display_fg = conp; + +#if defined(CONFIG_FB_PROC_CURSOR_BLINK_RATE) && defined(CONFIG_SYSCTL) + fbcon_sysctl_register(); +#endif } @@ -500,6 +516,10 @@ int unit = conp->vc_num; struct display *p = &fb_display[unit]; +#if defined(CONFIG_FB_PROC_CURSOR_BLINK_RATE) && defined(CONFIG_SYSCTL) + fbcon_sysctl_unregister(); +#endif + fbcon_free_font(p); p->dispsw = &fbcon_dummy; p->conp = 0; @@ -929,10 +949,17 @@ { struct display *p; - if (!cursor_on) + /* + * Negative cursor_blink_rate will disable cursor completely. + * (this single check is actually sufficient, since this way + * the cursor_drawn will never reach nonzero values) + * We have to do this check here allow dynamic /proc changes, + * and best of all, no sync or locks needed for this approach. + */ + if (!cursor_on || cursor_blink_rate < 0) return; - if (vbl_cursor_cnt && --vbl_cursor_cnt == 0) { + if (vbl_cursor_cnt > 0 && --vbl_cursor_cnt <= 0) { p = &fb_display[fg_console]; if (p->dispsw->revc) p->dispsw->revc(p, p->cursor_x, real_y(p, p->cursor_y)); @@ -2488,6 +2515,50 @@ revc: DUMMY, }; +#if defined(CONFIG_FB_PROC_CURSOR_BLINK_RATE) && defined(CONFIG_SYSCTL) + +#include +#include + +ctl_table fb_table[] = { + {DEV_FB_CURSOR_BLINK_RATE, "cursor_blink_rate", &cursor_blink_rate, + sizeof(int), 0666, NULL, &proc_dointvec}, + {0} +}; + +ctl_table fb_fb_table[] = { + {DEV_FB, "fb", NULL, 0, 0555, fb_table}, + {0} +}; + +/* Make sure that /proc/sys/dev is there */ +ctl_table fb_root_table[] = { +#ifdef CONFIG_PROC_FS + {CTL_DEV, "dev", NULL, 0, 555, fb_fb_table}, +#endif /* CONFIG_PROC_FS */ + {0} +}; + +static struct ctl_table_header *fb_sysctl_header; + +static void fbcon_sysctl_register(void) { + static int initialized; + if (initialized == 1) + return; + + fb_sysctl_header = register_sysctl_table(fb_root_table, 1); + fb_root_table->child->de->owner = THIS_MODULE; + + initialized = 1; +} + +static void fbcon_sysctl_unregister(void) +{ + if (fb_sysctl_header) + unregister_sysctl_table(fb_sysctl_header); +} + +#endif /* CONFIG_SYSCTL && CONFIG_FB_PROC_CURSOR_BLINK_RATE */ /* * Visible symbols for modules diff -urN -X dontdiff linux-2.4.18-pre9/include/linux/sysctl.h linux-2.4.18-pre9-logo/include/linux/sysctl.h --- linux-2.4.18-pre9/include/linux/sysctl.h Mon Nov 26 05:29:17 2001 +++ linux-2.4.18-pre9-logo/include/linux/sysctl.h Sat Feb 9 12:22:06 2002 @@ -553,7 +553,8 @@ DEV_HWMON=2, DEV_PARPORT=3, DEV_RAID=4, - DEV_MAC_HID=5 + DEV_MAC_HID=5, + DEV_FB=6 }; /* /proc/sys/dev/cdrom */ @@ -612,6 +613,11 @@ DEV_MAC_HID_MOUSE_BUTTON2_KEYCODE=4, DEV_MAC_HID_MOUSE_BUTTON3_KEYCODE=5, DEV_MAC_HID_ADB_MOUSE_SENDS_KEYCODES=6 +}; + +/* /proc/sys/dev/fb */ +enum { + DEV_FB_CURSOR_BLINK_RATE=1, }; /* /proc/sys/abi */