fbcon: bgcolor fix
Subsystems (2)
PATCH 1/1 fbcon: bgcolor fix
The forth bit of the background color is the blink property bit, not the intensity bit, as for the foreground color.
Therefore it shouldn't be included in the background color.
--- drivers/video/console/fbcon.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/video/console/fbcon.h +1 -1
@@ -92,7 +92,7 @@ struct fbcon_ops {#define attr_fgcol (fgshift,s) \ (((s) >> (fgshift)) & 0x0f)#define attr_bgcol (bgshift,s) \ - (((s) >> (bgshift)) & 0x0f) + (((s) >> (bgshift)) & 0x07)/* Monochrome */ #define attr_bold (s) \
Signature · 1 line
1.5.4.3
Quoted 3 lines · Stefano Stabellini
The forth bit of the background color is the blink property bit, not the intensity bit, as for the foreground color.
Therefore it shouldn't be included in the background color.
I'm a bit skeptical, though I have not tried this. ISTR fb has the power to render full 8 bits background in addition to blinking.
Quoted 11 lines
drivers/video/console/fbcon.h +1
-1@@ -92,7 +92,7 @@ struct fbcon_ops {#define attr_fgcol (fgshift,s) \ (((s) >> (fgshift)) & 0x0f)#define attr_bgcol (bgshift,s) \ - (((s) >> (bgshift)) & 0x0f) + (((s) >> (bgshift)) & 0x07)/* Monochrome */ #define attr_bold (s) \
Quoted 7 lines · Jan Engelhardt
Quoted 3 lines · Stefano Stabellini
The forth bit of the background color is the blink property bit, not the intensity bit, as for the foreground color.
Therefore it shouldn't be included in the background color.I'm a bit skeptical, though I have not tried this.
If you look at the build_attr function in drivers/char/vt.c you can see that the blink attribute is stored as the forth bit of the background color.
I tried the patches with both an ncurses application and manually using:
echo -en '\E[5m'
and they seems to work fine.