> For "behaved" cards, this is a good idea, though.
Agree. Alot of cards also use a test register to see if the accel engine
is busy instead of a interrupt.
> The problem is, that on cards that lock up, we cannot rely on applications
> acquiring this lock. An mmaping/unmapping the framebuffer is the only way to
> ensure that an application can/cannot access the framebuffer.
The lock from userland approach is the DRI approach which is just a bad
design. Especially on SMP machines.
> Thus we need to enforce the lock. And there are only two ways for that (if I haven't
>missed one):
>
> 1. disallow access to the fb by using the memory remapping system of the
> host processor.
> 2. disallow access to the fb by using the scheduling system to deny programs
> that use the fb to run.
I'm using the second approach. Actually I'm allowing only one process
access to the video card at a time. This includes the framebuffer and
accel engine.