Index: [thread] [date] [subject] [author]
  From: Geert Uytterhoeven <Geert.Uytterhoeven@cs.kuleuven.ac.be>
  To  : ggi-develop@eskimo.com
  Date: Sun, 5 Jul 1998 13:54:39 +0200 (MET DST)

Re: kgicon difficulties |-< (and new tarballs |->)

On Sun, 5 Jul 1998, Andrew Apted wrote:
> Jon writes:
> >  	Today did NOT go as smoothly as yesterday did.  I am having
> >  problems getting 4bpp modes to work right.  The 4bpp routines in fbcon
> >  have some major problems, it seems.  The foreground color is hardwired to
> >  15, which I found and patched after much head-scratching, but there is
> >  still a very strange problem with garbled fonts which I cannot for the
> >  life of me track down.  
> 
> AFAIK (and that aint far), fbcon-cfb4.c is for "4 bit packed pixels"
> which is like the code in lib/libggi/default/linear-4/*, whereas VGA 4
> bit mode is a weird thing called "ModeX" and needs code like the stuff
> in kgi/lib/libggi/IBM/*.

Yes. Cfb4 is one nibble per pixel, i.e. 2 pixels per byte. ModeX is more like
fbcon-afb with 4 planes, IIRC.

> >  	4bpp support is vital, for without it we cannot use VGA 640x400x4
> >  which is the only graphics mode that is useable for text and that all VGA+
> >  cards can set.
> 
> It's going to be tricky using that mode from userspace if it really is
> banked.  KGI gets round this by mmap tricks -- pretend it is linear and
> use the nopage handler to swap banks on-the-fly.  It'd be nice if fbcon
> could allow this too [the VGER tree now has an mmap hook -- so it is
> probably doable].

That mmap hook is present for the SPARC port: they have to mmap a lot of
regions in their X server. And it's for user space.

In kernel space, you'll have to write your own fbcon-vgax routines that know
when/how to switch banks.

Advances on the fbcon front: builtin frame buffer devices are now probed for
when the memory and PCI subsystem have been initialized. The first call to
register_framebuffer() will take over the console. This means you can use
vgacon first (as Linus wants it), and switch over to fbcon later. Of course you
can still start with fbcon, but then you won't see any early screen output.

It should work with modules too. I'm trying to load vgafb, but first I have to
download a newer modutils (Yes, the machine at home usually runs 2.0.34...).
And then you can boot a stock kernel with vgacon, and insmod the whole frame
buffer/kgi stuff :-)

Greetings,

						Geert

--
Geert Uytterhoeven                     Geert.Uytterhoeven@cs.kuleuven.ac.be
Wavelets, Linux/{m68k~Amiga,PPC~CHRP}  http://www.cs.kuleuven.ac.be/~geert/
Department of Computer Science -- Katholieke Universiteit Leuven -- Belgium

Index: [thread] [date] [subject] [author]