Subject: Re: A couple of questions about console/X graphics
To: Matt Thomas <>
From: Blaz Antonic <>
List: tech-x11
Date: 06/13/2004 22:20:39

> > ? As in, are there any functions that more advanced wscons driver might
> > have that could come in handy ?
> I assume it uses stippling for font rendering.

My english is far from perfect but from what i think that "stipple"
means it's true, it can use stipple (a rectangular bitmask) to render
fonts. It can use a contiguous bitmask too (plane expansion function
which renders pixelmap of set dimensions from contigous bit stream), for
opaque text - as used in console mode - at the very least.
> Look at xsrc/xfree/xc/programs/Xserver/hw/netbsd/dec/sfb as an example
> how a smart frame buffer is used in the Xserver.

Will do; incidentally - slightly offtopic - i have PMAX cfb (PBAG-BA
IIRC) here, thanks to Isildur; if i can get my hands on TurboChannel
adapter (DWCTX-BX) i'm planning to stick it in my Vaxstation. Running
dual-head shouldn't be a problem then, given that support for cfb
already exists. Is cfb in any way similar to sfb (or is it much
"dumber") ?

Additionaly, i remember reading about Xdec (XdecNetBSD ?) somewhere -
does this have anything to do with said sfb X server ?
> Yes.  The LCG was designed to accelerate X operations.

So ... is there any practical use for a single clipping rectangle and
things like plane extraction/expansion in real X server ? I can't think
of any use for those in console mode anyway (except for already
mentioned bounding box for entire screen, just to make sure we don't
cause any accidental wraps or flood offscreen framebuffer areas in use
for other purposes).
> > screen simultaneously ? Again i suppose in theory there could be any
> > number of different font types displayed (up to the number of pixels on
> > the screen :-)) but i suppose there is some artificial limit to that
> > too.
> Not really.

Uh-huh ... so ... there can be any number of fonts (typefaces) displayed
at once ? Like in web browser, many different typefaces at once :( Not
> Does LCG actually have that problem?  Can't the fonts be anywhere in
> virtually addressable memory?

They can be - and you're kindly invoted to sort out the cirtual
addressing stuff :-) This only involves setting up page tables (doesn't
sound very complicated) and figuring out how to set virtual flag in
command packets (less easy but i can provide few pointers). My
understanding of Vax VM is very theoretical and my understanding of
LCG's VM is non-existent; i think i know how to set virtual flag in
command packets but that's it. Somebody else will have to figure out how
to set up page tables and do all the error processing (this is not an
issue for console operation which happens to be my primary goal); i
neatly avoid all this stuff by sticking with physical addressing, fine
and dandy while operating as console.
> You should treat that as a font cache.  Keep the fonts in the server
> and swap them in as needed.  You should be able to DMA them in quickly.

A workaround would be to allocate physical memory (as in current FIFO
operation, the stuff Jochen helped me with) so i can write data at
virtual address and still know the physical address of it to feed it to
LCG. Not pretty but woudl work. DMA would (obviously) work without
problems between two virtual memory locations (from application/kernel's
point of view).
> Also, since you always have a fixed depth, console messages can always
> be printed regardless of whether an X server is running

Umm ... your replies are always so darn cryptic :) What does this have
to do with any of my questions ? Even if bit depth of console (versus X
server, aka mmap()ed mode) was different - which it can be in theory
(mono versus 8 bpp and mono/8bpp versus 24 bpp on LCGi model, if anybody
happens to own one) - there would be no problem in outputting console
messages - onscreen ones are stored in character cell array which gets
rendered on virtual console switch (and offscreen ones are handled
elsewhere and fed into character cell array if need be no doubt) - if
you were to switch from X server to one of virtual consoels, say the one
X server was started from, the messages should appear there, IMHO. I
never tested it though (since the only person with anything resembling X
server for LCG in "dumb" mode at the time being is Michael Hitch).

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