Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8217
b: refs/heads/master
c: 2cc38ed
h: refs/heads/master
i:
  8215: 999f852
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed Sep 9, 2005
1 parent 8568029 commit 15e3553
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8c909454f046b59065c6997b651fe20cd90c0f4
refs/heads/master: 2cc38ed13f1b0f9d80a2d0acc2916af94922f27e
21 changes: 19 additions & 2 deletions trunk/drivers/video/console/fbcon.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,9 +247,26 @@ static inline int get_color(struct vc_data *vc, struct fb_info *info,
case 2:
/*
* Scale down 16-colors to 4 colors. Default 4-color palette
* is grayscale.
* is grayscale. However, simply dividing the values by 4
* will not work, as colors 1, 2 and 3 will be scaled-down
* to zero rendering them invisible. So empirically convert
* colors to a sane 4-level grayscale.
*/
color /= 4;
switch (color) {
case 0:
color = 0; /* black */
break;
case 1 ... 6:
color = 2; /* white */
break;
case 7 ... 8:
color = 1; /* gray */
break;
default:
color = 3; /* intense white */
break;
}
break;
case 3:
/*
* Last 8 entries of default 16-color palette is a more intense
Expand Down

0 comments on commit 15e3553

Please sign in to comment.