Re: [PATCH 1/2] Colored kernel output (run3)

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Jan Engelhardt <jengelh@...>
Cc: Linux Kernel Mailing List <linux-kernel@...>, Oleg Verych <olecom@...>, Ingo Molnar <mingo@...>
Date: Monday, October 8, 2007 - 7:12 pm

On Sat, 2007-10-06 at 22:09 +0200, Jan Engelhardt wrote: 

This is quite a long thread :-)


The more correct term for "The value" is probably "The attribute".


You might have to include a warning that those values or attributes are 
interpreted differently depending on the driver used, and the above is
mostly true for 16-color console drivers only.

For 2-colors (we still have quite a few of them) only bit 0 is true for
color (0x00 and 0x01). The rest of the bits are interpreted as
attributes:

	0x02 - italic
	0x04 - underline
	0x08 - bold
	0x80 - blink

The italic, underline and bold attributes will show up in a 2-color
framebuffer console. The blink attribute is ignored.

With a 4-color fb console (4-level grayscale), those values are again
interpreted differently.

	0x00 - 0x00 : black
	0x01 - 0x06 : white
	0x07 - 0x08 : gray  
	the rest    : intense white

(If by mistake 0x0106 is used, it will produce a white on white display)

With an 8-color console, only the first 8 values are considered.

With a 16-color console, that is also not consistent:

With vgacon, it supports 16-color foreground (fg), 8-color
background (bg) at 256 chars. Becomes 8 fg and 8 bg with 512 chars.

With fbcon, it supports 16 fg and 16 bg at 256, 16 fg and 8 bg at
512 chars.

And for drivers that have their own con_build_attr() hook, they will be
interpreted differently again.


You may need to specify that the values here are the console default,
ie, the default_blue|grn|red boot options are not filled up.


You may want to leave out the blink attribute (0x80) from this part.
Otherwise setterm -blink on|off will produce the opposite effect. 

Tony



-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 1/2] Colored kernel output (run3), Jan Engelhardt, (Sat Oct 6, 4:09 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Antonino A. Daplas, (Mon Oct 8, 7:12 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Jan Engelhardt, (Mon Oct 8, 7:31 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Bill Davidsen, (Tue Oct 9, 5:36 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Antonino A. Daplas, (Mon Oct 8, 7:53 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Ingo Molnar, (Sun Oct 7, 12:38 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Ingo Molnar, (Sun Oct 7, 12:44 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Jan Engelhardt, (Sun Oct 7, 12:54 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Ingo Molnar, (Sun Oct 7, 12:59 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Jan Engelhardt, (Sun Oct 7, 1:03 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Ingo Molnar, (Sun Oct 7, 1:08 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Jan Engelhardt, (Sun Oct 7, 12:44 pm)
Re: [PATCH 1/2] Colored kernel output (run3), Alan Cox, (Sat Oct 6, 6:52 pm)