freebsd-skq/sys/dev/fb
Jean-Sébastien Pédron 19e2ce2d83 vt(4): Colors are indexed against a console palette, not a VGA palette
Rename vt_generate_vga_palette() to vt_generate_cons_palette() and
change it to build a palette where the color index is the same than in
terminal escape codes, not the VGA index. That's what TCHAR_CREATE()
uses and passes to vt(4).

The main differences between both orders are:
    o  Blue and red are swapped (1 <-> 4)
    o  Yellow and cyan are swapped (3 <-> 6)

The problem remained unnoticed, because the RGB bit indexes passed to
vt_generate_vga_palette() were reversed. This inversion was cancelled
by the colors inversions in the generated palette. For instance, red
(0xff0000) and blue (0x0000ff) have bytes in opposite order, but were
swapped in the palette. But after changing the value of blue (see last
paragraph), the modified color was in fact the red one.

This commit includes a fix to creator_vt.c, submitted by Nathan
Whitehorn: fb_cmsize is set to 16. Before this, the generated palette
would be overwritte. This fixes colors on sparc64 with a Creator3D
adapter.

While here, tune the palette to better match console colors and improve
the readability (especially the dark blue).

Submitted by:	nwhitehorn (fix to creator_vt.c)
MFC after:	1 week
2014-08-10 17:04:10 +00:00
..
boot_font.c Clean up license text 2013-12-29 18:44:12 +00:00
creator_vt.c vt(4): Colors are indexed against a console palette, not a VGA palette 2014-08-10 17:04:10 +00:00
creator.c Remove more superfluous const specifiers. 2014-02-23 18:36:45 +00:00
creatorreg.h
fb_if.m Merge VT(9) project (a.k.a. newcons). 2013-12-05 22:38:53 +00:00
fb.c
fbd.c fbd: Fix a bug where vt_fb_attach() success would be considered a failure 2014-08-10 14:55:39 +00:00
fbreg.h Remove ia64. 2014-07-07 00:27:09 +00:00
gallant12x22.c Clean up license text 2013-12-29 18:44:12 +00:00
gfb.h
machfb.c Remove more superfluous const specifiers. 2014-02-23 18:36:45 +00:00
machfbreg.h
s3_pci.c Fix a Clang warning. 2012-04-16 23:29:12 +00:00
splash_bmp.c
splash_pcx.c
splash_txt.c
splash.c
splashreg.h
vesa.c Pull in r267961 and r267973 again. Fix for issues reported will follow. 2014-06-28 03:56:17 +00:00
vesa.h Properly check VESA video mode number. 2012-02-16 22:33:53 +00:00
vga.c Remove a useless warning. The mode information is unused for very long time 2012-04-04 21:19:55 +00:00
vgareg.h