* monochrome display fix.
@ 2004-01-26 22:13 James Simmons
2004-01-26 22:48 ` Linus Torvalds
0 siblings, 1 reply; 4+ messages in thread
From: James Simmons @ 2004-01-26 22:13 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Linux Fbdev development list, Linux Kernel Mailing List
[CONSOLE] Don't let a monochrome display stomp all over the console color
values.
--- linus-2.6/drivers/char/vt.c 2004-01-26 13:34:39.000000000 -0800
+++ fbdev-2.5/drivers/char/vt.c 2004-01-21 17:36:26.000000000 -0800
@@ -1062,7 +1062,8 @@
underline = 0;
reverse = 0;
blink = 0;
- color = def_color;
+ if (can_do_color)
+ color = def_color;
}
/* console_sem is held */
@@ -1135,7 +1136,8 @@
* with white underscore (Linux - use
* default foreground).
*/
- color = (def_color & 0x0f) | background;
+ if (can_do_color)
+ color = (def_color & 0x0f) | background;
underline = 1;
break;
case 39: /* ANSI X3.64-1979 (SCO-ish?)
@@ -1143,19 +1145,23 @@
* Reset colour to default? It did this
* before...
*/
- color = (def_color & 0x0f) | background;
+ if (can_do_color)
+ color = (def_color & 0x0f) | background;
underline = 0;
break;
case 49:
- color = (def_color & 0xf0) | foreground;
+ if (can_do_color)
+ color = (def_color & 0xf0) | foreground;
break;
default:
- if (par[i] >= 30 && par[i] <= 37)
- color = color_table[par[i]-30]
- | background;
- else if (par[i] >= 40 && par[i] <= 47)
- color = (color_table[par[i]-40]<<4)
- | foreground;
+ if (can_do_color) {
+ if (par[i] >= 30 && par[i] <= 37)
+ color = color_table[par[i]-30]
+ | background;
+ else if (par[i] >= 40 && par[i] <= 47)
+ color = (color_table[par[i]-40]<<4)
+ | foreground;
+ }
break;
}
update_attr(currcons);
@@ -1290,9 +1296,11 @@
}
break;
case 8: /* store colors as defaults */
- def_color = attr;
- if (hi_font_mask == 0x100)
- def_color >>= 1;
+ if (can_do_color) {
+ def_color = attr;
+ if (hi_font_mask == 0x100)
+ def_color >>= 1;
+ }
default_attr(currcons);
update_attr(currcons);
break;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: monochrome display fix.
2004-01-26 22:13 monochrome display fix James Simmons
@ 2004-01-26 22:48 ` Linus Torvalds
2004-01-27 7:40 ` [Linux-fbdev-devel] " Thiemo Seufer
0 siblings, 1 reply; 4+ messages in thread
From: Linus Torvalds @ 2004-01-26 22:48 UTC (permalink / raw)
To: James Simmons
Cc: Linus Torvalds, Linux Fbdev development list,
Linux Kernel Mailing List
On Mon, 26 Jan 2004, James Simmons wrote:
>
> [CONSOLE] Don't let a monochrome display stomp all over the console color
> values.
Why is this ugly patch required? If something can't do color, why does it
care about "color" in the first place? We've never needed this patch
before, it looks like something broke somewhere _else_ that causes this
to be relevant.
Linus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Linux-fbdev-devel] Re: monochrome display fix.
2004-01-26 22:48 ` Linus Torvalds
@ 2004-01-27 7:40 ` Thiemo Seufer
2004-01-27 10:19 ` Benjamin Herrenschmidt
0 siblings, 1 reply; 4+ messages in thread
From: Thiemo Seufer @ 2004-01-27 7:40 UTC (permalink / raw)
To: Linus Torvalds
Cc: James Simmons, Linux Fbdev development list,
Linux Kernel Mailing List
Linus Torvalds wrote:
>
>
> On Mon, 26 Jan 2004, James Simmons wrote:
> >
> > [CONSOLE] Don't let a monochrome display stomp all over the console color
> > values.
>
> Why is this ugly patch required? If something can't do color, why does it
> care about "color" in the first place?
Because it stores some text attributes in that place.
> We've never needed this patch
> before, it looks like something broke somewhere _else_ that causes this
> to be relevant.
It was always broken. This went unnoticed, apparently nobody tried to use
a kernel which supports mono and colour framebuffers at the same time.
Thiemo
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Re: monochrome display fix.
2004-01-27 7:40 ` [Linux-fbdev-devel] " Thiemo Seufer
@ 2004-01-27 10:19 ` Benjamin Herrenschmidt
0 siblings, 0 replies; 4+ messages in thread
From: Benjamin Herrenschmidt @ 2004-01-27 10:19 UTC (permalink / raw)
To: Thiemo Seufer
Cc: Linus Torvalds, James Simmons, Linux Fbdev development list,
Linux Kernel Mailing List
> It was always broken. This went unnoticed, apparently nobody tried to use
> a kernel which supports mono and colour framebuffers at the same time.
Still, the patch is ugly.. I'd rather just calculate the colour
normally, and only conditionally store it once in the end...
Ben.
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-27 10:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-01-26 22:13 monochrome display fix James Simmons
2004-01-26 22:48 ` Linus Torvalds
2004-01-27 7:40 ` [Linux-fbdev-devel] " Thiemo Seufer
2004-01-27 10:19 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).