VGA arbitration: API proposal
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Mar 5 14:04:45 PST 2005
On Sat, 2005-03-05 at 18:37 +0000, Alan Cox wrote:
> On Sad, 2005-03-05 at 16:37, Jon Smirl wrote:
> > What about legacy code that doesn't contain vga_get/vga_put. brackets?
> > You can't just do this on VT switch in the simultaneous user case.
>
> I don't think that bit is actually the problem.
>
> Right now the console is kernel side so is easy and can do vga_get/put
> itself happily enough. The fun starts with the user space applications.
> Now all of these tell the kernel they are using the graphics directly
> via a vt ioctl that currently means "don't print panic messages, do
> funky vt switch". That ioctl can be made to mean "older user space
> application hogging the vga".
>
> The bigger question is what the API for userspace looks like for new
> "well behaved" applications that touch on VGA because the moment a user
> app can lock vga we are in deadlock paradise. We may in fact need a
> kernel API on the vga device to "issue vga sequence to device" which
> does the locking entirely in kernel.
Do you think ? I had in mind something simpler, because there are only
very few apps that will have to bother, mostly X, and those are already
kernel crashing paradise anyway :)
I had in mind to base the API on some kind of file semantic (maybe
a /dev despite that beeing unfashionable lately) so that killing the app
will allow us to easily release it's "resource" (the VGA lock) when the
file gets closed.
Ben.
More information about the xorg
mailing list