Thread (11 messages) 11 messages, 3 authors, 2004-08-17

Re: patch fixing background next to penguin logo in monochrome

From: Geert Uytterhoeven <geert@linux-m68k.org>
Date: 2004-08-13 08:05:17

On Mon, 13 Sep 2004, Antonino A. Daplas wrote:
quoted hunk ↗ jump to hunk
On Monday 13 September 2004 06:25, Antonino A. Daplas wrote:
quoted
On Friday 13 August 2004 04:01, Geert Uytterhoeven wrote:
quoted
P.S. There are still problems when switching from color to monochrome
     (underlines appear everywhere) or vice versa (text becomes blue),
but I cannot expect you to fix all old bugs in one week ;-)
This one is a little difficult since there is currently no method to
convert monochrome attributes to color and vice versa.  The best one can do
is to clear all attributes when switching from mono<->color.

When switching, one will get plain text only.  This is  probably better
than having text with incorrect attributes.

Attached patch is completely untested, but it's the same one in 2.6.
I think the conp->vc_can_do_color field also needs to be updated during fbcon_switch.

Tony
---

diff -uprN linux-2.4-orig/drivers/video/fbcon.c linux-2.4/drivers/video/fbcon.c
--- linux-2.4-orig/drivers/video/fbcon.c	2004-09-13 07:40:18.194333488 +0800
+++ linux-2.4/drivers/video/fbcon.c	2004-09-13 07:41:52.302026944 +0800
@@ -1930,6 +1930,7 @@ static int fbcon_switch(struct vc_data *
 	(*info->switch_con)(unit, info);
     if (p->dispsw->clear_margins && vt_cons[unit]->vc_mode == KD_TEXT)
 	p->dispsw->clear_margins(conp, p, 0);
+    conp->vc_can_do_color = p->var.bits_per_pixel != 1;
     if (logo_shown == -2) {
 	/* G.S.: Display a line above the Boot Logo to state what
 	* version of the kernel we are booting.
I don't think it's needed: I saw no artifacts when switching between a
monochrome and a color VC or vice versa.

When looking at the source, conp->vc_can_do_color is initialized in
fbcon_setup(), which is called from fbcon_changevar(), which is called by the
fbdev if the resolution or color depth was changed.

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help