Index: [thread] [date] [subject] [author]
  From: Jon M. Taylor <taylorj@ecs.csus.edu>
  To  : ggi-develop@eskimo.com
  Date: Thu, 11 Nov 1999 15:48:48 -0800 (PST)

ping pong buffering

On Fri, 12 Nov 1999, Jos Hulzink wrote:

> On Thu, 11 Nov 1999, Jon M. Taylor wrote:
> 
> > On Thu, 11 Nov 1999, Andreas Beck wrote:
> > 
> > > > To get acceleration to work, I had to disable ping pong
> > > > buffers. Before I did, I got this message from GGI_DEBUG=255 ./demo:
> > > >    GGI_genkgi_drawbox() called
> > > >    Terminating on signal 11.
> > > 
> > > YES ! GRRR ! I got that yesterday, too after recompiling LibGGI to trace
> > > a portability problem.
> > 
>
> When will PP really work on the GenKGI system ?

	When someone other than myself is willing to continue development
on it.  The current preliminary implementation _should_ work with any KGI
driver, but you must enable PP buffer support in both genkgi.h (#define
KGICON_USE_PPBUF) and fbcon-kgi.c (#define KGICON_USE_PROC).  Here's a
quick summary of the current implementation of PP buffers and what still
needs to be done:

What works:
-----------

* ACCEL_DRAWLINE, ACCEL_DRAWBOX, and ACCEL_COPYBOX are supported in
LibGGI. I don't think that genkgi handles any other kgicommands than this
anyway....

* /proc/gfx[n]/kgicommand is handled in fbcon-kgi.c.  One simply open()s
and mmap()s this file, and then starts writing kgicommands to the start of
the virtual FIFO space.

What doesn't work:
------------------

* The kgiproc system in fbcon-kgi.c still has some strange bugs.  Some of
these bugs can cause kernel oopsen, which is why kgiproc is disabled by
default.

What is still unimplemented:
----------------------------

* Command fragments are not yet properly handled in fbcon-kgi.c.  This
requires the userspace code to check for end-of-page conditions and
manually flip the buffers by jumping to the start of the next page. This
works, but is kludgey and slow.  Andy posted a good description of how to
implement proper command fragment handling a while back - check the
mailing list archives.

* In ASYNC mode, context updates are not flushed with every kgicommand,
but only when the PP buffer is flipped.  Again, Andy posted a very nice
description of how to use lock bits in the context map to synchronize
context and kgicommand buffer flushes.

* PP buffers and any other alternate kgicommand communications systems
should be handled transparently by genkgi helperlibs, not hacked with
#ifdefs as they are now.  All LibGGI internals code which uses the genkgi
target should use the exact same kgicommand syntax (KGICOMMAND_PUT() or
similar).

Jon
 
---
'Cloning and the reprogramming of DNA is the first serious step in 
becoming one with God.'
	- Scientist G. Richard Seed


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