Re: VGA console palette & virtual console switching

Zachary Amsden (amsdenz@aavid.com)
Fri, 17 Jul 1998 16:42:13 -0400


-----Original Message-----
From: Tuukka Toivonen <tuukkat@ees2.oulu.fi>
To: linux-kernel@vger.rutgers.edu <linux-kernel@vger.rutgers.edu>
Date: Friday, July 17, 1998 3:35 PM
Subject: VGA console palette & virtual console switching

>Console ioctl PIO_CMAP sets the color palette for all virtual
>consoles (in 2.0.34).
>
>Why it doesn't change the palette only for a single virtual
>console? Is it a design feature or is it that nobody just
>hasn't written the code?

Actually, the opposite is true. It looks like making PIO_CMAP
set the palette for all consoles was a feature that was
written in.

>Is this same for 2.1.x?

Yes, but I have a feeling it shouldn't even be in console.c
where it is. It probably should be part of the new video
stuff. But this was changing at an alarming pace, so perhaps
it will be soon.

>If it's the latter, I could look at it. But not if it is
>non-wanted feature.
>
>Maybe there should be two palettes that could be set? One
>would set default for newly opened virtual consoles and another
>would set the current vc palette.

It would be easier to change set_get_cmap(unsigned char *arg, int set)
to set_get_cmap(unsigned char *arg, int flags, int cons) and allow
it to either set all palettes or a specific one. This should be
moved to the video drivers though, IMHO.

>I'm writing a program that would change the palette. If the
>palette setting is global, the program would need to grab
>virtual console switching and restore the palette itself.
>I consider this is a bit clumsy.

It is clumsy, but not hard at all to do, using VT_RELDISP and
all that stuff.

Zachary Amsden
amsden@andrew.cmu.edu

-
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.altern.org/andrebalsa/doc/lkml-faq.html