Subject: Re: Dumb question - switching consoles
To: None <port-sparc@NetBSD.org>
From: Blaz Antonic <blaz.antonic@siol.net>
List: port-sparc
Date: 09/06/2004 16:06:17
Hello,

> the whole graphics framebuffer.  The former would work but would
> violate least surprise, in that users would expect to get back what

As Mouse knows already we (at NetBSD/vax) emulate character cell display
for console operation on all supported framebuffers - attributes and
characters are stored for any number of virtual consoles and wscons does
all the magic on console switch - all you have to do is to provide
function that renders text, positions cursor and erases/copies rows and
columns. Different framebuffers require different implementation of the
latter, for example:

SMG is dumb framebuffer and uses CPU to do everything
LCG is accelerated framebuffer and uses hardware font rendering, copy
and erase (all console operations are fully accelerated)
LCSPX is currently doing copy/erase in hardware but font rendering is
done by CPU (docs for this thing are made of unobtanium :-()

Same underlying principle of emulated character cells ("text mode") is
used for all these drivers. Perhaps you sparc guys shoudl check out one
of those drivers and use it as a skeleton for sprc console, there is
very little arch-specific stuff in there. If anybody is interested in
that mail me and i'll send you LCSPX driver (don't refer to the one in
current source tree, it lacks all the important features) which is
probably the best one to adapt - it supports different wsfonts, colors
and all and is easier to understand than LCG one and yet with all the
goodies.

Blaz Antonic
-- 
Hi! I'm a signature virus!
Copy me into your signature to help me spread!