Re: sbusfb changes are wrong

From: James Simmons (jsimmons@acsu.buffalo.edu)
Date: Sun May 07 2000 - 19:56:44 EST


On Sun, 7 May 2000, Jakub Jelinek wrote:

> On Sun, May 07, 2000 at 10:59:57AM -0400, James Simmons wrote:
> >
> > What happened to if (fb->open) return -EBUSY; in sbusfb.c? This is
> > wrong!!! Is this so brain dead apps like fbvt can work on this platform.
> > Well it's heading in the wrong direction. I posted before why this is a bad
> > idea. You should not allow multiple process access to /dev/fb at the same
> > time. You are going to have problems!!!!
>
> To support DGA on FFB/AFB.
> They are not wrong. FFB, AFB, Leo and other cards can support several apps
> accessing the same hardware without a problem, they have been designed with
> that in mind (e.g. they have hardware contexts for framebuffer control
> registers, ability to save/restore the context on a process switch and
> stuff like that).

....

> I have to allow it for DGA support in xfree86-4.0 etc. It will
> also be needed to DRI/DRM direct 3d rendering support with Creator3d
> et al.
>
> What is the big deal?
>
>With DGA and DRI/DRM the applications using the same fb device at
>the same time have to use appropriate synchronization mechanisms to
>access the device safely.

I'm aware of the hardware context these cards possess:) Fork is the
problem :( Think about the race conditions on SMP machines. Process B
could be operating expecting the hardware to be in state B but because
process A on CPU 2 which just forked from process B just starts using the
hardware it sets the context to a different state. Process B gives
unexpect results. I'm not just talking about the accel state. It also
things like the color map and framebuffer location itself.

Q: Why did they deprecate a.out support in linux?
A: Because a nasty coff is bad for your elf.

James Simmons [jsimmons@linux-fbdev.org] ____/|
fbdev/gfx developer \ o.O|
http://www.linux-fbdev.org =(_)=
http://linuxgfx.sourceforge.net U

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun May 07 2000 - 21:00:21 EST