On Mon, 29 May 2000, Yuri Per wrote:
> The check "con == currcon" is the same as in ALL other framebuffer drivers.
> If this is wrong, all drivers should be changes, not only the ATI one.
> As I understand "currcon" variable is not compatible with multi-display
> mode,
> so it shold be eliminated from all drivers. I don't think that such chanegs
> are possible before kernel 2.5.
Nope :( Most drivers make the currcon a global variable which is bad. Also
the code in fbcon.c is wrong in respect that it uses fg_console. It should
be using the info->display_fg variable. Yes its a chessy hack to get multi
display going. Well the console system was not designed with multihead or
even multidisplay in mind. It has to be cleaned up. I'm working on this now
for 2.5.X.
> Check "con == info->display_fg->vc_num" is not compatible with current
> implentation of the display driver high level part. Code in
> drivers/char/console.c changes console palette before performing the
> switch. With the current check palette for the new foreground console
> somehow becomes loaded before saving palette for the old foreground
> console.
Your right. I never noticed it until now. The palette is set before the
actual switch happens. Consider the case where we are switching from 8
bpp palette mode to a 16 bpp truecolor mode. So the console system sets
the new color palette for the 8 bit mode. Then in the driver specific
switch the fbdev driver sets it again but this time for the 16 bpp mode.
For many video cards the way the palette is set depends on the video mode.
So in console.c we should have
if (redraw) {
set_origin(currcons);
- set_palette(currcons);
if (sw->con_switch(vc_cons[currcons].d) && vcmode !=
KD_GRAPHICS)
+ sw->con_set_palette(vc_cons[currcons].d,color_table);
/* Update the screen contents */
do_update_region(currcons, origin,
screenbuf_size/2);
}
Since in set_palette we have
void set_palette(int currcons)
{
if (vcmode != KD_GRAPHICS)
sw->con_set_palette(vc_cons[currcons].d, color_table);
}
but we already checked for vcmode != KD_GRAPHICS in redraw_screen so we
can call sw->con_set_palette. This means that all fbdev drivers DON'T need
to set the palette on a VT switch. This is very nice :)
Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.
James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/console/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U
http://linuxconsole.sourceforge.net
-
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/
This archive was generated by hypermail 2b29 : Wed May 31 2000 - 21:00:22 EST