Index: [thread] [date] [subject] [author]
  From: Jon M. Taylor <taylorj@gaia.ecs.csus.edu>
  To  : ggi-develop@eskimo.com
  Date: Sun, 15 Aug 1999 17:14:09 -0700 (PDT)

Re: Ping-pong buffers on KGIcon are here!

On Sun, 15 Aug 1999, James Simmons wrote:

> 
> > easiest, we'll see.  A better solution, involving no locks at all, would
> > be to fault the process to sleep if it touches the framebuffer whilst
> > accels are still being processed....
> 
> Thats the question. How do you tell if the framebuffer is being accessed?
> Especially when mmapped. I would implement such a solution if I knew the
> answer to this question.

	The answer is what I wrote above - unmap the framebuffer while
accels are being processed, and remap it after the accels are done.  Then
set up a nopage() handler on /dev/fb that will catch the page fault when a
process touches the framebuffer while it is unmapped, put the process to
sleep, and wake it back up after the accels are done and the framebuffer
has been remapped.  Then the process continues to access the framebuffer
normally, and has no idea that it was put to sleep for a while.  This way,
the process can interleave accels with framebuffer accesses however it
wishes to, and no special handling is required in the process' code. 
Everything is taken care of in the kernel. 

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]