|
View:
New views
20 Messages
—
Rating Filter:
Alert me
|
| < Prev | 1 - 2 | Next > |
|
|
[PATCH] fbcon: make cursor display conditionalFor embedded systems, the blinking cursor at startup time can be
annoying and unintended. Add a new kernel parameter 'fbcon_disable_cursor' which disables it conditionally. The default behaviour is unchanged. Signed-off-by: Daniel Mack <daniel@...> Cc: Andrew Morton <akpm@...> Cc: Geert Uytterhoeven <geert@...> Cc: Andrea Righi <righi.andrea@...> --- Documentation/kernel-parameters.txt | 3 +++ drivers/video/console/fbcon.c | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletions(-) diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index 9107b38..80ac54e 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -743,6 +743,9 @@ and is between 256 and 4096 characters. It is defined in the file Format: <interval>,<probability>,<space>,<times> See also /Documentation/fault-injection/. + fbcon_disable_cursor + Disable the cursor in the framebuffer console + fd_mcs= [HW,SCSI] See header of drivers/scsi/fd_mcs.c. diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 5a686ce..039aa86 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -116,6 +116,14 @@ static int fbcon_has_exited; static int primary_device = -1; static int fbcon_has_console_bind; +static int fbcon_disable_cursor; +static int __init _fbcon_disable_cursor(char *str) +{ + fbcon_disable_cursor = 1; + return 1; +} +__setup("fbcon_disable_cursor", _fbcon_disable_cursor); + #ifdef CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY static int map_override; @@ -1288,7 +1296,8 @@ static void fbcon_cursor(struct vc_data *vc, int mode) int y; int c = scr_readw((u16 *) vc->vc_pos); - if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1) + if (fbcon_is_inactive(vc, info) || vc->vc_deccm != 1 || + fbcon_disable_cursor) return; if (vc->vc_cursor_type & 0x10) -- 1.6.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] fbcon: make cursor display conditionalDaniel Mack wrote:
> For embedded systems, the blinking cursor at startup time can be > annoying and unintended. Add a new kernel parameter > 'fbcon_disable_cursor' which disables it conditionally. Wouldn't it be more useful to change the CUR_DEFAULT symbol (see the end of <linux/console_struct.h>) into a kernel parameter, instead of adding a new flag? Best regards, Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] fbcon: make cursor display conditionalOn Fri, Nov 06, 2009 at 09:16:44AM +0100, Clemens Ladisch wrote:
> Daniel Mack wrote: > > For embedded systems, the blinking cursor at startup time can be > > annoying and unintended. Add a new kernel parameter > > 'fbcon_disable_cursor' which disables it conditionally. > > Wouldn't it be more useful to change the CUR_DEFAULT symbol (see the > end of <linux/console_struct.h>) into a kernel parameter, instead of > adding a new flag? Agreed. There's no need to choose if we want the blinking cursor or not at each boot. Better to make this decision at compile time. -Andrea -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] fbcon: make cursor display conditionalOn Fri, Nov 06, 2009 at 03:39:18PM +0100, Andrea Righi wrote:
> On Fri, Nov 06, 2009 at 09:16:44AM +0100, Clemens Ladisch wrote: > > Daniel Mack wrote: > > > For embedded systems, the blinking cursor at startup time can be > > > annoying and unintended. Add a new kernel parameter > > > 'fbcon_disable_cursor' which disables it conditionally. > > > > Wouldn't it be more useful to change the CUR_DEFAULT symbol (see the > > end of <linux/console_struct.h>) into a kernel parameter, instead of > > adding a new flag? > > Agreed. There's no need to choose if we want the blinking cursor or not > at each boot. Better to make this decision at compile time. Ok, much better idea, I agree. See the patch below. Thanks for the input, Daniel From 8192226c1cdda90ef0d73a55c02f632693065310 Mon Sep 17 00:00:00 2001 From: Daniel Mack <daniel@...> Date: Fri, 6 Nov 2009 17:31:00 +0100 Subject: [PATCH] char/console: make default cursor type configurable Make the default console cursor type configurable rather than hard-coding it. Signed-off-by: Daniel Mack <daniel@...> Cc: Clemens Ladisch <clemens@...> Cc: Andrew Morton <akpm@...> Cc: Geert Uytterhoeven <geert@...> --- drivers/char/Kconfig | 27 +++++++++++++++++++++++++++ drivers/char/vt.c | 23 +++++++++++++++++++++++ include/linux/console_struct.h | 2 -- 3 files changed, 50 insertions(+), 2 deletions(-) diff --git a/drivers/char/Kconfig b/drivers/char/Kconfig index 6aad99e..1e01ea4 100644 --- a/drivers/char/Kconfig +++ b/drivers/char/Kconfig @@ -88,6 +88,33 @@ config VT_HW_CONSOLE_BINDING information. For framebuffer console users, please refer to <file:Documentation/fb/fbcon.txt>. +choice + prompt "Console default cursor type" + depends on HW_CONSOLE + default CONSOLE_DEF_CUR_UNDERLINE + help + This option selects the default cursor type for the text console. + +config CONSOLE_DEF_CUR_NONE + bool "none" + +config CONSOLE_DEF_CUR_UNDERLINE + bool "underline" + +config CONSOLE_DEF_CUR_LOWER_THIRD + bool "lower third" + +config CONSOLE_DEF_CUR_LOWER_HALF + bool "lower half" + +config CONSOLE_DEF_CUR_TWO_THIRDS + bool "two thirds" + +config CONSOLE_DEF_CUR_BLOCK + bool "block" + +endchoice + config DEVKMEM bool "/dev/kmem virtual device support" default y diff --git a/drivers/char/vt.c b/drivers/char/vt.c index 0c80c68..0078f6e 100644 --- a/drivers/char/vt.c +++ b/drivers/char/vt.c @@ -111,6 +111,29 @@ #define CON_DRIVER_FLAG_INIT 2 #define CON_DRIVER_FLAG_ATTR 4 +#if defined(CONFIG_CONSOLE_DEF_CUR_NONE) +#define CUR_DEFAULT CUR_NONE + +#elif defined(CONFIG_CONSOLE_DEF_CUR_UNDERLINE) +#define CUR_DEFAULT CUR_UNDERLINE + +#elif defined(CONFIG_CONSOLE_DEF_CUR_LOWER_THIRD) +#define CUR_DEFAULT CUR_LOWER_THIRD + +#elif defined(CONFIG_CONSOLE_DEF_CUR_LOWER_HALF) +#define CUR_DEFAULT CUR_LOWER_HALF + +#elif defined(CONFIG_CONSOLE_DEF_CUR_TWO_THIRDS) +#define CUR_DEFAULT CUR_TWO_THIRDS + +#elif defined(CONFIG_CONSOLE_DEF_CUR_BLOCK) +#define CUR_DEFAULT CUR_BLOCK + +#else +#warning "no default console cursor type defined, defaulting to 'underline'" +#define CUR_DEFAULT CUR_UNDERLINE +#endif + struct con_driver { const struct consw *con; const char *desc; diff --git a/include/linux/console_struct.h b/include/linux/console_struct.h index 38fe59d..6c024a0 100644 --- a/include/linux/console_struct.h +++ b/include/linux/console_struct.h @@ -130,8 +130,6 @@ extern void vc_SAK(struct work_struct *work); #define CUR_HWMASK 0x0f #define CUR_SWMASK 0xfff0 -#define CUR_DEFAULT CUR_UNDERLINE - #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) #endif /* _LINUX_CONSOLE_STRUCT_H */ -- 1.6.5.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] fbcon: make cursor display conditionalDaniel Mack wrote:
> > On Fri, Nov 06, 2009 at 09:16:44AM +0100, Clemens Ladisch wrote: > > > Wouldn't it be more useful to change the CUR_DEFAULT symbol (see the > > > end of <linux/console_struct.h>) into a kernel parameter, instead of > > > adding a new flag? > > Ok, much better idea, I agree. See the patch below. > > Subject: [PATCH] char/console: make default cursor type configurable > > --- a/drivers/char/vt.c > +++ b/drivers/char/vt.c > +#if defined(CONFIG_CONSOLE_DEF_CUR_NONE) > +#define CUR_DEFAULT CUR_NONE > + > +#elif defined(CONFIG_CONSOLE_DEF_CUR_UNDERLINE) > +#define CUR_DEFAULT CUR_UNDERLINE > +... With a separate Kconfig variable, we can avoid having to put the parallel list into vt.c. Furthermore, we can add options for the software cursor while we're at it; something like this: Signed-off-by: Clemens Ladisch <clemens@...> --- linux-2.6/include/linux/console_struct.h +++ linux-2.6/include/linux/console_struct.h @@ -130,8 +130,6 @@ extern void vc_SAK(struct work_struct *w #define CUR_HWMASK 0x0f #define CUR_SWMASK 0xfff0 -#define CUR_DEFAULT CUR_UNDERLINE - #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) #endif /* _LINUX_CONSOLE_STRUCT_H */ --- linux-2.6/drivers/char/vt.c +++ linux-2.6/drivers/char/vt.c @@ -138,6 +138,11 @@ const struct consw *conswitchp; #define DEFAULT_BELL_PITCH 750 #define DEFAULT_BELL_DURATION (HZ/8) +#define CUR_DEFAULT (CONFIG_CUR_DEFAULT_HW | \ + CONFIG_CUR_DEFAULT_SW_FLAGS | \ + (CONFIG_CUR_DEFAULT_SW_ATTR_XOR << 8) | \ + (CONFIG_CUR_DEFAULT_SW_ATTR_SET << 16)) + struct vc vc_cons [MAX_NR_CONSOLES]; #ifndef VT_SINGLE_DRIVER --- linux-2.6/drivers/char/Kconfig +++ linux-2.6/drivers/char/Kconfig @@ -88,6 +88,104 @@ config VT_HW_CONSOLE_BINDING information. For framebuffer console users, please refer to <file:Documentation/fb/fbcon.txt>. +choice + prompt "Default hardware cursor shape" + depends on HW_CONSOLE + default CUR_DEFAULT_UNDERLINE + help + Select the default shape of the blinking hardware cursor. + + config CUR_DEFAULT_DEF + bool "Default" + config CUR_DEFAULT_NONE + bool "None" + config CUR_DEFAULT_UNDERLINE + bool "Underline" + config CUR_DEFAULT_LOWER_THIRD + bool "Lower third" + config CUR_DEFAULT_LOWER_HALF + bool "Lower half" + config CUR_DEFAULT_TWO_THIRDS + bool "Two thirds" + config CUR_DEFAULT_BLOCK + bool "Block" +endchoice + +config CUR_DEFAULT_HW + depends on HW_CONSOLE + int + default 0 if CUR_DEFAULT_DEF + default 1 if CUR_DEFAULT_NONE + default 2 if CUR_DEFAULT_UNDERLINE + default 3 if CUR_DEFAULT_LOWER_THIRD + default 4 if CUR_DEFAULT_LOWER_HALF + default 5 if CUR_DEFAULT_TWO_THIRDS + default 6 if CUR_DEFAULT_BLOCK + +config CUR_DEFAULT_SW + bool "Use software cursor by default" + depends on HW_CONSOLE + default n + help + The software cursor allows you to customize the appearance of the + cursor; this is done by changing the attributes (the color) of the + character under the cursor. + + See <file:Documentation/VGA-softcursor.txt> for more information. + +config CUR_DEFAULT_SW_ATTR_XOR + depends on HW_CONSOLE + prompt "Software cursor changed attribute bits" if CUR_DEFAULT_SW + int + range 0 255 + default 0 + help + Enter the character attribute bits that are changed by the + software cursor. This is equivalent to the second parameter + of the <ESC>[?1;2;3c escape sequence; for more information, + see <file:Documentation/VGA-softcursor.txt>. + +config CUR_DEFAULT_SW_ATTR_SET + depends on HW_CONSOLE + prompt "Software cursor set attribute bits" if CUR_DEFAULT_SW + int + range 0 255 + default 0 + help + Enter the character attribute bits that are set by the + software cursor. This is equivalent to the third parameter + of the <ESC>[?1;2;3c escape sequence; for more information, + see <file:Documentation/VGA-softcursor.txt>. + +config CUR_DEFAULT_SW_CHANGE_BKGND + bool "Software cursor always changes background" + depends on CUR_DEFAULT_SW + default y + help + If you say Y here, the software cursor will ensure that the + background color of the character under the cursor is changed, + even if the cursor color is the same as the original character's + color. + +config CUR_DEFAULT_SW_BKGND_DIFFERENT + bool "Software cursor makes foreground color different from background" + depends on CUR_DEFAULT_SW + default y + help + If you say Y here, the software cursor will ensure that the + foreground color of the character under the cursor is different + from the background color. + +config CUR_DEFAULT_SW_FLAGS + depends on HW_CONSOLE + int + default 0 if !CUR_DEFAULT_SW + # 16 + (32 if CHANGE_BKGND) + (64 if BKGND_DIFFERENT): + default 16 if !CUR_DEFAULT_SW_CHANGE_BKGND && !CUR_DEFAULT_SW_BKGND_DIFFERENT + default 48 if CUR_DEFAULT_SW_CHANGE_BKGND && !CUR_DEFAULT_SW_BKGND_DIFFERENT + default 80 if !CUR_DEFAULT_SW_CHANGE_BKGND && CUR_DEFAULT_SW_BKGND_DIFFERENT + default 112 if CUR_DEFAULT_SW_CHANGE_BKGND && CUR_DEFAULT_SW_BKGND_DIFFERENT + config DEVKMEM bool "/dev/kmem virtual device support" default y -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] fbcon: make cursor display conditionalOn Mon, Nov 09, 2009 at 09:35:05AM +0100, Clemens Ladisch wrote:
> Daniel Mack wrote: > > > On Fri, Nov 06, 2009 at 09:16:44AM +0100, Clemens Ladisch wrote: > > > > Wouldn't it be more useful to change the CUR_DEFAULT symbol (see the > > > > end of <linux/console_struct.h>) into a kernel parameter, instead of > > > > adding a new flag? > > > > Ok, much better idea, I agree. See the patch below. > > > > Subject: [PATCH] char/console: make default cursor type configurable > > > > --- a/drivers/char/vt.c > > +++ b/drivers/char/vt.c > > +#if defined(CONFIG_CONSOLE_DEF_CUR_NONE) > > +#define CUR_DEFAULT CUR_NONE > > + > > +#elif defined(CONFIG_CONSOLE_DEF_CUR_UNDERLINE) > > +#define CUR_DEFAULT CUR_UNDERLINE > > +... > > With a separate Kconfig variable, we can avoid having to put the > parallel list into vt.c. > > Furthermore, we can add options for the software cursor while we're > at it; something like this: > > Signed-off-by: Clemens Ladisch <clemens@...> Wonderful, thank you. For my bits, you can add my Signed-off-by if that's appropriate. Daniel > --- linux-2.6/include/linux/console_struct.h > +++ linux-2.6/include/linux/console_struct.h > @@ -130,8 +130,6 @@ extern void vc_SAK(struct work_struct *w > #define CUR_HWMASK 0x0f > #define CUR_SWMASK 0xfff0 > > -#define CUR_DEFAULT CUR_UNDERLINE > - > #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) > > #endif /* _LINUX_CONSOLE_STRUCT_H */ > --- linux-2.6/drivers/char/vt.c > +++ linux-2.6/drivers/char/vt.c > @@ -138,6 +138,11 @@ const struct consw *conswitchp; > #define DEFAULT_BELL_PITCH 750 > #define DEFAULT_BELL_DURATION (HZ/8) > > +#define CUR_DEFAULT (CONFIG_CUR_DEFAULT_HW | \ > + CONFIG_CUR_DEFAULT_SW_FLAGS | \ > + (CONFIG_CUR_DEFAULT_SW_ATTR_XOR << 8) | \ > + (CONFIG_CUR_DEFAULT_SW_ATTR_SET << 16)) > + > struct vc vc_cons [MAX_NR_CONSOLES]; > > #ifndef VT_SINGLE_DRIVER > --- linux-2.6/drivers/char/Kconfig > +++ linux-2.6/drivers/char/Kconfig > @@ -88,6 +88,104 @@ config VT_HW_CONSOLE_BINDING > information. For framebuffer console users, please refer to > <file:Documentation/fb/fbcon.txt>. > > +choice > + prompt "Default hardware cursor shape" > + depends on HW_CONSOLE > + default CUR_DEFAULT_UNDERLINE > + help > + Select the default shape of the blinking hardware cursor. > + > + config CUR_DEFAULT_DEF > + bool "Default" > + config CUR_DEFAULT_NONE > + bool "None" > + config CUR_DEFAULT_UNDERLINE > + bool "Underline" > + config CUR_DEFAULT_LOWER_THIRD > + bool "Lower third" > + config CUR_DEFAULT_LOWER_HALF > + bool "Lower half" > + config CUR_DEFAULT_TWO_THIRDS > + bool "Two thirds" > + config CUR_DEFAULT_BLOCK > + bool "Block" > +endchoice > + > +config CUR_DEFAULT_HW > + depends on HW_CONSOLE > + int > + default 0 if CUR_DEFAULT_DEF > + default 1 if CUR_DEFAULT_NONE > + default 2 if CUR_DEFAULT_UNDERLINE > + default 3 if CUR_DEFAULT_LOWER_THIRD > + default 4 if CUR_DEFAULT_LOWER_HALF > + default 5 if CUR_DEFAULT_TWO_THIRDS > + default 6 if CUR_DEFAULT_BLOCK > + > +config CUR_DEFAULT_SW > + bool "Use software cursor by default" > + depends on HW_CONSOLE > + default n > + help > + The software cursor allows you to customize the appearance of the > + cursor; this is done by changing the attributes (the color) of the > + character under the cursor. > + > + See <file:Documentation/VGA-softcursor.txt> for more information. > + > +config CUR_DEFAULT_SW_ATTR_XOR > + depends on HW_CONSOLE > + prompt "Software cursor changed attribute bits" if CUR_DEFAULT_SW > + int > + range 0 255 > + default 0 > + help > + Enter the character attribute bits that are changed by the > + software cursor. This is equivalent to the second parameter > + of the <ESC>[?1;2;3c escape sequence; for more information, > + see <file:Documentation/VGA-softcursor.txt>. > + > +config CUR_DEFAULT_SW_ATTR_SET > + depends on HW_CONSOLE > + prompt "Software cursor set attribute bits" if CUR_DEFAULT_SW > + int > + range 0 255 > + default 0 > + help > + Enter the character attribute bits that are set by the > + software cursor. This is equivalent to the third parameter > + of the <ESC>[?1;2;3c escape sequence; for more information, > + see <file:Documentation/VGA-softcursor.txt>. > + > +config CUR_DEFAULT_SW_CHANGE_BKGND > + bool "Software cursor always changes background" > + depends on CUR_DEFAULT_SW > + default y > + help > + If you say Y here, the software cursor will ensure that the > + background color of the character under the cursor is changed, > + even if the cursor color is the same as the original character's > + color. > + > +config CUR_DEFAULT_SW_BKGND_DIFFERENT > + bool "Software cursor makes foreground color different from background" > + depends on CUR_DEFAULT_SW > + default y > + help > + If you say Y here, the software cursor will ensure that the > + foreground color of the character under the cursor is different > + from the background color. > + > +config CUR_DEFAULT_SW_FLAGS > + depends on HW_CONSOLE > + int > + default 0 if !CUR_DEFAULT_SW > + # 16 + (32 if CHANGE_BKGND) + (64 if BKGND_DIFFERENT): > + default 16 if !CUR_DEFAULT_SW_CHANGE_BKGND && !CUR_DEFAULT_SW_BKGND_DIFFERENT > + default 48 if CUR_DEFAULT_SW_CHANGE_BKGND && !CUR_DEFAULT_SW_BKGND_DIFFERENT > + default 80 if !CUR_DEFAULT_SW_CHANGE_BKGND && CUR_DEFAULT_SW_BKGND_DIFFERENT > + default 112 if CUR_DEFAULT_SW_CHANGE_BKGND && CUR_DEFAULT_SW_BKGND_DIFFERENT > + > config DEVKMEM > bool "/dev/kmem virtual device support" > default y To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
[PATCH] vt: make the default cursor shape configurableMake the default console cursor type configurable rather than
hard-coding it. Signed-off-by: Daniel Mack <daniel@...> Signed-off-by: Clemens Ladisch <clemens@...> --- linux-2.6/include/linux/console_struct.h +++ linux-2.6/include/linux/console_struct.h @@ -130,8 +130,6 @@ extern void vc_SAK(struct work_struct *w #define CUR_HWMASK 0x0f #define CUR_SWMASK 0xfff0 -#define CUR_DEFAULT CUR_UNDERLINE - #define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp) #endif /* _LINUX_CONSOLE_STRUCT_H */ --- linux-2.6/drivers/char/vt.c +++ linux-2.6/drivers/char/vt.c @@ -138,6 +138,11 @@ const struct consw *conswitchp; #define DEFAULT_BELL_PITCH 750 #define DEFAULT_BELL_DURATION (HZ/8) +#define CUR_DEFAULT (CONFIG_CUR_DEFAULT_HW | \ + CONFIG_CUR_DEFAULT_SW_FLAGS | \ + (CONFIG_CUR_DEFAULT_SW_ATTR_XOR << 8) | \ + (CONFIG_CUR_DEFAULT_SW_ATTR_SET << 16)) + struct vc vc_cons [MAX_NR_CONSOLES]; #ifndef VT_SINGLE_DRIVER --- linux-2.6/drivers/char/Kconfig +++ linux-2.6/drivers/char/Kconfig @@ -88,6 +88,104 @@ config VT_HW_CONSOLE_BINDING information. For framebuffer console users, please refer to <file:Documentation/fb/fbcon.txt>. +choice + prompt "Default hardware cursor shape" + depends on HW_CONSOLE + default CUR_DEFAULT_UNDERLINE + help + Select the default shape of the blinking hardware cursor. + + config CUR_DEFAULT_DEF + bool "Default" + config CUR_DEFAULT_NONE + bool "None" + config CUR_DEFAULT_UNDERLINE + bool "Underline" + config CUR_DEFAULT_LOWER_THIRD + bool "Lower third" + config CUR_DEFAULT_LOWER_HALF + bool "Lower half" + config CUR_DEFAULT_TWO_THIRDS + bool "Two thirds" + config CUR_DEFAULT_BLOCK + bool "Block" +endchoice + +config CUR_DEFAULT_HW + depends on HW_CONSOLE + int + default 0 if CUR_DEFAULT_DEF + default 1 if CUR_DEFAULT_NONE + default 2 if CUR_DEFAULT_UNDERLINE + default 3 if CUR_DEFAULT_LOWER_THIRD + default 4 if CUR_DEFAULT_LOWER_HALF + default 5 if CUR_DEFAULT_TWO_THIRDS + default 6 if CUR_DEFAULT_BLOCK + +config CUR_DEFAULT_SW + bool "Use software cursor by default" + depends on HW_CONSOLE + default n + help + The software cursor allows you to customize the appearance of the + cursor; this is done by changing the attributes (the color) of the + character under the cursor. + + See <file:Documentation/VGA-softcursor.txt> for more information. + +config CUR_DEFAULT_SW_ATTR_XOR + depends on HW_CONSOLE + prompt "Software cursor changed attribute bits" if CUR_DEFAULT_SW + int + range 0 255 + default 0 + help + Enter the character attribute bits that are changed by the + software cursor. This is equivalent to the second parameter + of the <ESC>[?1;2;3c escape sequence; for more information, + see <file:Documentation/VGA-softcursor.txt>. + +config CUR_DEFAULT_SW_ATTR_SET + depends on HW_CONSOLE + prompt "Software cursor set attribute bits" if CUR_DEFAULT_SW + int + range 0 255 + default 0 + help + Enter the character attribute bits that are set by the + software cursor. This is equivalent to the third parameter + of the <ESC>[?1;2;3c escape sequence; for more information, + see <file:Documentation/VGA-softcursor.txt>. + +config CUR_DEFAULT_SW_CHANGE_BKGND + bool "Software cursor always changes background" + depends on CUR_DEFAULT_SW + default y + help + If you say Y here, the software cursor will ensure that the + background color of the character under the cursor is changed, + even if the cursor color is the same as the original character's + color. + +config CUR_DEFAULT_SW_BKGND_DIFFERENT + bool "Software cursor makes foreground color different from background" + depends on CUR_DEFAULT_SW + default y + help + If you say Y here, the software cursor will ensure that the + foreground color of the character under the cursor is different + from the background color. + +config CUR_DEFAULT_SW_FLAGS + depends on HW_CONSOLE + int + default 0 if !CUR_DEFAULT_SW + # 16 + (32 if CHANGE_BKGND) + (64 if BKGND_DIFFERENT): + default 16 if !CUR_DEFAULT_SW_CHANGE_BKGND && !CUR_DEFAULT_SW_BKGND_DIFFERENT + default 48 if CUR_DEFAULT_SW_CHANGE_BKGND && !CUR_DEFAULT_SW_BKGND_DIFFERENT + default 80 if !CUR_DEFAULT_SW_CHANGE_BKGND && CUR_DEFAULT_SW_BKGND_DIFFERENT + default 112 if CUR_DEFAULT_SW_CHANGE_BKGND && CUR_DEFAULT_SW_BKGND_DIFFERENT + config DEVKMEM bool "/dev/kmem virtual device support" default y -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Mon, 09 Nov 2009 10:15:45 +0100
Clemens Ladisch <clemens@...> wrote: > Make the default console cursor type configurable rather than > hard-coding it. You can set the cursor type at runtime so this all seems unjustified and doing this kind of thing at build time is definitely the wrong place. Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableAlan Cox wrote:
> Clemens Ladisch <clemens@...> wrote: > > Make the default console cursor type configurable rather than > > hard-coding it. > > You can set the cursor type at runtime so this all seems unjustified and > doing this kind of thing at build time is definitely the wrong place. The justification from Daniel's original patch was: | For embedded systems, the blinking cursor at startup time can be | annoying and unintended. Would a simple "Disable cursor by default" switch more acceptable? Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurable> The justification from Daniel's original patch was:
> | For embedded systems, the blinking cursor at startup time can be > | annoying and unintended. > > Would a simple "Disable cursor by default" switch more acceptable? Well I guess you could just make the default cursor define a variable and mark it MODULE_PARAM ? Alan -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableAlan Cox wrote:
> > The justification from Daniel's original patch was: > > | For embedded systems, the blinking cursor at startup time can be > > | annoying and unintended. > > > > Would a simple "Disable cursor by default" switch more acceptable? > > Well I guess you could just make the default cursor define a variable and > mark it MODULE_PARAM ? The original thread started here: <http://lkml.org/lkml/2009/11/5/71>. To quote Andrea: | There's no need to choose if we want the blinking cursor or not | at each boot. Clemens -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Mon, Nov 09, 2009 at 11:46:00AM +0000, Alan Cox wrote:
> > The justification from Daniel's original patch was: > > | For embedded systems, the blinking cursor at startup time can be > > | annoying and unintended. > > > > Would a simple "Disable cursor by default" switch more acceptable? > > Well I guess you could just make the default cursor define a variable and > mark it MODULE_PARAM ? I had that previously and the response was that there is no reason to define that setting per-boot process, as it is rather unlikely that you want to change it from one boot to the next. Hence, it should be set at compile time. And even if the cursor behaviour is changable at runtime, I don't see why it shouldn't have a selectable compile time default. Which is what the patch adds. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableDaniel Mack wrote:
> I had that previously and the response was that there is no reason to > define that setting per-boot process, as it is rather unlikely that you > want to change it from one boot to the next. Hence, it should be set at > compile time. > It should be set as a boot parameter, since this is fixed at system installation and then left untouched. > And even if the cursor behaviour is changable at runtime, I don't see > why it shouldn't have a selectable compile time default. Which is what > the patch adds. It seems like adding cruft to the kernel that is just as effectively available at run-time. Where does it end? Do we eventually add bash to the kernel? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Tue, Nov 10, 2009 at 04:28:03AM +1030, David Newall wrote:
> Daniel Mack wrote: > > I had that previously and the response was that there is no reason to > > define that setting per-boot process, as it is rather unlikely that you > > want to change it from one boot to the next. Hence, it should be set at > > compile time. > > > > It should be set as a boot parameter, since this is fixed at system > installation and then left untouched. I'd be fine with either way. As long as it disables the blinking cursor. > It seems like adding cruft to the kernel that is just as effectively > available at run-time. Where does it end? Do we eventually add bash to > the kernel? Well, all I need is a way to disable the cursor at boot time, as we don't want it to be in our boot screen on a embedded system. It is not only ruin the aesthetics but also gives the wrong assumption that the system awaits input. There is no userspace at this point, so that's no option. My first approach was adding a __setup variable to select that, but it wasn't beloved by the people get_maintainer.pl spit out. So I made it compile-time definable, and Clemens extended that to a more powerful interface of settings. I don't really have a strong opinion on which way to go, all I need is a cursor-free system startup :) And I would of course prefer that patch to be in mainline. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Tue, Nov 10, 2009 at 04:28:03AM +1030, David Newall wrote:
> Daniel Mack wrote: > > And even if the cursor behaviour is changable at runtime, I don't see > > why it shouldn't have a selectable compile time default. Which is what > > the patch adds. > > > It seems like adding cruft to the kernel that is just as effectively > available at run-time. Where does it end? Do we eventually add bash to > the kernel? One more thing: Clemens' last patch didn't add anything to the kernel's binary size. It didn't slow down anything either, as there is no run-time condition evaluation. It just makes something configurable which was hard coded before. So where's the cruft? The comparison to 'bash in the kernel' is really inappropriate. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableDaniel Mack wrote:
> On Tue, Nov 10, 2009 at 04:28:03AM +1030, David Newall wrote: > >> Daniel Mack wrote: >> >>> And even if the cursor behaviour is changable at runtime, I don't see >>> why it shouldn't have a selectable compile time default. Which is what >>> the patch adds. >>> >> It seems like adding cruft to the kernel that is just as effectively >> available at run-time. Where does it end? Do we eventually add bash to >> the kernel? >> > > One more thing: > > Clemens' last patch didn't add anything to the kernel's binary size. > It didn't slow down anything either, as there is no run-time condition > evaluation. It just makes something configurable which was hard > coded before. So where's the cruft? > In this case the cruft is yet more kernel configuration choices to confuse and bewilder. The problems caused by cruft are more from its accretion than from any single part of it. Being able to argue that a crufty feature causes no change to speed or size misses that point. Everything should be in the kernel, except those things that don't need to be (with apologies to Enstein). I'm having trouble seeing a flashing cursor during device startup as a problem. I expect it will prove a useful diagnostic, one day. I think you can turn it off (from user space) within a couple of seconds of power on; you did say embedded, didn't you? Perhaps you even can configure your hardware to not display the cursor on startup, which is the second likeliest (after user-space) place to satisfy your needs. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Tue, Nov 10, 2009 at 10:35:12PM +1030, David Newall wrote:
> I'm having trouble seeing a flashing cursor during device startup as a > problem. I expect it will prove a useful diagnostic, one day. I think > you can turn it off (from user space) within a couple of seconds of > power on; you did say embedded, didn't you? Perhaps you even can > configure your hardware to not display the cursor on startup, which is > the second likeliest (after user-space) place to satisfy your needs. I'm talking about an embedded device with no keyboard connected but only a touch screen. In this case, the cursor is clearly misleading, as there is no input device to use it. And for such a case (and I'm sure I'm not the only one having it), a way to switch the cursor off is much appreciated. I don't believe that's so hard to understand, really. "A couple of seconds" is still too much. We don't want to give the impression of a terminal at all. The whole application starting afterwards has no cursor either. Daniel -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableDaniel Mack wrote:
> "A couple of seconds" is still too much. We don't want to give the > impression of a terminal at all. The whole application starting > afterwards has no cursor either. Or even half a second. Devices regularly flash and squiggle on startup, often as a diagnostic. Did you look at initialising your display controller in graphics mode, or with the cursor off? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Tue, Nov 10, 2009 at 11:06:58PM +1030, David Newall wrote:
> Daniel Mack wrote: > > "A couple of seconds" is still too much. We don't want to give the > > impression of a terminal at all. The whole application starting > > afterwards has no cursor either. > > Or even half a second. Devices regularly flash and squiggle on startup, > often as a diagnostic. Did you look at initialising your display > controller in graphics mode, or with the cursor off? It's a dumb framebuffer device, fbcon handles the rest. From the moment when the framebuffer is initalized until the userspace comes up, it takes ~5 secs, and at this time, we don't want to see the cursor. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
|
|
Re: [PATCH] vt: make the default cursor shape configurableOn Mon 2009-11-09 23:09:44, Daniel Mack wrote:
> On Tue, Nov 10, 2009 at 04:28:03AM +1030, David Newall wrote: > > Daniel Mack wrote: > > > And even if the cursor behaviour is changable at runtime, I don't see > > > why it shouldn't have a selectable compile time default. Which is what > > > the patch adds. > > > > > > It seems like adding cruft to the kernel that is just as effectively > > available at run-time. Where does it end? Do we eventually add bash to > > the kernel? > > One more thing: > > Clemens' last patch didn't add anything to the kernel's binary size. > It didn't slow down anything either, as there is no run-time condition > evaluation. It just makes something configurable which was hard > coded before. So where's the cruft? The number of configs to test just got bigger. 100% bigger in fact. Every single developer will have to answer 'do you want blinking cursor?' when your patch is merged. config options _are_ expensive. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@... More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |
| < Prev | 1 - 2 | Next > |
| Free embeddable forum powered by Nabble | Forum Help |