Re: SVGA kernel chipset drivers.

Albert Cahalan (albert@ccs.neu.edu)
Fri, 7 Jun 1996 14:55:21 -0400 (EDT)


From: "Jonathan H. Pickard" <marxmarv@cris.com>
> Quoth Kenneth Albanowski:
>
>> As for multiple VC's, I don't think this would be a problem. Two programs
>> cannot control the video card simulatenously. So to perform a cross-task
>> VC switch, the first task would close /dev/ioports when it gets told to
>> background itself, and the second task opens up /dev/ioports when it wakes
>> up. (This doesn't deal with allocating VRAM in a useful manner to save on
>> (or _for_!) swapping. That's only possible if the kernel knows all about
>> VRAM.)
>
> This means now that the VC code has to know all about suspending
> tasks on graphic consoles (but not necessarily on non-graphic
> consoles). It's also a bit harder to save other state as may be
> found necessary, or possibly even to let a blit finish.

You soon end up with 90% of GGI but only 40% of the usefulness.

>>> Perhaps if somehow one could put minimal support for restoring
>>> textmode into the kernel,
>>
>> This is currently needed, but I don't see how it's feasible.
>> And it certainly wouldn't be portable. There are too many video
>> cards with too many weird registers to support some method of
>> restoring textmode. (That's one of those fundamental problems
>> with the current VGA architecture.)
>
> Well, IMHO, if we replace the video mode setting stuff we have
> there now with something that _just_ restores textmode on the
> appropriate ioctl, it wouldn't grow by more than a few K. Or
> perhaps we could reuse it.

That is a nice idea which is 100% impossible.

Video cards don't work the way you wish they did. They have read-only
registers, locked and hidden registers, and many complicated settings.
You can't just set textmode. If you try, you will get the video card
into some useless state and maybe even flatline your monitor. There is
no magic reset command. To return to textmode, you might need to turn
off the accelerator, change several write-only registers, lock and
unlock other registers, change more write-only registers, move a
register window, read something from a register which you XOR with
something saved when you set up the card then write into a different
write-only register... It's really gross and it won't work if you don't
know the complete state of the video hardware.