lkml.org 
[lkml]   [2000]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] 2.4.0-test6-pre8 - dark vga textmode console problem in RIVA TNT 2


On Tue, 8 Aug 2000, Linus Torvalds wrote:
>
> This seems to be a bug in the XF86 4.0.x code-base. The patch is wrong:
> the new Linux kernel palette setting order is correct (we should set the
> palette _after_ switching to the new console).
>
> So yes, the patch will fix the problem. But I don't think it's correct.

It isn't correct, but after looking a bit at what the kernel does, I
suspect it's not a bug in XFree86 either.

The fact is, that we should only set the palette after we've switched to a
new console, and only if that console is in text mode. That part of the
code is right. Your patch messes that logic up, and sets the palette even
in graphics mode and before doing the switch).

However, that also misses a corner case: let's say that we switch modes
(not VC's) on an existing console that _used_ to be in graphics mode (so
we didn't set the palette when we switched to it) into text mode. We
should now set the palette on that graphics->textmode switch because it
was inhibited before by the graphics mode.

Which this patch does.

Does this patch work for you?

Linus

-----
--- v2.4.0-test5/linux/drivers/char/vt.c Thu Jul 27 17:38:00 2000
+++ linux/drivers/char/vt.c Tue Aug 8 12:34:18 2000
@@ -520,9 +520,10 @@
/*
* explicitly blank/unblank the screen if switching modes
*/
- if (arg == KD_TEXT)
+ if (arg == KD_TEXT) {
+ set_palette(console);
unblank_screen();
- else
+ } else
do_blank_screen(1);
return 0;


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.040 / U:0.156 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site